[oe-commits] [meta-openembedded] 13/13: klibc: fix build with GCC and -pie for mips, mips64, aarch64

git at git.openembedded.org git at git.openembedded.org
Sun Sep 16 16:11:18 UTC 2018


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit a06c29be2f5bc204f965ee07298c34232c5c39fc
Author: Andrea Adami <andrea.adami at gmail.com>
AuthorDate: Sat Sep 15 16:27:10 2018 +0200

    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 at gmail.com>
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 meta-initramfs/recipes-devtools/klibc/klibc.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc
index 837b026..6342be0 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}' \
                 'INSTALLDIR=${libdir}/klibc' \
                 'SHLIBDIR=${libdir}' \
                 '${KLIBCTHUMB}' \
-                'KLIBCOPTFLAGS=${TUNE_CCARGS}' \
+                'KLIBCOPTFLAGS=${TUNE_CCARGS} -Os' \
                  V=1 \
                 "
 EXTRA_OEMAKE += "'EXTRA_KLIBCAFLAGS=${SECURITY_CFLAGS} -Wa,--noexecstack' \
@@ -76,3 +76,5 @@ KLIBC_ARCH_powerpc64 = "ppc64"
 THIS_LIBKLIBC = "libklibc (= ${PV}-${PR})"
 
 SECURITY_LDFLAGS = "${@'-z relro -z now -pie' if '${GCCPIE}' else ''}"
+SECURITY_LDFLAGS_mips = ""
+SECURITY_LDFLAGS_mips64 = ""

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list