From faa7c2f393bc7b13999460293dff01ced6a6b2d0 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Fri, 2 Nov 2007 13:28:42 +0000 Subject: [PATCH] Stefan Fiedler: binutils, gcc: disable multilib support in 64-bit-only builds Build-Pkg: set multilib to lib64 in 64-bit-only builds [2007102417311823094] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8779 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/binutils/binutils.conf | 5 ++--- package/base/gcc/gcc.conf | 10 +++++----- package/base/gcc/parse-config | 6 +++--- scripts/Build-Pkg | 2 +- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/package/base/binutils/binutils.conf b/package/base/binutils/binutils.conf index b783136ca..eaa511af9 100644 --- a/package/base/binutils/binutils.conf +++ b/package/base/binutils/binutils.conf @@ -48,7 +48,8 @@ if [ $stagelevel -eq 0 ] ; then makeinstopt="install" confopt="--prefix=$root/$cross_tools \ - --host=${CLFS_HOST} --target=${CLFS_TARGET} --with-sysroot=$CLFS \ + --host=${CLFS_HOST} --target=${CLFS_TARGET} \$extraconfopt" + var_append extraconfopt " " "--with-sysroot=$CLFS \ --disable-nls" fi if [ $stagelevel -ge 3 ] ; then @@ -62,8 +63,6 @@ if [ -z "$pkg_binutils_cross" ] ; then fi if [ "$ROCKCFG_MULTILIB" = 0 ] ; then var_append extraconfopt " " "--disable-multilib" -else - var_append extraconfopt " " "--enable-multilib" fi # var_append extraconfopt " " "--enable-64-bit-bfd" # Don't treat warnings as errors. diff --git a/package/base/gcc/gcc.conf b/package/base/gcc/gcc.conf index 38c7e44b2..1056c328d 100644 --- a/package/base/gcc/gcc.conf +++ b/package/base/gcc/gcc.conf @@ -83,7 +83,8 @@ if [ "$pkg_gcc_cross" ] ; then elif [ $stagelevel -eq 0 ] ; then configprefix="" confopt="--prefix=${CLFS}/$cross_tools \ - --host=${CLFS_HOST} --target=${CLFS_TARGET} \ + --host=${CLFS_HOST} --target=${CLFS_TARGET} \$extraconfopt" + var_append extraconfopt " \ --with-sysroot=${CLFS} --disable-nls --disable-shared \ --enable-languages=c" makeopt="all-gcc" @@ -91,7 +92,8 @@ elif [ $stagelevel -eq 0 ] ; then elif [ $stagelevel -eq 1 ] ; then configprefix="" confopt="--prefix=${CLFS}/$cross_tools \ - --host=${CLFS_HOST} --target=${CLFS_TARGET} \ + --host=${CLFS_HOST} --target=${CLFS_TARGET} \$extraconfopt" + var_append extraconfopt " \ --with-sysroot=${CLFS} --disable-nls --enable-shared \ --enable-languages=c,c++ --enable-__cxa_atexit \ --enable-c99 --enable-long-long --enable-threads=posix" @@ -119,7 +121,7 @@ elif [ $stagelevel -ge 2 ] ; then # directories so we can rename them (adding version suffix) before # moving them to their final directories. # - var_append makeopt " " "prefix=/$prefix libdir=/$prefix/lib" + var_append makeopt " " "prefix=/$prefix" var_append makeinstopt " " "prefix=$root/$prefix" for x in bin info man data ; do mkdir -p $builddir/inst_$x @@ -135,8 +137,6 @@ fi if [ "$ROCKCFG_MULTILIB" = 0 ] ; then var_append extraconfopt " " "--disable-multilib" -else - var_append extraconfopt " " "--enable-multilib" fi custmain="custmain" diff --git a/package/base/gcc/parse-config b/package/base/gcc/parse-config index cf6491c3b..c3ddc85d8 100644 --- a/package/base/gcc/parse-config +++ b/package/base/gcc/parse-config @@ -20,7 +20,7 @@ # file for details. # # --- ROCK-COPYRIGHT-NOTE-END --- -if [ $stagelevel -ge 2 -o $stagelevel -eq 1 -a $pkg = glibc ] +if [ $stagelevel -ge 2 -o $stagelevel -eq 1 -a $pkg != gcc ] then # set CC, CXX and F77 environment variables @@ -46,10 +46,10 @@ for x in CC CXX F77 ; do done unset x y z -if [ "$ROCKCFG_MULTILIB" = 1 -a $stagelevel -ge 1 ] ; then +if [ $stagelevel -ge 1 ] ; then if [[ "$xpkg" = *-32bit ]] ; then export CC="${CC} ${BUILD32}" CXX="${CXX} ${BUILD32}" - else + elif [ "$ROCKCFG_MULTILIB" = 1 ] ; then export CC="${CC} ${BUILD64}" CXX="${CXX} ${BUILD64}" fi fi diff --git a/scripts/Build-Pkg b/scripts/Build-Pkg index 3a9ab0a76..c212145dc 100755 --- a/scripts/Build-Pkg +++ b/scripts/Build-Pkg @@ -523,7 +523,7 @@ else fi # -if [[ "$ROCKCFG_MULTILIB" = 0 || "$xpkg" = *-32bit ]] ; then +if [[ -z "$arch_target32" || "$xpkg" = *-32bit ]] ; then multilib="lib" else multilib="lib64"