Makefiles: workaround address-of-packed-member warnings with gcc-9
diff mbox series

Message ID 20190218194738.5201-1-colin.king@canonical.com
State Accepted
Headers show
Series
  • Makefiles: workaround address-of-packed-member warnings with gcc-9
Related show

Commit Message

Colin Ian King Feb. 18, 2019, 7:47 p.m. UTC
From: Colin Ian King <colin.king@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@canonical.com>
---
 src/Makefile.am         | 15 ++++++++-------
 src/acpica/Makefile.am  |  3 ++-
 src/lib/src/Makefile.am |  3 ++-
 3 files changed, 12 insertions(+), 9 deletions(-)

Comments

Alex Hung Feb. 19, 2019, 7:56 a.m. UTC | #1
On 2019-02-18 8:47 p.m., Colin King wrote:
> From: Colin Ian King <colin.king@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@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@canonical.com>
ivanhu Feb. 19, 2019, 7:58 a.m. UTC | #2
On 2/19/19 3:47 AM, Colin King wrote:
> From: Colin Ian King <colin.king@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@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: Ivan Hu <ivan.hu@canonical.com>

Patch
diff mbox series

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