Skip to contentSkip to conversation

grub: add -Wno-error=trampolines to native CFLAGS

PATCH Superseded Randle, William C 1 participant 1 message Mar 18, 2016

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 grub: add -Wno-error=trampolines to native CFLAGS

Fixes YOCTO 9201.
Adds -Wno-error=trampolines to native CFLAGS prevent multiple compile errors when using gcc 5.3.0 for gentoo.
This is a less "invasive" fix than the one proposed earlier by Martin Jansa and, in my testing, solves the problem.

---
 meta/recipes-bsp/grub/grub-efi_2.00.bb | 4 ++++

 1 file changed, 4 insertions(+)
meta/recipes-bsp/grub/grub-efi_2.00.bb +0 -0
index ecc6c9a..58ef61e 100644
@@ -33,6 +33,10 @@ EXTRA_OECONF = "--with-platform=efi --disable-grub-mkfont \

                 --enable-efiemu=no --program-prefix='' \
                 --enable-liblzma=no --enable-device-mapper=no --enable-libzfs=no"

+# ldm.c:114:7: error: trampoline generated for nested function 'hook' [-Werror=trampolines] +# and many other places in the grub code when compiled with some native gcc 5.3 compilers +CFLAGS_append_class-native = " -Wno-error=trampolines"
+
 do_install_class-native() {
    install -d ${D}${bindir}
    install -m 755 grub-mkimage ${D}${bindir}
--
2.7.2