Files
poky/meta/recipes-devtools/mkelfimage/mkelfimage_git.bb
Khem Raj ba1a7556b9 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>
2017-08-18 10:40:26 +01:00

44 lines
1.2 KiB
BlitzBasic

SUMMARY = "Utility for creating ELF boot images for ELF-based Linux kernel images"
HOMEPAGE = "http://www.coreboot.org/Mkelfimage"
SECTION = "devel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=ea5bed2f60d357618ca161ad539f7c0a"
SRCREV = "686a48a339b3200184c27e7f98d4c03180b2be6c"
PV = "4.0+git${SRCPV}"
RECIPE_NO_UPDATE_REASON = "mkelfimage has been removed in coreboot 4.1 release: \
http://review.coreboot.org/gitweb?p=coreboot.git;a=commit;h=34fc4ab80b507739e2580d490dff67fcfdde11ea"
DEPENDS += "zlib"
SRC_URI = "git://review.coreboot.org/p/coreboot;protocol=http \
file://cross-compile.patch \
"
SRC_URI_append_class-native = " \
file://fix-makefile-to-find-libz.patch \
"
CLEANBROKEN = "1"
S = "${WORKDIR}/git/util/mkelfImage"
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}"
inherit autotools-brokensep
do_install_append() {
rmdir ${D}${datadir}/mkelfImage/elf32-i386
rmdir ${D}${datadir}/mkelfImage
chown root:root ${D}/${sbindir}/mkelfImage
}
BBCLASSEXTEND = "native"