Browse Source

Stefan Fiedler:


			
			
				rocklinux
			
			
		
Stefan Fiedler 16 years ago
parent
commit
da830fa8e7
7 changed files with 33 additions and 28 deletions
  1. +2
    -0
      architecture/mips/archtest.sh
  2. +2
    -0
      architecture/x86/archtest.sh
  3. +7
    -0
      package/base/gcc/gcc.conf
  4. +1
    -1
      package/base/gcc/parse-config
  5. +21
    -12
      package/base/glibc/glibc.conf
  6. +0
    -14
      package/base/glibc/glibc27/glibc-2.7-mips-mabi-stage0.diff
  7. +0
    -1
      scripts/parse-config

+ 2
- 0
architecture/mips/archtest.sh

@ -16,5 +16,7 @@ case "$ROCKCFG_MIPS_ABI" in
arch_machine=mips64 arch_machine=mips64
arch_target="${arch_machine}${arch_endianess}-unknown-linux-gnu" arch_target="${arch_machine}${arch_endianess}-unknown-linux-gnu"
arch_target32="mips${arch_endianess}-unknown-linux-gnu" arch_target32="mips${arch_endianess}-unknown-linux-gnu"
BUILD32="-mabi=32"
BUILD64="-mabi=$ROCKCFG_MIPS_ABI"
;; ;;
esac esac

+ 2
- 0
architecture/x86/archtest.sh

@ -15,6 +15,8 @@ else
arch_sizeof_char_p=8 arch_sizeof_char_p=8
arch_machine="x86_64" arch_machine="x86_64"
arch_target32="i686-pc-linux-gnu" arch_target32="i686-pc-linux-gnu"
BUILD32="-m32"
BUILD64="-m64"
fi fi
arch_target="${arch_machine}-unknown-linux-gnu" arch_target="${arch_machine}-unknown-linux-gnu"

+ 7
- 0
package/base/gcc/gcc.conf

@ -180,6 +180,13 @@ fi
if [ "$ROCKCFG_MULTILIB" = 0 ] ; then if [ "$ROCKCFG_MULTILIB" = 0 ] ; then
var_append extraconfopt " " "--disable-multilib" var_append extraconfopt " " "--disable-multilib"
if [ "$arch_machine" = mips64 ] ; then
# When building only 64-bit libraries and programs, tell gcc
# to build its own libraries with -mabi=64 too. --with-abi is
# available in gcc34 and above.
var_append extraconfopt " " "--with-abi=64"
fi
fi fi
custmain="custmain" custmain="custmain"

+ 1
- 1
package/base/gcc/parse-config

@ -49,7 +49,7 @@ unset x y z
if [ $stagelevel -ge 1 ] ; then if [ $stagelevel -ge 1 ] ; then
if [[ "$xpkg" = *-32bit ]] ; then if [[ "$xpkg" = *-32bit ]] ; then
export CC="${CC} ${BUILD32}" CXX="${CXX} ${BUILD32}" export CC="${CC} ${BUILD32}" CXX="${CXX} ${BUILD32}"
elif [ "$ROCKCFG_MULTILIB" = 1 ] ; then
elif [ "$BUILD64" ] ; then
export CC="${CC} ${BUILD64}" CXX="${CXX} ${BUILD64}" export CC="${CC} ${BUILD64}" CXX="${CXX} ${BUILD64}"
fi fi
fi fi

+ 21
- 12
package/base/glibc/glibc.conf

@ -29,13 +29,11 @@ pkg_glibc_cross=""
pkg_glibc_headers_only=0 pkg_glibc_headers_only=0
pkg_glibc_cc="" pkg_glibc_cc=""
if [ "$ROCKCFG_MULTILIB" = 1 ] ; then
if [[ "$xpkg" = *-32bit ]] ; then
pkg_glibc_cc="$BUILD32"
pkg_glibc_host="$arch_target32"
else
pkg_glibc_cc="$BUILD64"
fi
if [[ "$xpkg" = *-32bit ]] ; then
pkg_glibc_cc="$BUILD32"
pkg_glibc_host="$arch_target32"
elif [ "$BUILD64" ] ; then
pkg_glibc_cc="$BUILD64"
fi fi
prefix="usr" prefix="usr"
@ -69,7 +67,10 @@ if [ $stagelevel -le 2 ]; then
$confdir/glibc$pkg_glibc_version/*.patch.cross.$arch 2>/dev/null | tr '\n' ' '`" $confdir/glibc$pkg_glibc_version/*.patch.cross.$arch 2>/dev/null | tr '\n' ' '`"
fi fi
configscript="../glibc-*/configure"
# Use absolute path to configure script as e.g. the path to
# ports/sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed is based on it
# and will point to the wrong location otherwise.
configscript="$builddir/glibc-*/configure"
if [ $stagelevel -eq 0 ] ; then if [ $stagelevel -eq 0 ] ; then
pkg_glibc_headers_only=1 pkg_glibc_headers_only=1
@ -114,10 +115,18 @@ if [ "$pkg_glibc_cross" ] ; then
fi fi
fi fi
# Fix for mips when building glibc headers.
if [[ "$pkg_glibc_host" == mips* ]] ; then
if [ $pkg_glibc_headers_only = 1 ] ; then
var_append patchfiles " " "$confdir/glibc$pkg_glibc_version/glibc-*-mips-mabi-stage0.diff"
# Fix for mips/mips64 when building glibc headers.
if [ $pkg_glibc_headers_only = 1 ] ; then
if [[ "$arch_machine" == mips* ]] ; then
# don't pass mips specific options to build C compiler
var_append BUILDCC_WRAPPER_REMOVE " " "-mabi=*"
# installing headers fails if _MIPS_SZPTR (and thus _WORDSIZE)
# is not defined, with: ./bits/types.h:129:3: error: #error
if [[ "$arch_machine" == mips64* ]] ; then
var_append BUILDCC_WRAPPER_APPEND " " "-D_MIPS_SZPTR=64"
else
var_append BUILDCC_WRAPPER_APPEND " " "-D_MIPS_SZPTR=32"
fi
fi fi
fi fi

+ 0
- 14
package/base/glibc/glibc27/glibc-2.7-mips-mabi-stage0.diff

@ -1,14 +0,0 @@
In stage 0 glibc configure tries to call the build system gcc with -mabi=32,
causing test failures. Also set _MIPS_SZPTR for 32bit builds since it is not
defined elsewhere.
See http://sourceware.org/ml/crossgcc/2005-07/msg00036.html and
http://sourceware.org/ml/crossgcc/2008-01/msg00007.html
--- glibc-2.7/ports/sysdeps/mips/mips32/Makefile-orig 2003-03-29 09:15:28.000000000 +0100
+++ glibc-2.7/ports/sysdeps/mips/mips32/Makefile 2008-10-06 03:29:36.000000000 +0200
@@ -1,3 +1,3 @@
ifeq ($(filter -mabi=32,$(CC)),)
-CC += -mabi=32
+CC += -D"_MIPS_SZPTR=32"
endif

+ 0
- 1
scripts/parse-config

@ -134,7 +134,6 @@ export LC_ALL=C; umask 022
# export BUILDCXX="c++" BUILD_CXX="c++" HOSTCXX="c++" HOST_CXX="c++" # export BUILDCXX="c++" BUILD_CXX="c++" HOSTCXX="c++" HOST_CXX="c++"
export BUILDCC="gcc" BUILD_CC="gcc" HOSTCC="gcc" HOST_CC="gcc" export BUILDCC="gcc" BUILD_CC="gcc" HOSTCC="gcc" HOST_CC="gcc"
export BUILDCXX="g++" BUILD_CXX="g++" HOSTCXX="g++" HOST_CXX="g++" export BUILDCXX="g++" BUILD_CXX="g++" HOSTCXX="g++" HOST_CXX="g++"
export BUILD32="-m32" BUILD64="-m64"
if [ "$ROCKCFG_LINGUAS" == "all" ] ; then if [ "$ROCKCFG_LINGUAS" == "all" ] ; then
unset LINGUAS unset LINGUAS

Loading…
Cancel
Save