1.0.44.33: ir2tran: Correctly set up d-x closure values for tail-local-calls.
[sbcl.git] / tests / foreign.test.sh
index c9989bc..bc97a83 100644 (file)
@@ -30,22 +30,7 @@ PUNT=$EXIT_TEST_WIN
 
 build_so() (
   echo building $1.so
-  set +u
-  case "`uname -m`" in
-      x86_64|amd64|mips|mips64)
-         CFLAGS="$CFLAGS -fPIC"
-         ;;
-  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
-  cc -c $1.c -o $1.o $CFLAGS
-  ld $SO_FLAGS -o $1.so $1.o  
+  /bin/sh ../run-compiler.sh -sbcl-pic -sbcl-shared "$1.c" -o "$1.so"
 )
 
 # We want to bail out in case any of these Unix programs fails.