# hdw - linux gcc package # # author: hackbard@hackdaworld.dyndns.org # # [V] 4.1.1 # [S] 2-5 # [D] gcc-4.1.1.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-4.1.1/ # [D] gcc-g++-4.1.1.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-4.1.1/ # [D] gcc-g77-4.1.1.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-4.1.1/ extraver="-${ver}" [ "$ver" = "cvs" ] && extraver="" confopt="$confopt --enable-languages=c,c++,f77" confopt="$confopt --enable-shared --enable-clocale=gnu" confopt="$confopt --enable-threads=posix --enable-__cxa_atexit" confopt="$confopt --libexecdir=$prefix/lib" # unset CFLAGS CXXFLAGS pre_install() { echo "extracting c++ and fortran sources ..." tar --use-compress-program=$compress -xvf $archdir/gcc-g++-$ver.tar.bz2 tar --use-compress-program=$compress -xvf $archdir/gcc-g77-$ver.tar.bz2 echo "patching Makefile (libiberty) ..." sed 's%install_to_$(INSTALL_DEST) %%' libiberty/Makefile.in > tmp~ mv tmp~ libiberty/Makefile.in echo "patching Makefile (gcc) ..." sed -e 's@^XCFLAGS =$@& -fomit-frame-pointer@' \ -e 's@\./fixincl\.sh@-c true@' gcc/Makefile.in > tmp~ mv tmp~ gcc/Makefile.in echo "patching gccbug ..." sed 's/@have_mktemp_command@/yes/' gcc/gccbug.in > tmp~ mv tmp~ gcc/gccbug.in } post_install() { ln -sf ../usr/bin/cpp $root/lib && ln -sf gcc $root/usr/bin/cc } build_main() { mkdir -p ../gcc-build && cd ../gcc-build ../gcc${extraver}/configure $confopt make make install }