All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] grub2: Disable address-of-packed-member warnings
@ 2019-02-06  8:44 Khem Raj
  2019-02-06 20:23 ` Richard Purdie
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2019-02-06  8:44 UTC (permalink / raw)
  To: openembedded-core

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]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-bsp/grub/grub2.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 8e0f86217c..28e1c210e8 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -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
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] grub2: Disable address-of-packed-member warnings
  2019-02-06  8:44 [PATCH] grub2: Disable address-of-packed-member warnings Khem Raj
@ 2019-02-06 20:23 ` Richard Purdie
  2019-02-06 20:48   ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Purdie @ 2019-02-06 20:23 UTC (permalink / raw)
  To: Khem Raj, openembedded-core

On Wed, 2019-02-06 at 00:44 -0800, Khem Raj wrote:
> 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]
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-bsp/grub/grub2.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-
> bsp/grub/grub2.inc
> index 8e0f86217c..28e1c210e8 100644
> --- a/meta/recipes-bsp/grub/grub2.inc
> +++ b/meta/recipes-bsp/grub/grub2.inc
> @@ -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

This failed all over the place, e.g.:

https://autobuilder.yoctoproject.org/typhoon/#/builders/48/builds/264

Cheers,

Richard





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] grub2: Disable address-of-packed-member warnings
  2019-02-06 20:23 ` Richard Purdie
@ 2019-02-06 20:48   ` Khem Raj
  0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2019-02-06 20:48 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Patches and discussions about the oe-core layer

On Wed, Feb 6, 2019 at 12:23 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Wed, 2019-02-06 at 00:44 -0800, Khem Raj wrote:
> > 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]
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >  meta/recipes-bsp/grub/grub2.inc | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-
> > bsp/grub/grub2.inc
> > index 8e0f86217c..28e1c210e8 100644
> > --- a/meta/recipes-bsp/grub/grub2.inc
> > +++ b/meta/recipes-bsp/grub/grub2.inc
> > @@ -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
>
> This failed all over the place, e.g.:
>
> https://autobuilder.yoctoproject.org/typhoon/#/builders/48/builds/264
>

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

> Cheers,
>
> Richard
>
>
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-06 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-06  8:44 [PATCH] grub2: Disable address-of-packed-member warnings Khem Raj
2019-02-06 20:23 ` Richard Purdie
2019-02-06 20:48   ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.