]> code.ossystems Code Review - openembedded-core.git/commit
mkelfimage: Make -fno-stack-protector effective
authorKhem Raj <raj.khem@gmail.com>
Wed, 16 Aug 2017 21:10:53 +0000 (14:10 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 16 Aug 2017 23:22:52 +0000 (00:22 +0100)
commitf6ed82482838e34202721be8f40ca1cc340c325e
treeb21059d0b60f1d1547ceaa583c5931c1e6adf5c9
parent586875cea5769fea7d17bae2677eab72e4fc7e31
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@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/mkelfimage/mkelfimage_git.bb