sys-libs/glibc: hack initial mips cross headers for 2.21+
authorMike Frysinger <vapier@chromium.org>
Wed, 7 Dec 2016 07:01:57 +0000 (02:01 -0500)
committerMike Frysinger <vapier@gentoo.org>
Wed, 7 Dec 2016 07:02:27 +0000 (02:02 -0500)
The mips preconfigure script has changed (again), so update the hacks
for the early cross-compile glibc headers phase.

URL: https://crbug.com/647033

sys-libs/glibc/files/eblits/src_configure.eblit

index 396bce52ca2915a17cf33a8a856b259578d05f06..c1e6a2d1719da090e0fcdc8fb17ba410cec89641 100644 (file)
@@ -226,6 +226,14 @@ toolchain-glibc_headers_configure() {
                pushd "${S}"/sysdeps/mips >/dev/null
                sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
                sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
+               if version_is_at_least 2.21 ; then
+                       # Force the mips ABI to the default.  This is OK because the set of
+                       # installed headers in this phase is the same between the 3 ABIs.
+                       # If this ever changes, this hack will break, but that's unlikely
+                       # as glibc discourages that behavior.
+                       # https://crbug.com/647033
+                       sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
+               fi
                popd >/dev/null
        fi