1 # hdw - linux toolchain 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/
11 [ "$ver" = "cvs" ] && extraver=""
13 confopt="$confopt --enable-shared --with-local-prefix=$prefix"
14 confopt="$confopt --libexecdir=$prefix/lib"
16 if [ "$priority" = "1" ] ; then
17 confopt="$confopt --enable-languages=c --disable-nls"
20 ln -sf gcc $prefix/bin/cc
24 if [ "$priority" = "4" ] ; then
25 confopt="$confopt --enable-clocale=gnu --enable-threads=posix"
26 confopt="$confopt --enable-__cxa_atexit --enable-languages=c,c++"
27 confopt="$confopt --disable-libstdcxx-pch"
31 echo "patching gcc specs now"
32 for i in gcc/config/*/{pa-,}linux*.h; do
33 echo "patching $i ..."
35 sed "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \
39 for i in gcc/config/*/sysv4.h; do
40 echo "patching $i ..."
42 sed "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \
46 for i in gcc/config/sparc/linux*.h; do
47 echo "patching $i ..."
49 sed "s%/usr/lib%$prefix/lib%g" $i.orig > $i
52 echo "patching gcc/config/linux.h ..."
53 echo "#undef STANDARD_INCLUDE_DIR" >> gcc/config/linux.h
54 echo "#define STANDARD_INCLUDE_DIR 0" >> gcc/config/linux.h
56 [ -f $hdw_home_dir/packages/base/gcc/no_fix_includes.patch ] && \
57 patch -Nfp1 < $hdw_home_dir/packages/base/gcc/no_fix_includes.patch
62 mkdir -p ../gcc-build && cd ../gcc-build
63 ../gcc${extraver}/configure $confopt &&