diff options
author | 2011-03-06 03:09:55 +0800 | |
---|---|---|
committer | 2011-03-06 03:09:55 +0800 | |
commit | 3f0348bfe8ebf655d13578aa29fce6cc455842ee (patch) | |
tree | b0e214f4673eab8f11bbe71c54299d651bc4a1c4 | |
parent | updated glibc to 2.12.2, removed 2.11.2, sync eblit with portage (diff) | |
download | loongson-3f0348bfe8ebf655d13578aa29fce6cc455842ee.tar.gz loongson-3f0348bfe8ebf655d13578aa29fce6cc455842ee.tar.bz2 loongson-3f0348bfe8ebf655d13578aa29fce6cc455842ee.zip |
modified glibc eblit for mips n32 cross toolchain
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
-rw-r--r-- | sys-libs/glibc/files/eblits/src_compile.eblit | 11 | ||||
-rw-r--r-- | sys-libs/glibc/files/eblits/src_install.eblit | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/sys-libs/glibc/files/eblits/src_compile.eblit b/sys-libs/glibc/files/eblits/src_compile.eblit index c19fecd..00ea20f 100644 --- a/sys-libs/glibc/files/eblits/src_compile.eblit +++ b/sys-libs/glibc/files/eblits/src_compile.eblit @@ -150,6 +150,17 @@ toolchain-glibc_headers_compile() { libc_cv_z_nodelete=yes \ libc_cv_z_nodlopen=yes \ libc_cv_z_relro=yes + libc_cv_mips_tls=yes + + if [[ ${CTARGET} == "mips64el-unknown-linux-gnu" ]] ; then + # remove "-n32" gcc switch, since gcc for other arch don't have this + sed -i 's/-mabi=$mips_config_abi//g' "${S}"/ports/sysdeps/mips/preconfigure + sed -i 's/CC/CFLAGS/' "${S}"/ports/sysdeps/mips/mips64/n32/Makefile + sed -i 's/CC/CFLAGS/' "${S}"/ports/sysdeps/mips/mips64/n64/Makefile + # fix stdio_lim.h missing problem + # if you are building a n64 system, you may need to replace 32 with 64 + sed -i 's/_MIPS_SZPTR/32/' "${S}"/ports/sysdeps/mips/bits/wordsize.h + fi # Pick out the correct location for build headers local ports="" myconf="--disable-sanity-checks --enable-hacker-mode" diff --git a/sys-libs/glibc/files/eblits/src_install.eblit b/sys-libs/glibc/files/eblits/src_install.eblit index b334b58..180253a 100644 --- a/sys-libs/glibc/files/eblits/src_install.eblit +++ b/sys-libs/glibc/files/eblits/src_install.eblit @@ -193,6 +193,11 @@ toolchain-glibc_headers_install() { # we build a 2nd stage cross-compiler, gcc finds the target # system headers correctly. See gcc/doc/gccinstall.info dosym usr/include /usr/${CTARGET}/sys-include + # restore wordsize.h + if [[ ${CTARGET} == "mips64el-unknown-linux-gnu" ]] ; then + sed -i 's/\(__WORDSIZE.\+\)\(32\|64\)$/\1_MIPS_SZPTR/' \ + "${D}"/$(alt_headers)/bits/wordsize.h || die "restore wordsize.h failed" + fi } src_strip() { |