[oe-commits] [openembedded-core] 01/24: mkelfimage: Make -fno-stack-protector effective

git at git.openembedded.org git at git.openembedded.org
Wed Aug 16 23:27:32 UTC 2017


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

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit f6ed82482838e34202721be8f40ca1cc340c325e
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Wed Aug 16 14:10:53 2017 -0700

    mkelfimage: Make -fno-stack-protector effective
    
    mkelfimage uses different flags to compile as freestanding binary
    it does not pour CFLAGS into them during configure as a result
    -fno-stack-protector was never used. Which failed to build with
    compilers configured to build with ssp by default. It worked with
    gcc since we do not configure our toolchain to default to ssp
    
    Fixes errors e.g.
    | objdir/linux-i386/convert_params.o: In function `convert_params':
    | linux-i386/convert_params.c:(.text+0x9f4): undefined reference to `__stack_chk_fail'
    | objdir/linux-i386/convert_params.o: In function `compute_checksum':
    | linux-i386/convert_params.c:(.text+0xa71): undefined reference to `__stack_chk_fail'
    | objdir/linux-i386/convert_params.o: In function `printf':
    | linux-i386/convert_params.c:(.text+0xcc7): undefined reference to `__stack_chk_fail'
    | make: *** [linux-i386/Makefile:24: objdir/linux-i386/convert] Error 1
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
index 2ad4b49..05a5a1a 100644
--- a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
+++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
@@ -23,11 +23,12 @@ CLEANBROKEN = "1"
 
 S = "${WORKDIR}/git/util/mkelfImage"
 
-CFLAGS += "-fno-stack-protector"
 CACHED_CONFIGUREVARS += "\
     HOST_CC='${BUILD_CC}' \
     HOST_CFLAGS='${BUILD_CFLAGS}' \
     HOST_CPPFLAGS='${BUILD_CPPFLAGS}' \
+    I386_CFLAGS='-fno-stack-protector' \
+    IA64_CFLAGS='-fno-stack-protector' \
 "
 EXTRA_OECONF_append_x86-64 = " --with-i386=${HOST_SYS}"
 

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


More information about the Openembedded-commits mailing list