X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=inline;f=tests%2Fforeign.test.sh;h=bd91bfe5dd3db4d8214a628adec40ab05061aa24;hb=c3334d2307b721cfcea29e6abcd33e48487fb1ea;hp=7d207b432e32102d51a14629e02f1ce6825c810c;hpb=5e1fcdac979db9a6aebe69531229355def8c0f90;p=sbcl.git diff --git a/tests/foreign.test.sh b/tests/foreign.test.sh index 7d207b4..bd91bfe 100644 --- a/tests/foreign.test.sh +++ b/tests/foreign.test.sh @@ -26,8 +26,11 @@ testfilestem=${TMPDIR:-/tmp}/sbcl-foreign-test-$$ ## Make a little shared object files to test with. build_so() { - echo building $1.so - cc -c $1.c -o $1.o + echo building $1.so + if [ $(uname -p) = x86_64 ]; then + CFLAGS="$CFLAGS -fPIC" + fi + cc -c $1.c -o $1.o $CFLAGS ld -shared -o $1.so $1.o }