diff options
author | Andrea Adami <andrea.adami@gmail.com> | 2018-09-14 20:02:15 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-09-15 07:36:21 -0700 |
commit | a95dde286863dc80da375265c4b3d35f246e1258 (patch) | |
tree | c65cbf13484ccadf30899808549a076ecb8c24fd /meta-initramfs | |
parent | a6dbefafd7b1aa89a040b330db223a449e4dd536 (diff) | |
download | meta-openembedded-a95dde286863dc80da375265c4b3d35f246e1258.tar.gz |
klibc: fix build on i386 with GCC and security flags enabled
ld fails if distro's security-flags are enabled:
Inject the SECURITY_XFLAGS if security_flags.inc was included.
Fix on i386: ld: discarded output section: `.got.plt'
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-initramfs')
-rw-r--r-- | meta-initramfs/recipes-devtools/klibc/klibc.inc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc index 3d25e96cd4..837b0264a0 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc.inc +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc | |||
@@ -47,7 +47,8 @@ EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \ | |||
47 | 'KLIBCOPTFLAGS=${TUNE_CCARGS}' \ | 47 | 'KLIBCOPTFLAGS=${TUNE_CCARGS}' \ |
48 | V=1 \ | 48 | V=1 \ |
49 | " | 49 | " |
50 | EXTRA_OEMAKE += 'EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" EXTRA_KLIBCLDFLAGS="-z noexecstack"' | 50 | EXTRA_OEMAKE += "'EXTRA_KLIBCAFLAGS=${SECURITY_CFLAGS} -Wa,--noexecstack' \ |
51 | 'EXTRA_KLIBCLDFLAGS=${SECURITY_LDFLAGS} -z noexecstack'" | ||
51 | 52 | ||
52 | export FIX_ARMV4_EABI_BX = "${FIX_V4BX}" | 53 | export FIX_ARMV4_EABI_BX = "${FIX_V4BX}" |
53 | KLIBCTHUMB = "${@['CONFIG_KLIBC_THUMB=n', 'CONFIG_KLIBC_THUMB=y'][(d.getVar('ARM_INSTRUCTION_SET') == 'thumb')]}" | 54 | KLIBCTHUMB = "${@['CONFIG_KLIBC_THUMB=n', 'CONFIG_KLIBC_THUMB=y'][(d.getVar('ARM_INSTRUCTION_SET') == 'thumb')]}" |
@@ -74,5 +75,4 @@ KLIBC_ARCH_powerpc = "ppc" | |||
74 | KLIBC_ARCH_powerpc64 = "ppc64" | 75 | KLIBC_ARCH_powerpc64 = "ppc64" |
75 | THIS_LIBKLIBC = "libklibc (= ${PV}-${PR})" | 76 | THIS_LIBKLIBC = "libklibc (= ${PV}-${PR})" |
76 | 77 | ||
77 | SECURITY_CFLAGS = "-fno-PIE -no-pie" | 78 | SECURITY_LDFLAGS = "${@'-z relro -z now -pie' if '${GCCPIE}' else ''}" |
78 | SECURITY_LDFLAGS = "-no-pie" | ||