X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fforeign.test.sh;h=2e3be6c3910e537d39388764abbe877de79d20b6;hb=4e8e7b29972c51d3910951e06e8e38a671ecda88;hp=ea05cbc555fa3fdc624bb7fc87152f9bb9f91fb0;hpb=f35f14479a64dd97f93d2d91dc154bdc141d6842;p=sbcl.git diff --git a/tests/foreign.test.sh b/tests/foreign.test.sh index ea05cbc..2e3be6c 100644 --- a/tests/foreign.test.sh +++ b/tests/foreign.test.sh @@ -27,7 +27,8 @@ testfilestem=${TMPDIR:-/tmp}/sbcl-foreign-test-$$ build_so() { echo building $1.so - if [ "`uname -m`" = x86_64 ]; then + if [ "`uname -m`" = x86_64 -o "`uname -m`" = amd64 -o \ + "`uname -m`" = mips -o "`uname -m`" = mips64 ]; then CFLAGS="$CFLAGS -fPIC" fi if [ "`uname`" = Darwin ]; then @@ -39,12 +40,62 @@ build_so() { 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 -echo 'short negative_short() { return -1; }' >> $testfilestem.c -echo 'int negative_int() { return -2; }' >> $testfilestem.c -echo 'long negative_long() { return -3; }' >> $testfilestem.c +cat > $testfilestem.c < $testfilestem-b.c @@ -61,7 +112,7 @@ build_so $testfilestem-c ## Foreign definitions & load -cat > $testfilestem.def.lisp < $testfilestem.base.lisp < $testfilestem.def.lisp < $testfilestem.def.lisp < $testfilestem.def.lisp < $testfilestem.fast.lisp +cat $testfilestem.base.lisp >> $testfilestem.fast.lisp + +echo "(declaim (optimize space))" > $testfilestem.small.lisp +cat $testfilestem.base.lisp >> $testfilestem.small.lisp + # Test code cat > $testfilestem.test.lisp < $testfilestem.test.lisp < $testfilestem.test.lisp <