1.0.16.30: couple of small Darwin cleanups
authorNikodemus Siivola <nikodemus@random-state.net>
Thu, 15 May 2008 13:45:26 +0000 (13:45 +0000)
committerNikodemus Siivola <nikodemus@random-state.net>
Thu, 15 May 2008 13:45:26 +0000 (13:45 +0000)
 * 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
src/runtime/Config.x86-darwin
tests/foreign.test.sh
version.lisp-expr

index 570d2b2..1f2b66e 100644 (file)
 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
index b473b77..08801d5 100644 (file)
@@ -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
 
index 6e76133..8c8a79c 100644 (file)
@@ -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
index 93fb676..1c3aacc 100644 (file)
@@ -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"