Nico Huber has submitted this change. ( https://review.coreboot.org/c/libhwbase/+/43556 )
Change subject: Makefile: Add `-gnatw_R` to suppress spurious warning ......................................................................
Makefile: Add `-gnatw_R` to suppress spurious warning
Looks like there's a new warning option that complains when the order of component declarations, component clauses, and bit-level layout do not all agree. However, we also enable `warnings are errors`. Plus, we use mismatched component representation clauses on purpose in libgfxinit's epilepsy-inducing gfxtest program to have RGB ordering on hardware that works with BGR ordering. Hardware is cursed, so silence this warning.
Change-Id: I1565e3e834cd47b7f53fd2202b38fdf01a0b7619 Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/libhwbase/+/43556 Tested-by: Nico Huber nico.h@gmx.de Reviewed-by: Nico Huber nico.h@gmx.de --- M Makefile 1 file changed, 6 insertions(+), 0 deletions(-)
Approvals: Nico Huber: Verified; Looks good to me, approved
diff --git a/Makefile b/Makefile index 01e2aae..fb4c43c 100644 --- a/Makefile +++ b/Makefile @@ -43,6 +43,8 @@ CC = $(CROSS_COMPILE)gcc GNATBIND = $(CROSS_COMPILE)gnatbind
+GCC_MAJOR = $(shell echo __GNUC__ | $(CC) -E - 2>/dev/null | tail -1) + CFLAGS += -Wuninitialized -Wall -Werror CFLAGS += -pipe -g CFLAGS += -Wstrict-aliasing -Wshadow @@ -67,6 +69,9 @@ # H Suppress warnings on hiding: # It's too annoying, you run out of ideas for identifiers fast. # +# _R Suppress warnings for out-of-order record representation clauses: +# We reorder fields on purpose. +# # T Suppress warnings for tracking of deleted conditional code: # We use static options to select code paths at compile time. # @@ -85,6 +90,7 @@ # Those messages are annoying. But don't forget to enable those, # if you need the information. ADAFLAGS += -gnatwa.eeD.HHTU.U.W.Y +ADAFLAGS += $(if $(filter 10,$(GCC_MAJOR)),-gnatw_R) # Disable style checks for now ADAFLAGS += -gnatyN