[MLton-devel] nucleic benchmark times

Stephen Weeks MLton@mlton.org
Wed, 13 Nov 2002 16:26:29 -0800


> And I don't know how happily gcc would run out of my home directory.

It would run quite happily.  Below is the script that I used to build
gcc-3.2 when I needed it to test Brad's stuff last week.

--------------------------------------------------------------------------------

#!/bin/sh

# This script builds and installs gcc.
#
# It requires that you have obtained the following packages, whose
# tarfiles shoud be in the current directory:
#	binutils gcc
# You can find ftp sites to download binutils and gcc-core at gnu.org.

set -e

# You may need to change the version numbers below.
# You also might want to change the installation prefix.

binutils='binutils-2.11.2'
gccVers='3.2'
gcc="gcc-$gccVers"
gccTar="gcc-core-$gccVers.tar"

root=`pwd`
prefix="$root/install"

name=`basename $0`

die () {
	echo >&2 "$1"
	exit 1
}

usage () {
	die "usage: $name"
}

case "$#" in
0)
	;;
*)
	usage
	;;
esac

exists () {
	if [ ! -r "$1" ]; then
		die "$1 does not exist"
	fi
}

echo 'Checking that needed files exist.'
exists $binutils.tar
exists $gccTar

echo 'Building binutils.'
cd $root
if [ ! -d $binutils ]; then
	tar x <$binutils.tar
fi
mkdir -p build-binutils
cd build-binutils
../$binutils/configure --prefix=$prefix \
	>$root/configure-binutils-log 2>&1 ||
	die "Configure of binutils failed."
make all install >$root/build-binutils-log 2>&1 ||
	die "Build of binutils failed."

echo 'Building gcc.'
cd $root
tar x <$gccTar
mkdir -p build-gcc
cd build-gcc
../$gcc/configure --enable-languages=c --prefix=$prefix \
	>$root/configure-gcc-log 2>&1 ||
	die "Configure of gcc failed."
make all install >$root/build-gcc-log 2>&1 ||
	die "Build of gcc failed."

echo 'Success.'


-------------------------------------------------------
This sf.net email is sponsored by: Are you worried about 
your web server security? Click here for a FREE Thawte 
Apache SSL Guide and answer your Apache SSL security 
needs: http://www.gothawte.com/rd523.html
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel