#!/bin/ksh -p # config_make.timc.sh - "configure" and "make" steps for GCC 4.x # # 4 Sep 2008 # # http://blogs.sun.com/timc/entry/building_gcc_4_x_on SRCDIR=gcc-4.3.1 #-- Relative to where we run this script from OBJDIR=objdir #-- See the GCC install documentation PREFIX=/opt/gcc4 #-- This should find gcc 3.4.3 in /usr/sfw #-- Also, we will get GNU make export PATH=/usr/gnu/bin:/bin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin:/opt/sfw/bin export CONFIG_SHELL=/bin/bash ldpath="/usr/sfw/lib:/usr/local/lib:$PREFIX/lib" export LDFLAGS="-L $ldpath -R $ldpath" export LD_OPTIONS=$LDFLAGS if [ ! -d "$SRCDIR/$OBJDIR" ]; then mkdir "$SRCDIR/$OBJDIR" fi cd $SRCDIR/$OBJDIR ../configure --with-gnu-as --with-as=/usr/sfw/bin/gas \ --without-gnu-ld --with-ld=/usr/ccs/bin/ld \ --enable-shared --enable-languages=c,c++ \ --with-gmp=/usr/local --with-mpfr=/usr/local \ --prefix=$PREFIX LDFLAGS="-R /usr/local/lib:/usr/sfw/lib" BUILD_CONCURRENCY=2 make -j $BUILD_CONCURRENCY