Commit 29cac208 authored by Raymond Toy's avatar Raymond Toy
Browse files

Fix #85: Let each x86 configs set optimization level

Add `COPT` variable in `Config.x86_common` to set the optimization
level (defaulting to `-O2`).  Then each `Config.x86` file can set
`COPT` as desired if the default doesn't work.

Thus, `Config.x86_linux` sets `COPT` to `-O1`, but others can use the
default value.  See issue #68.
parent d1c5289e
......@@ -45,10 +45,11 @@ endif
CPPFLAGS := $(CPP_DEFINE_OPTIONS) $(CPP_INCLUDE_OPTIONS)
CFLAGS += -Wstrict-prototypes -Wall -g -fno-omit-frame-pointer
# gcc 8.1.1 and 8.3.1 (and probably anything after 8.1.1?) won't
# produce a working lisp with -O2. Just use -O1.
CFLAGS += -O1
ASFLAGS = -g
# Default optimization level. This can be changed in the individual
# configs.
COPT = -O2
ASFLAGS = -g
ASSEM_SRC = x86-assem.S
ARCH_SRC = x86-arch.c
......
......@@ -6,6 +6,7 @@ include Config.x86_common
# you have the SDK available.
MIN_VER = -mmacosx-version-min=10.6
CFLAGS += $(COPT)
CPPFLAGS += -DDARWIN $(MIN_VER) -m32
CFLAGS += -g3 -mtune=generic
ASFLAGS += -g3 $(MIN_VER)
......
# -*- Mode: makefile -*-
include Config.x86_common
# gcc 8.1.1 and 8.3.1 (and probably anything after 8.1.1?) won't
# produce a working lisp with -O2. Just use -O1.
COPT = -O1
CFLAGS += $(COPT)
CPPFLAGS += -m32 -D__NO_CTYPE -D_GNU_SOURCE
CFLAGS += -rdynamic -march=pentium4 -mfpmath=sse -mtune=generic
......
......@@ -3,6 +3,7 @@ include Config.x86_common
CC = clang
CPPFLAGS += -m32 -D__NO_CTYPE -D_GNU_SOURCE
CFLAGS += $(COPT)
CFLAGS += -march=pentium4 -mfpmath=sse -mtune=generic
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
......
# -*- Mode: makefile -*-
include Config.x86_common
CFLAGS += $(COPT)
CPPFLAGS += -march=pentium4 -mfpmath=sse
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
......
......@@ -2,6 +2,7 @@
include Config.sparc_common
CC = cc -xlibmieee -g
CFLAGS += $(COPT)
CFLAGS += -Di386
CPP = cc -E
DEPEND_FLAGS = -xM1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment