[SeaBIOS] [PATCH] Makefile: Build with -Wno-address-of-packed-member

Kevin O'Connor posted 1 patch 4 years, 8 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/20190821132125.6962-1-kevin@koconnor.net
Makefile | 1 +
1 file changed, 1 insertion(+)
[SeaBIOS] [PATCH] Makefile: Build with -Wno-address-of-packed-member
Posted by Kevin O'Connor 4 years, 8 months ago
Building with gcc v9 causes lots of warnings about pointers to packed
variables.  However, SeaBIOS is limited to x86 where unaligned
reads/writes are supported by the cpu.  So, disable that warning.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index d16d1ae..5f7d537 100644
--- a/Makefile
+++ b/Makefile
@@ -68,6 +68,7 @@ COMMONCFLAGS += $(call cc-option,$(CC),-fno-pie,)
 COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
 COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
 COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,)
+COMMONCFLAGS += $(call cc-option,$(CC),-Wno-address-of-packed-member,)
 COMMA := ,
 
 CFLAGS32FLAT := $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0
-- 
2.21.0
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] Makefile: Build with -Wno-address-of-packed-member
Posted by Philippe Mathieu-Daudé 4 years, 8 months ago
On 8/21/19 3:21 PM, Kevin O'Connor wrote:
> Building with gcc v9 causes lots of warnings about pointers to packed
> variables.  However, SeaBIOS is limited to x86 where unaligned
> reads/writes are supported by the cpu.  So, disable that warning.
> 
> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index d16d1ae..5f7d537 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -68,6 +68,7 @@ COMMONCFLAGS += $(call cc-option,$(CC),-fno-pie,)
>  COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
>  COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
>  COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,)
> +COMMONCFLAGS += $(call cc-option,$(CC),-Wno-address-of-packed-member,)
>  COMMA := ,
>  
>  CFLAGS32FLAT := $(COMMONCFLAGS) -DMODE16=0 -DMODESEGMENT=0
> 
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] Makefile: Build with -Wno-address-of-packed-member
Posted by Kevin O'Connor 4 years, 8 months ago
On Wed, Aug 21, 2019 at 03:55:16PM +0200, Philippe Mathieu-Daudé wrote:
> On 8/21/19 3:21 PM, Kevin O'Connor wrote:
> > Building with gcc v9 causes lots of warnings about pointers to packed
> > variables.  However, SeaBIOS is limited to x86 where unaligned
> > reads/writes are supported by the cpu.  So, disable that warning.
> > 
> > Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>

Thanks.  I committed this patch.

-Kevin
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org