Skip to contentSkip to conversation

efivar: fix build when host gcc version is < 4.9

PATCH In review Mikko Ylinen 2 participants 2 messages Sep 8, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efivar: fix build when host gcc version is < 4.9

efivar v27 started using C11 _Generic keyword in macros but that is not implemented in gcc until 4.9. This makes efivar-native (which is a dependency to efivar) build to fail if the builder host gcc version is < 4.9.

It turns out only 'makeguids' generator needs to be built for the build arch to generate GENERATED_SOURCES for efivar target build. 'makeguids' sources/includes have no gcc version dependencies so to fix efivar build when host gcc < 4.9, we simply build 'makeguids' target for efivar-native.

---
 meta-oe/recipes-extended/efivar/efivar_0.31.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-oe/recipes-extended/efivar/efivar_0.31.bb +5 -1
index 6ad3b36..9d4cdc9 100644
@@ -35,11 +35,15 @@ do_compile_prepend() {
     sed -i -e s:-Werror::g ${S}/gcc.specs
 }
 
+do_compile_class-native() {
+    oe_runmake -C src makeguids
+}
+
 do_install() {
     oe_runmake install DESTDIR=${D}
 }
 
-do_install_append_class-native() {
+do_install_class-native() {
     install -D -m 0755 ${B}/src/makeguids ${D}${bindir}/makeguids
 }
 
Signature · 1 line
2.1.4
#1 lore raw
Quoted 11 lines · Mikko Ylinen

efivar v27 started using C11 _Generic keyword in macros but that is not implemented in gcc until 4.9. This makes efivar-native (which is a dependency to efivar) build to fail if the builder host gcc version is < 4.9.

It turns out only 'makeguids' generator needs to be built for the build arch to generate GENERATED_SOURCES for efivar target build. 'makeguids' sources/includes have no gcc version dependencies so to fix efivar build when host gcc < 4.9, we simply build 'makeguids' target for efivar-native.

this looks ok. Thanks for doing it. We can now apply the efirvar recipe updates

Quoted 34 lines
---
 meta-oe/recipes-extended/efivar/efivar_0.31.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta-oe/recipes-extended/efivar/efivar_0.31.bb +5 -2
index 6ad3b36..9d4cdc9 100644
@@ -35,11 +35,15 @@ do_compile_prepend() {
     sed -i -e s:-Werror::g ${S}/gcc.specs
 }
 
+do_compile_class-native() {
+    oe_runmake -C src makeguids
+}
+
 do_install() {
     oe_runmake install DESTDIR=${D}
 }
 
-do_install_append_class-native() {
+do_install_class-native() {
     install -D -m 0755 ${B}/src/makeguids ${D}${bindir}/makeguids
 }
 
--

2.1.4

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel