[Git][cmucl/cmucl][master] 2 commits: Fix #85: Let each x86 configs set optimization level

Raymond Toy gitlab at common-lisp.net
Thu Aug 27 00:36:32 UTC 2020



Raymond Toy pushed to branch master at cmucl / cmucl


Commits:
29cac208 by Raymond Toy at 2020-08-27T00:36:27+00:00
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.

- - - - -
d0b192cd by Raymond Toy at 2020-08-27T00:36:28+00:00
Merge branch 'issue-85-opt-level-set-in-x86-config' into 'master'

Fix #85: Let each x86 configs set optimization level

Closes #85

See merge request cmucl/cmucl!52
- - - - -


6 changed files:

- src/lisp/Config.x86_common
- src/lisp/Config.x86_darwin
- src/lisp/Config.x86_linux
- src/lisp/Config.x86_linux_clang
- src/lisp/Config.x86_netbsd
- src/lisp/Config.x86_solaris_sunc


Changes:

=====================================
src/lisp/Config.x86_common
=====================================
@@ -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


=====================================
src/lisp/Config.x86_darwin
=====================================
@@ -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)


=====================================
src/lisp/Config.x86_linux
=====================================
@@ -1,6 +1,10 @@
 # -*- 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
 


=====================================
src/lisp/Config.x86_linux_clang
=====================================
@@ -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 &


=====================================
src/lisp/Config.x86_netbsd
=====================================
@@ -1,6 +1,7 @@
 # -*- Mode: makefile -*-
 include Config.x86_common
 
+CFLAGS += $(COPT)
 CPPFLAGS += -march=pentium4 -mfpmath=sse
 
 UNDEFSYMPATTERN = -Xlinker -u -Xlinker &


=====================================
src/lisp/Config.x86_solaris_sunc
=====================================
@@ -2,6 +2,7 @@
 include Config.sparc_common
 
 CC = cc -xlibmieee -g
+CFLAGS += $(COPT)
 CFLAGS += -Di386
 CPP = cc -E
 DEPEND_FLAGS = -xM1



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/d1c5289eb069df2ecdbac38e672c8324da8a42c4...d0b192cd3cf63abb94ecc75dabfabd0dd82b4d4c

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/d1c5289eb069df2ecdbac38e672c8324da8a42c4...d0b192cd3cf63abb94ecc75dabfabd0dd82b4d4c
You're receiving this email because of your account on gitlab.common-lisp.net.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20200827/867b10e8/attachment-0001.htm>


More information about the cmucl-cvs mailing list