|
|
|
@ -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} |
|
|
|
|