1 # hdw - linux toolchain gcc package
3 # author: hackbard@hackdaworld.dyndns.org
7 # [D] gcc-3.3.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.3.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//--host* /--host=$hdw_arch_build }
20 confopt="$confopt --enable-languages=c --disable-nls"
22 # use host system gcc tools
26 make_conf="BOOT_LDFLAGS=\"-static\" bootstrap"
29 ln -sf gcc $prefix/bin/cc
33 if [ "$priority" = "4" ] ; then
34 confopt="$confopt --enable-clocale=gnu --enable-threads=posix"
35 confopt="$confopt --enable-__cxa_atexit --enable-languages=c,c++"
36 confopt="$confopt --disable-libstdcxx-pch"
40 echo "patching gcc specs now"
41 for i in gcc/config/*/{pa-,}linux*.h; do
42 echo "patching $i ..."
44 sed "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \
48 for i in gcc/config/*/sysv4.h; do
49 echo "patching $i ..."
51 sed "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \
55 for i in gcc/config/sparc/linux*.h; do
56 echo "patching $i ..."
58 sed "s%/usr/lib%$prefix/lib%g" $i.orig > $i
61 echo "patching gcc/config/linux.h ..."
62 echo "#undef STANDARD_INCLUDE_DIR" >> gcc/config/linux.h
63 echo "#define STANDARD_INCLUDE_DIR 0" >> gcc/config/linux.h
65 [ -f $hdw_home_dir/packages/base/gcc/no_fix_includes.patch ] && \
66 patch -Nfp1 < $hdw_home_dir/packages/base/gcc/no_fix_includes.patch
71 mkdir -p ../gcc-build && cd ../gcc-build
72 ../gcc${extraver}/configure $confopt &&