1 # hdw - linux gcc package
3 # author: hackbard@hackdaworld.dyndns.org
7 # [D] gcc-4.1.1.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-4.1.1/
8 # [D] gcc-g++-4.1.1.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-4.1.1/
9 # [D] gcc-g77-4.1.1.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-4.1.1/
12 [ "$ver" = "cvs" ] && extraver=""
14 confopt="$confopt --enable-languages=c,c++,f77"
15 confopt="$confopt --enable-shared --enable-clocale=gnu"
16 confopt="$confopt --enable-threads=posix --enable-__cxa_atexit"
17 confopt="$confopt --libexecdir=$prefix/lib"
19 # unset CFLAGS CXXFLAGS
22 echo "extracting c++ and fortran sources ..."
23 tar --use-compress-program=$compress -xvf $archdir/gcc-g++-$ver.tar.bz2
24 tar --use-compress-program=$compress -xvf $archdir/gcc-g77-$ver.tar.bz2
26 echo "patching Makefile (libiberty) ..."
27 sed 's%install_to_$(INSTALL_DEST) %%' libiberty/Makefile.in > tmp~
28 mv tmp~ libiberty/Makefile.in
30 echo "patching Makefile (gcc) ..."
31 sed -e 's@^XCFLAGS =$@& -fomit-frame-pointer@' \
32 -e 's@\./fixincl\.sh@-c true@' gcc/Makefile.in > tmp~
33 mv tmp~ gcc/Makefile.in
35 echo "patching gccbug ..."
36 sed 's/@have_mktemp_command@/yes/' gcc/gccbug.in > tmp~
41 ln -sf ../usr/bin/cpp $root/lib &&
42 ln -sf gcc $root/usr/bin/cc
46 mkdir -p ../gcc-build && cd ../gcc-build
47 ../gcc${extraver}/configure $confopt