diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-08-16 14:10:53 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-18 10:40:26 +0100 |
commit | ba1a7556b9b190c540519080ffe215f23c037fc7 (patch) | |
tree | 9d7bf29e38330c1f09b38cb9a0e2d231b428e0dd /meta/recipes-devtools | |
parent | 05a60766561f659c9be307953cd5cb267f83c63b (diff) | |
download | poky-ba1a7556b9b190c540519080ffe215f23c037fc7.tar.gz |
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
(From OE-Core rev: f6ed82482838e34202721be8f40ca1cc340c325e)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb index 2ad4b49ab1..05a5a1a489 100644 --- a/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb +++ b/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb | |||
@@ -23,11 +23,12 @@ CLEANBROKEN = "1" | |||
23 | 23 | ||
24 | S = "${WORKDIR}/git/util/mkelfImage" | 24 | S = "${WORKDIR}/git/util/mkelfImage" |
25 | 25 | ||
26 | CFLAGS += "-fno-stack-protector" | ||
27 | CACHED_CONFIGUREVARS += "\ | 26 | CACHED_CONFIGUREVARS += "\ |
28 | HOST_CC='${BUILD_CC}' \ | 27 | HOST_CC='${BUILD_CC}' \ |
29 | HOST_CFLAGS='${BUILD_CFLAGS}' \ | 28 | HOST_CFLAGS='${BUILD_CFLAGS}' \ |
30 | HOST_CPPFLAGS='${BUILD_CPPFLAGS}' \ | 29 | HOST_CPPFLAGS='${BUILD_CPPFLAGS}' \ |
30 | I386_CFLAGS='-fno-stack-protector' \ | ||
31 | IA64_CFLAGS='-fno-stack-protector' \ | ||
31 | " | 32 | " |
32 | EXTRA_OECONF_append_x86-64 = " --with-i386=${HOST_SYS}" | 33 | EXTRA_OECONF_append_x86-64 = " --with-i386=${HOST_SYS}" |
33 | 34 | ||