ACK: [PATCH] Makefiles: workaround address-of-packed-member warnings with gcc-9

Alex Hung alex.hung at canonical.com
Tue Feb 19 07:56:11 UTC 2019


On 2019-02-18 8:47 p.m., Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> Currently fwts uses a lot of packed structures and taking the address of
> members of a packed struct is throwing up a lot of warnings with gcc-9.
> For the moment, let's disable this with -Wno-address-of-packed-member and
> fix this up for the next release in March.
> 
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/Makefile.am         | 15 ++++++++-------
>  src/acpica/Makefile.am  |  3 ++-
>  src/lib/src/Makefile.am |  3 ++-
>  3 files changed, 12 insertions(+), 9 deletions(-)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 8339f306..62c9ba8f 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -7,14 +7,15 @@
>  SUBDIRS = acpica/source/compiler lib acpica
>  
>  AM_CPPFLAGS = \
> -	-I$(top_srcdir)/src/lib/include \
> -	-I$(top_srcdir)/src/acpica/source/include \
> -	-I$(top_srcdir)/src/acpica/source/compiler \
> -	-I$(top_srcdir)/efi_runtime \
> -	`pkg-config --silence-errors --cflags json` \
> -	`pkg-config --silence-errors --cflags json-c` \
> +	-I$(top_srcdir)/src/lib/include			\
> +	-I$(top_srcdir)/src/acpica/source/include	\
> +	-I$(top_srcdir)/src/acpica/source/compiler	\
> +	-I$(top_srcdir)/efi_runtime			\
> +	`pkg-config --silence-errors --cflags json`	\
> +	`pkg-config --silence-errors --cflags json-c`	\
>  	-pthread `pkg-config --cflags glib-2.0 gio-2.0` \
> -	-Wall -Werror -Wextra
> +	-Wall -Werror -Wextra				\
> +	-Wno-address-of-packed-member
>  
>  bin_PROGRAMS = fwts
>  
> diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am
> index 0753388f..03dd9820 100644
> --- a/src/acpica/Makefile.am
> +++ b/src/acpica/Makefile.am
> @@ -29,7 +29,8 @@ AM_CPPFLAGS = 						\
>  	-I$(srcdir)/source/tools/acpiexec		\
>  	`pkg-config --silence-errors --cflags json`	\
>  	`pkg-config --silence-errors --cflags json-c`	\
> -	-Wall -fno-strict-aliasing
> +	-Wall -fno-strict-aliasing			\
> +	-Wno-address-of-packed-member
>  
>  #
>  #  We rename some of the functions so we can override them in fwts. This
> diff --git a/src/lib/src/Makefile.am b/src/lib/src/Makefile.am
> index 095a4fd9..6bcf9f86 100644
> --- a/src/lib/src/Makefile.am
> +++ b/src/lib/src/Makefile.am
> @@ -24,7 +24,8 @@ AM_CPPFLAGS = \
>  	`pkg-config --silence-errors --cflags json-c`	\
>  	`pkg-config --cflags glib-2.0 gio-2.0` 		\
>  	-DDATAROOTDIR=\"$(datarootdir)\"		\
> -	-Wall -Werror -Wextra
> +	-Wall -Werror -Wextra				\
> +	-Wno-address-of-packed-member
>  
>  pkglib_LTLIBRARIES = libfwts.la
>  
> 

Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list