mirror of
https://github.com/ipxe/ipxe
synced 2025-12-16 01:21:10 +03:00
[build] Disable dangling pointer checking for GCC
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>
This commit is contained in:
@@ -461,8 +461,10 @@ CFLAGS += -g
|
|||||||
ifeq ($(CCTYPE),gcc)
|
ifeq ($(CCTYPE),gcc)
|
||||||
CFLAGS += -ffreestanding
|
CFLAGS += -ffreestanding
|
||||||
CFLAGS += -fcommon
|
CFLAGS += -fcommon
|
||||||
CFLAGS += -Wall -W -Wformat-nonliteral -Wno-array-bounds
|
CFLAGS += -Wall -W -Wformat-nonliteral
|
||||||
HOST_CFLAGS += -Wall -W -Wformat-nonliteral -Wno-array-bounds
|
CFLAGS += -Wno-array-bounds -Wno-dangling-pointer
|
||||||
|
HOST_CFLAGS += -Wall -W -Wformat-nonliteral
|
||||||
|
HOST_CFLAGS += -Wno-array-bounds -Wno-dangling-pointer
|
||||||
endif
|
endif
|
||||||
CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS)
|
CFLAGS += $(WORKAROUND_CFLAGS) $(EXTRA_CFLAGS)
|
||||||
ASFLAGS += $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS)
|
ASFLAGS += $(WORKAROUND_ASFLAGS) $(EXTRA_ASFLAGS)
|
||||||
|
|||||||
Reference in New Issue
Block a user