mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-14 15:36:34 +00:00
* 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.
40 lines
937 B
Plaintext
Executable File
40 lines
937 B
Plaintext
Executable File
# Default values for Maiko makefile variables
|
|
# These get overridden by OS and hardware-specific stuff
|
|
# in sub-makefiles
|
|
|
|
SRCDIR = ../src/
|
|
INCDIR = ../inc/
|
|
INCLUDEDIR = ../include/
|
|
LIBDIR = ../lib
|
|
BINDIR = ./
|
|
RELDIR = ../RELEASE/
|
|
MAIN = _main
|
|
RANLIB = ranlib
|
|
AR = ar rcv
|
|
ANSICC = $(CC)
|
|
|
|
# Compiler flags
|
|
CLANG_CFLAGS = -std=gnu89 -funsigned-char -fno-strict-aliasing -fwrapv
|
|
GCC_CFLAGS = -std=gnu89 -funsigned-char -fno-strict-aliasing -fwrapv
|
|
|
|
# for the files that need to be included in byte-swapped implementations:
|
|
BYTESWAPFILES =
|
|
SXHASHFILE =
|
|
BITBLTFILE =
|
|
DLPIFILES =
|
|
|
|
# for files needed by X windows version
|
|
XFILES =
|
|
|
|
# for files needed by color (actually files NOT needed by X)
|
|
COLORFILES =
|
|
|
|
# Flags to include inthe linking of various S/W
|
|
# LDFLAGS - in emulator itself (e.g., ldesingle)
|
|
# LDELDFLAGS - in "lde" unix-comm forker.
|
|
# LDEETHERLDFLAGS - in "ldeether" ethernet kick-start
|
|
LDFLAGS =
|
|
LDELDFLAGS =
|
|
LDEETHERLDFLAGS =
|
|
|