diff options
author | Michael Brown <mcb30@ipxe.org> | 2018-07-08 18:12:43 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2018-07-08 18:17:18 +0100 |
commit | 1c47eb186e7e38bde2a1db528cc3557b1b300386 (patch) | |
tree | 4e0a7ea00637813e37dd3916abc31ffcfdcaf439 /src/Makefile.housekeeping | |
parent | 40956545e25103fcc4c22e496e4d1d842e2aac53 (diff) | |
download | ipxe-1c47eb186e7e38bde2a1db528cc3557b1b300386.tar.gz |
[build] Use positive-form tests when checking for supported warnings
Some versions of gcc seem to silently accept an attempt to disable an
unrecognised warning (e.g. via -Wno-stringop-truncation) but will then
report the unrecognised warning if any other error occurs during the
build, resulting in a potentially misleading error message.
Avoid this potential confusion by using the positive-form tests in
order to determine the workaround CFLAGS.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r-- | src/Makefile.housekeeping | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index b53377bd5..f8334921b 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -174,14 +174,14 @@ endif # Inhibit this. # ifeq ($(CCTYPE),gcc) -WNA_TEST = $(CC) -Wno-address -x c -c /dev/null -o /dev/null >/dev/null 2>&1 +WNA_TEST = $(CC) -Waddress -x c -c /dev/null -o /dev/null >/dev/null 2>&1 WNA_FLAGS := $(shell $(WNA_TEST) && $(ECHO) '-Wno-address') WORKAROUND_CFLAGS += $(WNA_FLAGS) # gcc 8.0 generates warnings for certain suspect string operations. Our # sources have been vetted for correct usage. Turn off these warnings. # -WNST_TEST = $(CC) -Wno-stringop-truncation -x c -c /dev/null -o /dev/null \ +WNST_TEST = $(CC) -Wstringop-truncation -x c -c /dev/null -o /dev/null \ >/dev/null 2>&1 WNST_FLAGS := $(shell $(WNST_TEST) && $(ECHO) '-Wno-stringop-truncation') WORKAROUND_CFLAGS += $(WNST_FLAGS) |