X-Git-Url: http://git.boinkor.net/gitweb/sbcl.git/blobdiff_plain/898c92c45c812861f9e309ae1a5b5b3e7c33c01b..01b41fdd69d197da85f86a2e4f8971f3ef9dda82:/tests/run-compiler.sh diff --git a/tests/run-compiler.sh b/tests/run-compiler.sh new file mode 100644 index 0000000..3532fe3 --- /dev/null +++ b/tests/run-compiler.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +platform="${SBCL_SOFTWARE_TYPE}-${SBCL_MACHINE_TYPE}" + +case "$platform" in + SunOS-*) CC=gcc ;; + *) CC=cc ;; +esac + +args= +case "$platform" in + Darwin-X86-64) args="-arch x86_64" ;; +esac + +while [ $# -gt 0 ]; do + arg="$1" + new= + case "$arg" in + -sbcl-pic) + case "$platform" in + FreeBSD-X86-64) new=-fPIC ;; + Linux-MIPS) new=-fPIC ;; + Linux-X86-64) new=-fPIC ;; + NetBSD-PowerPC) new=-fPIC ;; + NetBSD-X86-64) new=-fPIC ;; + OpenBSD-PowerPC) new=-fPIC ;; + OpenBSD-X86-64) new=-fPIC ;; + SunOS-SPARC) new=-fPIC ;; + SunOS-X86) new=-fPIC ;; + SunOS-X86-64) new=-fPIC ;; + esac + ;; + + -sbcl-shared) + case "$platform" in + Darwin-*) new=-bundle ;; + *) new=-shared ;; + esac + ;; + + *) + break + ;; + esac + + shift + if [ x"$new" != x ]; then + args="$args $new" + fi +done + +echo "/ $CC $args $@" +"$CC" $args "$@"