diff --git a/package/base/gcc/gcc.conf b/package/base/gcc/gcc.conf index c0e3f3e56..69342897e 100644 --- a/package/base/gcc/gcc.conf +++ b/package/base/gcc/gcc.conf @@ -109,7 +109,7 @@ custmain() { # GCC rebuilds itself using the xgcc which is build first. xgcc # should also use the cc-wrapper. It might be better to patch big - # ammounts of the gcc sources - but this should also do the job. + # amounts of the gcc sources - but this should also do the job. # export CFLAGS="$(exec -a echo bash \ -c ". gcc-${pkg_gcc_version}" 2> /dev/null)" @@ -257,6 +257,7 @@ custmain() { mv -vf $root/$prefix/lib/$gcc_lib_dir/../lib* \ $root/$prefix/lib/$gcc_lib_dir || true fi + hook_eval postmake # Rename and install binaries @@ -270,6 +271,16 @@ custmain() { done done + # GCC 4 does not install a specs file and removes old ones. + # Regenerate the file with -dumpspecs. + # + cd $builddir/inst_bin + for x in gcc ${pkg_gcc_target}-gcc ; do + [ -f "$x" -a "${pkg_gcc_version:0:1}" -ge "4" ] && \ + $x -dumpspecs > $root/$prefix/lib/$gcc_lib_dir/specs + done + + # gcc2 does not contain an own c++filt ... - so use the binutils one # if [ "$xpkg" = gcc2 ] ; then @@ -359,7 +370,7 @@ custmain() { # Inject our default optimisation options so when the user calls # gcc/g++ they match the ones used to precompile the headers ... - # Save the options affectioning optimization only. + # Save the options affecting optimization only. # if [ $ROCKCFG_DEFAULT_CC = $xpkg ]; then echo "Creating /etc/profile.d/gcc ..." @@ -522,6 +533,13 @@ gcc_cross() { rm -f $root/$prefix/.lastupdate fi + # GCC 4 does not install a specs file and removes old ones. + # Regenerate the file with -dumpspecs. + # + [ "$stagelevel" -eq 0 -a "${pkg_gcc_version:0:1}" -eq "4" ] && \ + $root/$prefix/crosscc/${arch_target}-gcc -dumpspecs > \ + $root/$prefix/lib/${gcc_lib_dir}/specs + if [ "$stagelevel" -eq 0 -o "$ROCKCFG_PSEUDONATIVE" = 1 ]; then echo "Adapting gcc specs file..." cd $root/$prefix/lib/${gcc_lib_dir} diff --git a/package/base/gcc/gcc.desc b/package/base/gcc/gcc.desc index 2747773a9..412dd1f19 100644 --- a/package/base/gcc/gcc.desc +++ b/package/base/gcc/gcc.desc @@ -71,8 +71,8 @@ #endif #if xpkg == gcc40 -[V] 4.0.1 -[D] 1866626749 gcc-4.0.1.tar.bz2 ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.0.1/ +[V] 4.0.2 +[D] 2297749519 gcc-4.0.2.tar.bz2 ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.0.2/ # [D] 870641564 protector-3.4-2.tar.gz http://www.research.ibm.com/trl/projects/security/ssp/gcc3_4/ #endif