obsolete instance protocol and class-slots
[sbcl.git] / tests / run-compiler.sh
1 #!/bin/sh
2
3 platform="${SBCL_SOFTWARE_TYPE}-${SBCL_MACHINE_TYPE}"
4
5 if [ -z "$CC" ]
6 then
7     CC=cc
8 fi
9
10 args=
11 case "$platform" in
12     Darwin-X86-64) args="-arch x86_64" ;;
13     SunOS-X86-64)  args=-m64 ;;
14 esac
15
16 case "$platform" in
17     Darwin-X86) args="-arch i386" ;;
18 esac
19
20 while [ $# -gt 0 ]; do
21     arg="$1"
22     new=
23     case "$arg" in
24         -sbcl-pic)
25             case "$platform" in
26                 FreeBSD-X86-64)  new=-fPIC ;;
27                 Linux-MIPS)      new=-fPIC ;;
28                 Linux-X86-64)    new=-fPIC ;;
29                 NetBSD-PowerPC)  new=-fPIC ;;
30                 NetBSD-X86-64)   new=-fPIC ;;
31                 OpenBSD-PowerPC) new=-fPIC ;;
32                 OpenBSD-X86-64)  new=-fPIC ;;
33                 SunOS-SPARC)     new=-fPIC ;;
34                 SunOS-X86)       new=-fPIC ;;
35                 SunOS-X86-64)    new=-fPIC ;;
36             esac
37             ;;
38
39         -sbcl-shared)
40             case "$platform" in
41                 Darwin-*)        new=-bundle ;;
42                 *)               new=-shared ;;
43             esac
44             ;;
45
46         *)
47             break
48             ;;
49     esac
50
51     shift
52     if [ x"$new" != x ]; then
53         args="$args $new"
54     fi
55 done
56
57 echo "/ $CC $args $@"
58 "$CC" $args "$@"