From 8a09cf6e06fd6f5bbc7abfb4d9c4abee2658fa71 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Thu, 15 May 2008 13:45:26 +0000 Subject: [PATCH] 1.0.16.30: couple of small Darwin cleanups * Add -lpthread os OS_LIBS on x86 builds as well, since malloc() may not be thread-safe without it (but with it it apparently should be...) * Pass -arch x86_64 to the C compiler in foreign.test.sh when doing 64 bit builds on Darwin, since x86 is the default there. --- src/runtime/Config.x86-64-darwin | 7 +++---- src/runtime/Config.x86-darwin | 3 +++ tests/foreign.test.sh | 3 +++ version.lisp-expr | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/runtime/Config.x86-64-darwin b/src/runtime/Config.x86-64-darwin index 570d2b2..1f2b66e 100644 --- a/src/runtime/Config.x86-64-darwin +++ b/src/runtime/Config.x86-64-darwin @@ -12,16 +12,15 @@ CFLAGS = -g -Wall -O2 -fdollars-in-identifiers OS_SRC = bsd-os.c x86-64-bsd-os.c darwin-os.c x86-64-darwin-os.c darwin-dlshim.c darwin-langinfo.c OS_LIBS = -lSystem -lc -ldl +ifdef LISP_FEATURE_SB_THREAD + OS_LIBS += -lpthread +endif ASSEM_SRC = x86-64-assem.S ldso-stubs.S ARCH_SRC = x86-64-arch.c LINKFLAGS += -arch x86_64 -dynamic -twolevel_namespace -bind_at_load -pagezero_size 0x100000 -OS_LIBS += $(shell if grep LISP_FEATURE_SB_THREAD genesis/config.h \ - > /dev/null 2>&1; \ - then echo "-lpthread"; fi) - CFLAGS += -arch x86_64 -fno-omit-frame-pointer -pagezero_size 0x100000 GC_SRC = gencgc.c diff --git a/src/runtime/Config.x86-darwin b/src/runtime/Config.x86-darwin index b473b77..08801d5 100644 --- a/src/runtime/Config.x86-darwin +++ b/src/runtime/Config.x86-darwin @@ -12,6 +12,9 @@ CFLAGS = -g -Wall -O2 -fdollars-in-identifiers OS_SRC = bsd-os.c x86-bsd-os.c darwin-os.c x86-darwin-os.c darwin-dlshim.c darwin-langinfo.c OS_LIBS = -lSystem -lc -ldl +ifdef LISP_FEATURE_SB_THREAD + OS_LIBS += -lpthread +endif CC = gcc diff --git a/tests/foreign.test.sh b/tests/foreign.test.sh index 6e76133..8c8a79c 100644 --- a/tests/foreign.test.sh +++ b/tests/foreign.test.sh @@ -36,6 +36,9 @@ build_so() ( esac if [ "`uname`" = Darwin ]; then SO_FLAGS="-bundle" + if run_sbcl --eval '(sb-ext:quit :unix-status #+x86-64 0 #-x86-64 1)'; then + CFLAGS="$CFLAGS -arch x86_64" + fi else SO_FLAGS="-shared" fi diff --git a/version.lisp-expr b/version.lisp-expr index 93fb676..1c3aacc 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.16.29" +"1.0.16.30" -- 1.7.10.4