X-Git-Url: https://hackdaworld.org/gitweb/?p=hdw-linux%2Fhdw-linux.git;a=blobdiff_plain;f=packages%2Ftoolchain%2Fgcc%2Fgcc;h=6498a8989c888451bbe5f7fdb6335f8c5efcbaa6;hp=39e2b24aea29ade6b54bad8d44ad9c287b26fdef;hb=8dd2356c22327a15f0e16abbc887c4f72fc62985;hpb=6ae193981fcc05dcc495b4bde92cb8fd290ee4dd diff --git a/packages/toolchain/gcc/gcc b/packages/toolchain/gcc/gcc index 39e2b24..6498a89 100644 --- a/packages/toolchain/gcc/gcc +++ b/packages/toolchain/gcc/gcc @@ -2,9 +2,9 @@ # # author: hackbard@hackdaworld.dyndns.org # -# [V] 3.3.4 +# [V] 4.1.1 # [S] 0-1 0-4 -# [D] gcc-3.3.4.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-3.3.4/ +# [D] gcc-4.1.1.tar.bz2 ftp://ftp.fu-berlin.de/unix/gnu/gcc/gcc-4.1.1/ extraver="-$ver" @@ -13,20 +13,11 @@ extraver="-$ver" confopt="$confopt --enable-shared --with-local-prefix=$prefix" confopt="$confopt --libexecdir=$prefix/lib" -unset CFLAGS - if [ "$priority" = "1" ] ; then - confopt=${confopt//--host* /--host=$hdw_arch_build } confopt="$confopt --enable-languages=c --disable-nls" - # use host system gcc tools - export CC="gcc" - export CXX="c++" - - make_conf="BOOT_LDFLAGS=\"-static\" bootstrap" - post_install() { - ln -sf gcc $prefix/bin/cc + ln -vsf gcc $prefix/bin/cc } fi @@ -37,33 +28,27 @@ if [ "$priority" = "4" ] ; then make_conf="" pre_install() { + # no fix includes + echo "patching (no fixincludes)" + sed -e 's@\./fixinc\.sh@-c true@' \ + -e 's@^XCFLAGS =$@/& -fomit-frame-pointer@' \ + gcc/Makefile.in > tmp~ + mv tmp~ gcc/Makefile.in + + # specs echo "patching gcc specs now" - for i in gcc/config/*/{pa-,}linux*.h; do - echo "patching $i ..." - mv $i $i.orig - sed "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \ - $i.orig > $i - done - # patch sysv4 entries - for i in gcc/config/*/sysv4.h; do + for i in `grep -l dynamic-linker gcc/config/*/*.h`; do echo "patching $i ..." mv $i $i.orig - sed "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \ + sed -e "s%-dynamic-linker /lib%-dynamic-linker $prefix/lib%g" \ + -e "s%\(^#define LINK.* -Y P,\)\(/usr\)\(.*\)%\1$prefix\3%g" \ $i.orig > $i done - # sparc specific - for i in gcc/config/sparc/linux*.h; do - echo "patching $i ..." - mv $i $i.orig - sed "s%/usr/lib%$prefix/lib%g" $i.orig > $i - done - # general linux.h + + # general linux.h / remove default include search path echo "patching gcc/config/linux.h ..." echo "#undef STANDARD_INCLUDE_DIR" >> gcc/config/linux.h echo "#define STANDARD_INCLUDE_DIR 0" >> gcc/config/linux.h - # no fix includes - [ -f $hdw_home_dir/packages/base/gcc/no_fix_includes.patch ] && \ - patch -Nfp1 < $hdw_home_dir/packages/base/gcc/no_fix_includes.patch } fi