added -fwrapv to CFLAGS to ensure that signed overflows have a well defined behavior

This commit is contained in:
Fabrice Bellard 2023-12-13 19:00:17 +01:00
parent 9e52965257
commit a610598df6

View File

@ -96,6 +96,7 @@ else
endif endif
endif endif
STRIP=$(CROSS_PREFIX)strip STRIP=$(CROSS_PREFIX)strip
CFLAGS+=-fwrapv # ensure that signed overflows behave as expected
ifdef CONFIG_WERROR ifdef CONFIG_WERROR
CFLAGS+=-Werror CFLAGS+=-Werror
endif endif