diff options
-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() { |