X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fforeign.test.sh;h=40ed2aea64e5c5e5b823f9ceb52316172a38fd59;hb=a8781d6c5b68a6b08315e98f70a407d992e07363;hp=60f815aafde9eb29b8827ed40943b0a4b934a4e2;hpb=079ef9dad558ca07cb8178ef428bf738112174fa;p=sbcl.git diff --git a/tests/foreign.test.sh b/tests/foreign.test.sh index 60f815a..40ed2ae 100644 --- a/tests/foreign.test.sh +++ b/tests/foreign.test.sh @@ -9,7 +9,7 @@ # While most of SBCL is derived from the CMU CL system, the test # files (like this one) were written from scratch after the fork # from CMU CL. -# +# # This software is in the public domain and is provided with # absolutely no warranty. See the COPYING and CREDITS files for # more information. @@ -27,10 +27,10 @@ testfilestem=${TMPDIR:-/tmp}/sbcl-foreign-test-$$ build_so() { echo building $1.so - if [ $(uname -p) = x86_64 ]; then + if [ "$(uname -m)" = x86_64 ]; then CFLAGS="$CFLAGS -fPIC" fi - if [ $(uname) = Darwin ]; then + if [ "$(uname)" = Darwin ]; then SO_FLAGS="-bundle" else SO_FLAGS="-shared" @@ -38,7 +38,7 @@ build_so() { cc -c $1.c -o $1.o $CFLAGS ld $SO_FLAGS -o $1.so $1.o } - + echo 'int summish(int x, int y) { return 1 + x + y; }' > $testfilestem.c echo 'int numberish = 42;' >> $testfilestem.c echo 'int nummish(int x) { return numberish + x; }' >> $testfilestem.c @@ -84,8 +84,12 @@ cat > $testfilestem.def.lisp < $testfilestem.def.lisp < $testfilestem.test.lisp < $testfilestem.test.lisp <