grub2: Disable address-of-packed-member warnings
PATCH 1/1 grub2: Disable address-of-packed-member warnings
gcc9 has turned this warning into error when -Werror is used, lets paper it over by turning it into a warning for now
Fixes
error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member]
--- meta/recipes-bsp/grub/grub2.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-bsp/grub/grub2.inc +1 -1
@@ -60,7 +60,7 @@ BUILD_CPPFLAGS = "" BUILD_CFLAGS = "" BUILD_CXXFLAGS = "" BUILD_LDFLAGS = "" - +CPPFLAGS += "-Wno-error=address-of-packed-member" do_configure_prepend() { # The grub2 configure script uses variables such as TARGET_CFLAGS etc # for its own purposes. Remove the OE versions from the environment to
Signature · 1 line
2.20.1
Quoted 27 lines · Khem Raj
gcc9 has turned this warning into error when -Werror is used, lets paper
it over by turning it into a warning for nowFixes
error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member]Signed-off-by Khem Raj <[email protected]>--- meta/recipes-bsp/grub/grub2.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes- renamed from meta/recipes-bsp/grub/grub2.inc +0
-0bsp/grub/grub2.inc
index8e0f86217c..28e1c210e8100644meta/recipes-bsp/grub/grub2.inc +1
-1@@ -60,7 +60,7 @@ BUILD_CPPFLAGS = "" BUILD_CFLAGS = "" BUILD_CXXFLAGS = "" BUILD_LDFLAGS = "" - +CPPFLAGS += "-Wno-error=address-of-packed-member" do_configure_prepend() { # The grub2 configure script uses variables such as
TARGET_CFLAGSetc
Quoted 2 lines
# for its own purposes. Remove the OE versions from the environment to
This failed all over the place, e.g.:
https://autobuilder.yoctoproject.org/typhoon/#/builders/48/builds/264
Cheers,
Richard
Quoted 34 lines · Richard Purdie
Quoted 27 lines · Khem Raj
gcc9 has turned this warning into error when -Werror is used, lets paper
it over by turning it into a warning for nowFixes
error: taking address of packed member of 'struct head' may result in an unaligned pointer value [-Werror=address-of-packed-member]Signed-off-by Khem Raj <[email protected]>--- meta/recipes-bsp/grub/grub2.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes- renamed from meta/recipes-bsp/grub/grub2.inc +0
-0bsp/grub/grub2.inc
index8e0f86217c..28e1c210e8100644meta/recipes-bsp/grub/grub2.inc +1
-1@@ -60,7 +60,7 @@ BUILD_CPPFLAGS = "" BUILD_CFLAGS = "" BUILD_CXXFLAGS = "" BUILD_LDFLAGS = "" - +CPPFLAGS += "-Wno-error=address-of-packed-member" do_configure_prepend() { # The grub2 configure script uses variables such as
TARGET_CFLAGSetcQuoted 2 lines
# for its own purposes. Remove the OE versions from the environment toThis failed all over the place, e.g.:
yeah this is new gcc9+ option , it did not occur to me. I think we need to make the code to see if compiler supports this option before adding it. Ideally code should be fixed but thats for laters. Drop this patch I will add a m4 macro check and add/remove it in Makefile.am
Quoted 6 lines
Cheers,
Richard