From 61c7126f5a84b6552aa9944e3bd05058517c2661 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 23 Feb 2006 17:08:28 +0000 Subject: [PATCH] Clifford Wolf: Some fixes for building cross compilers [2006012019251532150] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7080 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/gcc/gcc.conf | 7 ++++--- package/base/gcc/gcc.desc | 4 ++-- package/base/glibc/glibc.conf | 10 +++++++--- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/package/base/gcc/gcc.conf b/package/base/gcc/gcc.conf index f8b889326..b176157a4 100644 --- a/package/base/gcc/gcc.conf +++ b/package/base/gcc/gcc.conf @@ -535,9 +535,10 @@ gcc_cross() { # GCC 4 does not install a specs file and removes old ones. # Regenerate the file with -dumpspecs. # - [ "${pkg_gcc_version:0:1}" -ge "4" ] && \ - $root/$prefix/crosscc/${arch_target}-gcc -dumpspecs > \ - $root/$prefix/lib/${gcc_lib_dir}/specs + if [ "${pkg_gcc_version:0:1}" -ge "4" ]; then + [ "$stagelevel" -eq 0 ] && $root/$prefix/crosscc/${pkg_gcc_target}-gcc -dumpspecs > $root/$prefix/lib/${gcc_lib_dir}/specs + [ "$stagelevel" -ne 0 ] && $root/$prefix/bin/${pkg_gcc_target}-gcc -dumpspecs > $root/$prefix/lib/${gcc_lib_dir}/specs + fi if [ "$stagelevel" -eq 0 -o "$ROCKCFG_PSEUDONATIVE" = 1 ]; then echo "Adapting gcc specs file..." diff --git a/package/base/gcc/gcc.desc b/package/base/gcc/gcc.desc index 8cc6cf1d2..9e57bbeea 100644 --- a/package/base/gcc/gcc.desc +++ b/package/base/gcc/gcc.desc @@ -70,13 +70,13 @@ [D] 365541092 protector-3.4.4-1.tar.gz http://www.research.ibm.com/trl/projects/security/ssp/gcc3_4_4/ #endif -#if xpkg == gcc40 +#if xpkg == gcc40.* [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 -#if xpkg == gcc41 +#if xpkg == gcc41.* [V] 4.1-20050424 [D] 351759757 gcc-4.1-20050424.tar.bz2 ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-20050424/ # [D] 870641564 protector-3.4-2.tar.gz http://www.research.ibm.com/trl/projects/security/ssp/gcc3_4/ diff --git a/package/base/glibc/glibc.conf b/package/base/glibc/glibc.conf index 4eacd1dcf..220a08ac9 100644 --- a/package/base/glibc/glibc.conf +++ b/package/base/glibc/glibc.conf @@ -44,6 +44,9 @@ esac pkg_glibc_linuxthreads=1 [ "$ROCKCFG_PKG_GLIBC23_LINUXTHREADS" = "0" ] && pkg_glibc_linuxthreads=0 +# fall back to linuxthreads for cross glibcs +[ -n "$pkg_glibc_cross" ] && pkg_glibc_linuxthreads=1 + #--------------------------------- if [ $pkg_glibc_version = 22 ]; then @@ -143,9 +146,11 @@ glibc_custmain() { if [ $pkg_glibc_linuxthreads = 1 ]; then temp_arch_target="$arch_target" temp_arch_build="$arch_build" + configure_without_tls="--without-tls" else temp_arch_target="${arch_target/i386/i486}" temp_arch_build="${arch_build/i386/i486}" + configure_without_tls="" fi # Disable glibc internal debuging but build debuging and profile @@ -155,7 +160,7 @@ glibc_custmain() { --with-gnu-binutils --enable-add-ons"$ADDONS" $G_PROFILE \ --with-headers=$root/$prefix/include --with-gd=/$prefix \ --with-gd-lib=/$prefix/lib --with-gd-include=/$prefix/include \ - --cache-file=config.cache \ + $configure_without_tls --cache-file=config.cache \ --build=${temp_arch_build} --host=${temp_arch_target} eval $MAKE prefix=/usr slibdir=/lib sysconfdir=/etc all @@ -383,5 +388,4 @@ if [ $stagelevel -eq 1 -a -f $confdir/glibc$pkg_glibc_version/no_path_in_glibcso then var_append patchfiles " " $confdir/glibc$pkg_glibc_version/no_path_in_glibcso.diff fi -[ $stagelevel -ne 1 ] && var_remove patchfiles "$confdir/glibc$pkg_glibc_version/gcc_eh.patch.cross" -[ -n "$pkg_glibc_cross" ] && var_append patchfiles " " "$confdir/glibc$pkg_glibc_version/gcc_eh.patch.cross" +