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>
This commit is contained in:
Angel Pons 2020-07-17 20:19:51 +02:00 committed by Nico Huber
parent d822df5219
commit a3edc6ef32
1 changed files with 6 additions and 0 deletions

View File

@ -43,6 +43,8 @@ endif
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 @@ ADAFLAGS += $(CFLAGS) -gnatA -gnatec=$(gnat-adc) -gnatp
# 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 @@ ADAFLAGS += $(CFLAGS) -gnatA -gnatec=$(gnat-adc) -gnatp
# 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