mirror of
https://github.com/Interlisp/maiko.git
synced 2026-04-26 12:27:32 +00:00
Update how we configure gcc / clang command lines. (#103)
* Move clang/gcc options into makefile-header. This puts all of the shared options into a single place so that we can easily update it. * Add -fwrapv to the clang/gcc command lines. This is a step along the way to fixing interlisp/medley#90. Enabling `-fwrapv` will let overflow checks that rely upon undefined behavior to work correctly. Without this, with modern versions of clang and gcc, the overflow checks in the C code are eliminated by the compiler, resulting in incorrect behavior on the part of Maiko. See the linked bug for details and discussion. Hopefully, this usage of `-fwrapv` will go away once we're using the correct compiler builtins to detect and handle overflow correctly.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Options for Linux, Intel 386/486 and X-Window
|
||||
|
||||
#CC = gcc -m32 -std=gnu89 -fno-omit-frame-pointer -Wall -Wextra -fwrapv -fno-aggressive-loop-optimizations -fno-strict-aliasing
|
||||
CC = clang -m32 -std=gnu89 -funsigned-char -fno-strict-aliasing
|
||||
#CC = gcc -m32 $(GCC_CFLAGS) -fno-omit-frame-pointer -Wall -Wextra -fno-aggressive-loop-optimizations
|
||||
CC = clang -m32 $(CLANG_CFLAGS)
|
||||
XFILES = $(OBJECTDIR)xmkicon.o \
|
||||
$(OBJECTDIR)xbbt.o \
|
||||
$(OBJECTDIR)dspif.o \
|
||||
|
||||
Reference in New Issue
Block a user