summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Adami <andrea.adami@gmail.com>2018-09-15 16:27:10 +0200
committerKhem Raj <raj.khem@gmail.com>2018-09-15 07:37:11 -0700
commita06c29be2f5bc204f965ee07298c34232c5c39fc (patch)
treeaab0ca2335b914a2cec3757c0215951af57f151f
parenta95dde286863dc80da375265c4b3d35f246e1258 (diff)
downloadmeta-openembedded-a06c29be2f5bc204f965ee07298c34232c5c39fc.tar.gz
klibc: fix build with GCC and -pie for mips, mips64, aarch64
The MCONFIG makefiles for mips/mips64 do disable pic so we do not insist linking it with -pie. For aarch64 we have to readd the -Os optimization to avoid | usr/dash/shell.h:103:25: error: '-mgeneral-regs-only' is incompatible with floating-point argument as committed (c296fb707ae3 klibc: Pass Optimization with KLIBCOPTFLAGS) but reverted (76bc58e9329 klibc: Fix build with security flags) trying to fix the i386 build (see ld.bfd: discarded output section: `.got.plt'). This latter issue was fixed for i386 passing -pie to the linker. Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-initramfs/recipes-devtools/klibc/klibc.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc
index 837b0264a..6342be0b1 100644
--- a/meta-initramfs/recipes-devtools/klibc/klibc.inc
+++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc
@@ -44,7 +44,7 @@ EXTRA_OEMAKE = "'KLIBCARCH=${KLIBC_ARCH}' \
44 'INSTALLDIR=${libdir}/klibc' \ 44 'INSTALLDIR=${libdir}/klibc' \
45 'SHLIBDIR=${libdir}' \ 45 'SHLIBDIR=${libdir}' \
46 '${KLIBCTHUMB}' \ 46 '${KLIBCTHUMB}' \
47 'KLIBCOPTFLAGS=${TUNE_CCARGS}' \ 47 'KLIBCOPTFLAGS=${TUNE_CCARGS} -Os' \
48 V=1 \ 48 V=1 \
49 " 49 "
50EXTRA_OEMAKE += "'EXTRA_KLIBCAFLAGS=${SECURITY_CFLAGS} -Wa,--noexecstack' \ 50EXTRA_OEMAKE += "'EXTRA_KLIBCAFLAGS=${SECURITY_CFLAGS} -Wa,--noexecstack' \
@@ -76,3 +76,5 @@ KLIBC_ARCH_powerpc64 = "ppc64"
76THIS_LIBKLIBC = "libklibc (= ${PV}-${PR})" 76THIS_LIBKLIBC = "libklibc (= ${PV}-${PR})"
77 77
78SECURITY_LDFLAGS = "${@'-z relro -z now -pie' if '${GCCPIE}' else ''}" 78SECURITY_LDFLAGS = "${@'-z relro -z now -pie' if '${GCCPIE}' else ''}"
79SECURITY_LDFLAGS_mips = ""
80SECURITY_LDFLAGS_mips64 = ""