Skip to content
Snippets Groups Projects
Commit 8f18e12c authored by Raymond Toy's avatar Raymond Toy
Browse files

Fix #101: Add -ftrapping-math to clang compiler options

Because lisp runs with FP traps enabled, we want the C code to honor
that.  Hence add -ftrapping-math.

Also cleaned up the options, replacing -march=pentium4 and
-mtune=generic with just -mtune=pentiume4.  Replace -mfpmath=sse (not
sure what that does) with -msse2.

Finally, update CI to do a clang build so we can verify this actually
works.
parent 408711a9
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ stages:
- install
- build
- test
- ansi-test
- benchmark
cache:
......@@ -41,7 +42,7 @@ linux:build:
#- bin/create-target.sh xcross x86_linux_clang
#- bin/cross-build-world.sh -crl -B boot-2020-04-1 xtarget xcross src/tools/cross-scripts/cross-x86-x86.lisp snapshot/bin/lisp
# Regular build using the cross-compiled result or snapshot
- bin/build.sh $bootstrap -R -C "" -o snapshot/bin/lisp
- bin/build.sh $bootstrap -R -C "x86_linux_clang" -o snapshot/bin/lisp
- bin/make-dist.sh -I dist linux-4
linux:test:
......@@ -56,15 +57,28 @@ linux:test:
# Needs artifacts from build (dist/)
- job: linux:build
artifacts: true
script:
- bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
linux:ansi-test:
stage: ansi-test
tags:
- linux
artifacts:
paths:
- ansi-test/test.out
needs:
# Needs artifacts from build (dist/)
- job: linux:build
artifacts: true
before_script:
- git clone https://gitlab.common-lisp.net/cmucl/ansi-test.git
- (cd ansi-test; git checkout rtoy-cmucl-expected-failures)
script:
- bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
- cd ansi-test
- make LISP="../dist/bin/lisp -batch -noinit -nositeinit"
- grep 'No unexpected \(successes\|failures\)' test.out
linux:benchmark:
stage: benchmark
tags:
......@@ -121,21 +135,33 @@ osx:test:
- osx
artifacts:
paths:
- ansi-test/test.out
- test.log
needs:
# Needs artifacts from build (dist/)
- job: osx:build
artifacts: true
script:
- bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
osx:ansi-test:
stage: ansi-test
tags:
- osx
artifacts:
paths:
- ansi-test/test.out
needs:
# Needs artifacts from build (dist/)
- job: osx:build
artifacts: true
before_script:
- git clone https://gitlab.common-lisp.net/cmucl/ansi-test.git
- (cd ansi-test; git checkout rtoy-cmucl-expected-failures)
script:
- bin/run-tests.sh -l dist/bin/lisp 2>&1 | tee test.log
- cd ansi-test
- make LISP="../dist/bin/lisp -batch -noinit -nositeinit"
- grep 'No unexpected \(successes\|failures\)' test.out
osx:benchmark:
stage: benchmark
tags:
......
......@@ -4,7 +4,11 @@ include Config.x86_common
CC = clang
CPPFLAGS += -m32 -D__NO_CTYPE -D_GNU_SOURCE
CFLAGS += $(COPT)
CFLAGS += -march=pentium4 -mfpmath=sse -mtune=generic
# Allow sse2 instructions (-msse2); and tune for pentium4
# (-mtune=pentium4), the first chip to have sse2; and finally generate
# code assuming instructions can trap (-ftrapping-math).
CFLAGS += -msse2 -mtune=pentium4 -ftrapping-math
UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
ASSEM_SRC += linux-stubs.S
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment