Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 86 lines (73 sloc) 2.35 KB
# On SPARCv9 under Solaris you need to use cc since gcc doesn't support
# SPARCv9 under Solaris.
# On PowerPC64 under AIX you cannot compile the compiler with gcc since you
# get errors of the form:
# 1252-171 The displacement must be greater than or equal to
# -32768 and less than or equal to 32767.
# It might be possible to compile smaller programs with gcc. To compile the
# compiler you need to use cc. It is not clear whethr you can compile libgc.a
# and libstalin.a with one compiler and Scheme programs such as Stalin with
# another.
if [ -r /etc/debian_version ]
#if [ x"${DEBIAN_SYSTEM}" != x ]
# ARCH_OPTS="${ARCH_OPTS} -g -I/usr/include/gc"
case `uname -s`/`uname -r` in
IRIX*/*) RANLIB=touch;;
SunOS/5.*) RANLIB=touch;;
*) RANLIB=ranlib;;
# gc-Makefile.sed changed CC from cc to gcc and adds
# to CFLAGS.
# Might also try -DSILENT and either
# The Debian conditionalization has been removed since the Debian package for
# the Boehm GC doesn't make the mods from gc-Makefile.sed.
#if [ x"${DEBIAN_SYSTEM}" = x ]
# Under Debian, we have libgc, but otherwise, don't assume we have the Boehm
# GC available.
rm -rf gc6.8
gunzip -c gc6.8.tar.gz | tar xf -
rm -f gc6.8/
sed -f gc-Makefile.sed gc6.8/Makefile >gc6.8/
mv -f gc6.8/ gc6.8/Makefile
cd gc6.8
make test
cd ..
cp -f gc6.8/include/gc.h include/.
cp -f gc6.8/gc.a include/libgc.a
cp -f gc6.8/include/gc_config_macros.h include/.
$RANLIB include/libgc.a
rm -rf gc6.8
cd include
rm -f libstalin.a
gcc -c -O2 -fomit-frame-pointer -freg-struct-return xlib-c.c
ar rc libstalin.a xlib-c.o
$RANLIB libstalin.a
rm xlib-c.o
cd ..
case `./include/stalin-architecture-name` in
echo "Cannot (yet) run Stalin on this architecture"
exit 1;;
cp -f stalin-`./include/stalin-architecture-name`.c stalin.c;;
# Stalin can be compiled with -freg-struct-return on most platforms. But gcc
# and egcs have a bug on Linux/Alpha that causes them to crash when given
# -freg-struct-return.
case `uname -m`/`uname -s` in
ARCH_OPTS="${ARCH_OPTS} -freg-struct-return";;
exec make ARCH_OPTS="${ARCH_OPTS}"