From bef32fba3db6fe6862a544698f99a68454b8fa70 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Mon, 17 Jul 2006 13:29:49 +0000 Subject: [PATCH] Stefan Fiedler: gcc: fix cross-compiling gcc4x in stage 1 [2006071317242932736] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7738 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/gcc/gcc.conf | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/package/base/gcc/gcc.conf b/package/base/gcc/gcc.conf index f16edbc91..d751a4e24 100644 --- a/package/base/gcc/gcc.conf +++ b/package/base/gcc/gcc.conf @@ -264,10 +264,17 @@ custmain() { # 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 + if [ "${pkg_gcc_version:0:1}" -ge "4" ]; then + if [ "$ROCKCFG_CROSSBUILD" == 1 ]; then + $root/ROCK/tools.cross/crosscc/${pkg_gcc_target}-gcc -dumpspecs > \ + $root/${prefix}/lib/${gcc_lib_dir}/specs + else + for x in gcc ${pkg_gcc_target}-gcc ; do + [ -f "${x}" ] && ./${x} -dumpspecs > \ + $root/${prefix}/lib/${gcc_lib_dir}/specs + done + fi + fi # Rename and install binaries #