diff options
author | Mike Pall <mike> | 2025-04-10 22:53:50 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2025-04-10 22:53:50 +0200 |
commit | eec7a8016c3381b949b5d84583800d05897fa960 (patch) | |
tree | af92317fd7f15758e51a9c5756bb0a6b6215293e /src | |
parent | 51d4c26ec7805d77bfc3470fdf99b73c4ef2faec (diff) | |
download | luajit-eec7a8016c3381b949b5d84583800d05897fa960.tar.gz luajit-eec7a8016c3381b949b5d84583800d05897fa960.tar.bz2 luajit-eec7a8016c3381b949b5d84583800d05897fa960.zip |
Prevent Clang UB 'optimization' which breaks integerness checks.
Thanks to Kacper Michajłow. #1351 #1355
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile index 4a56d1e8..c83abfa0 100644 --- a/src/Makefile +++ b/src/Makefile | |||
@@ -302,6 +302,9 @@ endif | |||
302 | ifneq (,$(INSTALL_LJLIBD)) | 302 | ifneq (,$(INSTALL_LJLIBD)) |
303 | TARGET_XCFLAGS+= -DLUA_LJDIR=\"$(INSTALL_LJLIBD)\" | 303 | TARGET_XCFLAGS+= -DLUA_LJDIR=\"$(INSTALL_LJLIBD)\" |
304 | endif | 304 | endif |
305 | ifeq (,$(shell $(TARGET_CC) -o /dev/null -c -x c /dev/null -fno-strict-float-cast-overflow 2>/dev/null || echo 1)) | ||
306 | TARGET_XCFLAGS+= -fno-strict-float-cast-overflow | ||
307 | endif | ||
305 | 308 | ||
306 | ############################################################################## | 309 | ############################################################################## |
307 | # Target system detection. | 310 | # Target system detection. |