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 #