aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2022-12-14 01:26:03 +0000
committerMichael Brown <mcb30@ipxe.org>2022-12-14 01:29:49 +0000
commitb0ded89e917b48b73097d3b8b88dfa3afb264ed0 (patch)
tree492fb1d301c493d83f0a0400e19f982ee07622a8
parent54c4c1d403c1730d3c8e467910d7044a649bfbee (diff)
downloadipxe-b0ded89e917b48b73097d3b8b88dfa3afb264ed0.zip
ipxe-b0ded89e917b48b73097d3b8b88dfa3afb264ed0.tar.gz
ipxe-b0ded89e917b48b73097d3b8b88dfa3afb264ed0.tar.bz2
[build] Disable dangling pointer checking for GCCgcc12
The dangling pointer warning introduced in GCC 12 reports false positives that result in build failures. In particular, storing the address of a local code label used to record the current state of a state machine (as done in crypto/deflate.c) is reported as an error. There seems to be no way to mark the pointer type as being permitted to hold such a value, so unconditionally disable the warning. Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/Makefile.housekeeping6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 61a9cf0..658b84b 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -461,8 +461,10 @@ CFLAGS += -g
ifeq ($(CCTYPE),gcc)
CFLAGS += -ffreestanding
CFLAGS += -fcommon
-CFLAGS += -Wall -W -Wformat-nonliteral -Wno-array-bounds
-HOST_CFLAGS += -Wall -W -Wformat-nonliteral -Wno-array-bounds
+CFLAGS += -Wall -W -Wformat-nonliteral
+CFLAGS += -Wno-array-bounds -Wno-dangling-pointer
+HOST_CFLAGS += -Wall -W -Wformat-nonliteral
+HOST_CFLAGS += -Wno-array-bounds -Wno-dangling-pointer
endif
CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS)
ASFLAGS += $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS)