]> git.kaiwu.me - quickjs.git/commitdiff
added -fwrapv to CFLAGS to ensure that signed overflows have a well defined behavior
authorFabrice Bellard <fabrice@bellard.org>
Wed, 13 Dec 2023 18:00:17 +0000 (19:00 +0100)
committerFabrice Bellard <fabrice@bellard.org>
Wed, 13 Dec 2023 18:00:17 +0000 (19:00 +0100)
Makefile

index 39bd3ad63cef5c333f46a898cfd0c5f845dc429d..082fc734547dab514b29122cdc63a6c9225ac3c2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -96,6 +96,7 @@ else
   endif
 endif
 STRIP=$(CROSS_PREFIX)strip
+CFLAGS+=-fwrapv # ensure that signed overflows behave as expected
 ifdef CONFIG_WERROR
 CFLAGS+=-Werror
 endif