diff options
| author | Yi Zhao <yi.zhao@windriver.com> | 2021-08-20 11:28:38 +0800 |
|---|---|---|
| committer | Jia Zhang <zhang.jia@linux.alibaba.com> | 2021-08-20 15:59:51 +0800 |
| commit | e004d3765058a1288e4729c7076c818896085bbd (patch) | |
| tree | ec8cb1e2736f8e3183d4a8b2f6c516e48ef23ba6 | |
| parent | 66a1d0582c16778ced50f93b7aba8d365fc54593 (diff) | |
| download | meta-secure-core-e004d3765058a1288e4729c7076c818896085bbd.tar.gz | |
cryptfs-tpm2: fix LDFLAGS expansion
When LDFLAGS expands, The -fmacro-prefix-map and -fdebug-prefix-map will
be prefixed with -Wl, which will cause compilation error:
ld: -f may not be used without -shared
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
| -rw-r--r-- | meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-env.mk-fix-LDFLAGS-expansion.patch | 43 | ||||
| -rw-r--r-- | meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb | 1 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-env.mk-fix-LDFLAGS-expansion.patch b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-env.mk-fix-LDFLAGS-expansion.patch new file mode 100644 index 0000000..0e430cc --- /dev/null +++ b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2/0001-env.mk-fix-LDFLAGS-expansion.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 8d510daad66f59cbd182d9e193f6fe246fc0bd55 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
| 3 | Date: Fri, 20 Aug 2021 10:57:06 +0800 | ||
| 4 | Subject: [PATCH] env.mk: fix LDFLAGS expansion | ||
| 5 | |||
| 6 | When LDFLAGS expands, The -fmacro-prefix-map and -fdebug-prefix-map will | ||
| 7 | be prefixed with -Wl, which will cause compilation error: | ||
| 8 | ld: -f may not be used without -shared | ||
| 9 | |||
| 10 | Upstream-Status: Pending | ||
| 11 | |||
| 12 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
| 13 | --- | ||
| 14 | env.mk | 6 +++--- | ||
| 15 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/env.mk b/env.mk | ||
| 18 | index b6b554c..f250d3a 100644 | ||
| 19 | --- a/env.mk | ||
| 20 | +++ b/env.mk | ||
| 21 | @@ -33,8 +33,8 @@ passphrase_secret ?= h31i05 | ||
| 22 | # The byte code used to encrypt/decrypt secrets | ||
| 23 | secret_xor_byte_code ?= 0x48 | ||
| 24 | |||
| 25 | -LDFLAGS := --warn-common --no-undefined --fatal-warnings \ | ||
| 26 | - $(patsubst $(join -Wl,,)%,%,$(EXTRA_LDFLAGS)) | ||
| 27 | +LDFLAGS := -Wl,--warn-common -Wl,--no-undefined -Wl,--fatal-warnings \ | ||
| 28 | + $(EXTRA_LDFLAGS) | ||
| 29 | CFLAGS := -D_GNU_SOURCE -std=gnu99 -O2 -Wall -Werror \ | ||
| 30 | $(addprefix -I, $(TOPDIR)/src/include \ | ||
| 31 | $(tpm2_tss_includedir) $(tpm2_tabrmd_includedir) \ | ||
| 32 | @@ -42,7 +42,7 @@ CFLAGS := -D_GNU_SOURCE -std=gnu99 -O2 -Wall -Werror \ | ||
| 33 | $(addprefix $(join -L,), $(tpm2_tss_libdir)) \ | ||
| 34 | `$(PKG_CONFIG) --cflags glib-2.0` \ | ||
| 35 | `$(PKG_CONFIG) --libs glib-2.0` \ | ||
| 36 | - $(EXTRA_CFLAGS) $(addprefix $(join -Wl,,),$(LDFLAGS)) | ||
| 37 | + $(EXTRA_CFLAGS) $(LDFLAGS) | ||
| 38 | |||
| 39 | ifneq ($(TSS2_VER), 1) | ||
| 40 | CFLAGS += -ldl -ltss2-sys -ltss2-tcti-mssim -ltss2-tcti-device | ||
| 41 | -- | ||
| 42 | 2.25.1 | ||
| 43 | |||
diff --git a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb index d3b0869..e0ba90c 100644 --- a/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb +++ b/meta-encrypted-storage/recipes-tpm/cryptfs-tpm2/cryptfs-tpm2_git.bb | |||
| @@ -26,6 +26,7 @@ SRC_URI = "\ | |||
| 26 | file://0002-luks-setup.sh-Updated-TPM-Tools.patch \ | 26 | file://0002-luks-setup.sh-Updated-TPM-Tools.patch \ |
| 27 | file://0001-lib-Makefile-set-correct-soname-for-libcryptfs-tpm2.patch \ | 27 | file://0001-lib-Makefile-set-correct-soname-for-libcryptfs-tpm2.patch \ |
| 28 | file://0001-Remove-build-time-from-show_banner.patch \ | 28 | file://0001-Remove-build-time-from-show_banner.patch \ |
| 29 | file://0001-env.mk-fix-LDFLAGS-expansion.patch \ | ||
| 29 | " | 30 | " |
| 30 | SRCREV = "87c35c63090a33d4de437f518b8da9f2d1f1d828" | 31 | SRCREV = "87c35c63090a33d4de437f518b8da9f2d1f1d828" |
| 31 | 32 | ||
