1 # hdw - linux toolchain gcc package
3 # author: hackbard@hackdaworld.dyndns.org
7 # [D] gcc-3.4.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.4.4/
11 [ "$ver" = "cvs" ] && extraver=""
13 confopt="$confopt --enable-shared --with-local-prefix=$prefix"
14 confopt="$confopt --libexecdir=$prefix/lib"
18 if [ "$priority" = "1" ] ; then
19 confopt="$confopt --enable-languages=c --disable-nls"
21 # use host system tools
22 hdw_arch_prefix="" ; hdw_cflags=""
23 . ./scripts/optimization
27 ln -sf gcc $prefix/bin/cc
31 if [ "$priority" = "4" ] ; then
32 confopt="$confopt --enable-clocale=gnu --enable-threads=posix"
33 confopt="$confopt --enable-__cxa_atexit --enable-languages=c,c++"
34 confopt="$confopt --disable-libstdcxx-pch"
38 echo "patching gcc specs now"
39 for i in gcc/config/*/{pa-,}linux*.h; do
40 echo "patching $i ..."
42 sed "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \
46 for i in gcc/config/*/sysv4.h; do
47 echo "patching $i ..."
49 sed "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \
53 for i in gcc/config/sparc/linux*.h; do
54 echo "patching $i ..."
56 sed "s%/usr/lib%$prefix/lib%g" $i.orig > $i
59 echo "patching gcc/config/linux.h ..."
60 echo "#undef STANDARD_INCLUDE_DIR" >> gcc/config/linux.h
61 echo "#define STANDARD_INCLUDE_DIR 0" >> gcc/config/linux.h
63 [ -f $hdw_home_dir/packages/base/gcc/no_fix_includes.patch ] && \
64 patch -Nfp1 < $hdw_home_dir/packages/base/gcc/no_fix_includes.patch
69 mkdir -p ../gcc-build && cd ../gcc-build
70 ../gcc${extraver}/configure $confopt &&