#!/bin/sh # build gcc for Slackware CWD=`pwd` GCC_VER=2.95.1 ARCH=gcc-$GCC_VER TARGET=i386-slackware-linux TEMPDIR=/tmp cd $TEMPDIR tar xyvf $CWD/gcc-2.95.1.tar.bz2 # install docs ( cd gcc-2.95.1 mkdir -p $TEMPDIR/package-gcc/usr/doc/gcc-2.95.1 cp -a COPYING COPYING.LIB FAQ MAINTAINERS README faq.html install \ $TEMPDIR/package-gcc/usr/doc/gcc-2.95.1 mkdir -p $TEMPDIR/package-gcc/usr/doc/gcc-2.95.1/gcc/f ( cd gcc cp -a ABOUT* BUGS COPYING* INSTALL LANG* NEWS PROBLEMS \ README* SERVICE TESTS.FLUNK $TEMPDIR/package-gcc/usr/doc/gcc-2.95.1/gcc cd f cp -a BUGS INSTALL NEWS README RELEASE-PREP \ $TEMPDIR/package-gcc/usr/doc/gcc-2.95.1/gcc/f cd ../objc mkdir -p $TEMPDIR/package-gcc/usr/doc/gcc-2.95.1/gcc/objc cp -a README $TEMPDIR/package-gcc/usr/doc/gcc-2.95.1/gcc/objc cd ../ch mkdir -p $TEMPDIR/package-gcc/usr/doc/gcc-2.95.1/gcc/ch cp -a README chill.brochure chill.texi \ $TEMPDIR/package-gcc/usr/doc/gcc-2.95.1/gcc/ch ) ) # build gcc ( mkdir gcc.build.lnx; cd gcc.build.lnx; # CFLAGS="-Wall -g1 -O2" CFLAGS="-Wall -O2" LDFLAGS=-s \ ../$ARCH/configure --prefix=/usr \ --enable-shared \ --with-gnu-ld \ --enable-threads \ --verbose \ --target=${TARGET} \ --host=${TARGET} make bootstrap; make info make check; make install prefix=$TEMPDIR/package-gcc/usr; make install-info prefix=$TEMPDIR/package-gcc/usr; # Fix stuff up: chown -R root.root $TEMPDIR/package-gcc ( cd $TEMPDIR/package-gcc/usr/info ; rm dir ; gzip -9 * ) cd $TEMPDIR/package-gcc mkdir -p lib ( cd lib ; ln -sf /usr/bin/cpp . ) ( cd usr/bin mv g++ g++-gcc-2.95.1 mv gcc gcc-2.95.1 mv g77 g77-gcc-2.95.1 mv chill chill-gcc-2.95.1 ln -sf g++-gcc-2.95.1 g++ ln -sf gcc-2.95.1 gcc ln -sf g77-gcc-2.95.1 g77 ln -sf chill-gcc-2.95.1 chill ln -sf g++ c++ ln -sf gcc cc ln -sf gcc-2.95.1 i386-slackware-linux-gcc ln -sf g77 f77 strip * chown root.bin * . ) ( cd usr/lib/gcc-lib/i386-slackware-linux/2.95.1 strip cc1* collect2 cpp f771 jc1 jvgenmain ) ( cd usr/man gzip -9 * ln -sf cccp.1.gz cpp.1.gz ln -sf g++.1.gz c++.1.gz ln -sf g77.1.gz f77.1.gz ln -sf gcc.1.gz cc.1.gz ) rmdir usr/i386-slackware-linux/include rmdir usr/i386-slackware-linux # build the tgz package ( cd $TEMPDIR/package-gcc; echo "y n" | makepkg $TEMPDIR/$ARCH.tgz ) # keep a log ) 2>&1 | tee $TEMPDIR/gcc.build.log