IGNOREPATH=/etc:/cdrom:/proc:/home:/var:/dev:/boot:/root:/tmp:/usr:/bin:/sbin:/mnt:/usr/src STRIPLIB=y STRIPBIN=y VERSION=3.3.4 PROGNAME="gcc $VERSION" DESC="\ gcc (Base GCC package with C support) \n\ \n\ GCC is the GNU Compiler Collection. \n\ \n\ This package contains those parts of the compiler collection needed to \n\ compile C code. Other packages add C++, Fortran, Objective-C, and \n\ Java support to the compiler core." BUILD=3 MAINTAINER="Mark Post " SOURCE=ftp://ftp.gnu.org/gnu/gcc/ PKGNAME=gcc-$VERSION-s390x-$BUILD TAG=ADD compile() { export PATH=$PATH:/home/s390/bin:/home/s390/s390x-slackware-linux/bin echo Unpacking tarball. Please wait... # tar -yxvf $CWD/gcc-$VERSION.tar.bz2 #return ( cd gcc-$VERSION # Fix perms/owners chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 754 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; # The following patch requires that binutils be upgraded to support the new z990 opcodes # This version, for gcc-3.3.4, was provided by Ulrich Weigand, of IBM Germany # echo \*\*\*\* gcc-$VERSION-s390-z990-june2003.diff # cat $CWD/gcc-$VERSION-s390-z990-june2003.diff | patch -p1 -E --backup --suffix=.orig # echo "****" strcmp.diff # cat $CWD/strcmp.diff | patch -p1 -E --backup --suffix=.orig2 ) mkdir gcc.build.lnx cd gcc.build.lnx ../gcc-$VERSION/configure --prefix=/usr \ --disable-shared \ --disable-threads \ --enable-languages="c" \ --disable-checking \ --with-gnu-ld \ --verbose \ --build=s390x-slackware-linux \ --host=s390x-slackware-linux \ --target=s390x-slackware-linux make } install() { cd $TMP/gcc.build.lnx make install DESTDIR=/package-gcc make -i install-info DESTDIR=/package-gcc # We use the libiberty.a from the binutils package rm /package-gcc/usr/lib/libiberty.a ( cd /package-gcc/usr/info rm -f *.gz gzip -9 * ) ( cd /package-gcc/usr/man/ for dir in 1 7; do ( cd man$dir rm -f *.gz gzip -9 *.$dir ) done ) } attributes() { chown -R root.bin $PKG/package-gcc/usr/bin } special() { cd $PKG mv package-gcc/* ./ rmdir package-gcc ( cd $PKG/usr/bin rm -f s390x-slackware-linux-gcc ln -s s390x-slackware-linux-gcc-$VERSION ) cd $CTL cat $CWD/slack-desc.gcc > slack-desc return cat > doinst.sh << EOF ( cd lib ; rm -rf cpp ) ( cd lib ; ln -sf /usr/bin/cpp cpp ) ( cd usr/bin ; rm -rf cc ) ( cd usr/bin ; ln -sf gcc cc ) ( cd usr/bin ; rm -rf gcc ) ( cd usr/bin ; ln -sf gcc-$VERSION gcc ) ( cd usr/bin ; rm -rf s390-slackware-linux-gcc-$VERSION ) ( cd usr/bin ; ln -sf gcc-$VERSION s390-slackware-linux-gcc-$VERSION ) ( cd usr/bin ; rm -rf s390-slackware-linux-gcc ) ( cd usr/bin ; ln -sf gcc-$VERSION s390-slackware-linux-gcc ) ( cd usr/lib ; rm -rf libffi.so ) ( cd usr/lib ; ln -sf libffi-2.00-beta.so libffi.so ) ( cd usr/lib ; rm -rf libgcc_s.so ) ( cd usr/lib ; ln -sf libgcc_s.so.1 libgcc_s.so ) ( cd usr/lib/gcc-lib/s390-slackware-linux/$VERSION/include ; rm -rf GL ) ( cd usr/lib/gcc-lib/s390-slackware-linux/$VERSION/include ; ln -sf root/usr/X11R6/include/GL GL ) ( cd usr/man/man1 ; rm -rf cc.1.gz ) ( cd usr/man/man1 ; ln -sf gcc.1.gz cc.1.gz ) EOF } subpacks() { return }