summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2018-01-20 18:35:27 +0100
committerAndreas K. Hüttel <dilfridge@gentoo.org>2018-01-20 18:36:07 +0100
commit4dfbdb5451ec3041b206bc057b5c1a2eb2a6b774 (patch)
treea585decf69e77d7227047e3359e47e467d165f37 /sys-libs/glibc
parentnet-nds/rpcbind: use default values for "--bindir" and "--with-rpcuser" (diff)
downloadgentoo-4dfbdb5451ec3041b206bc057b5c1a2eb2a6b774.tar.gz
gentoo-4dfbdb5451ec3041b206bc057b5c1a2eb2a6b774.tar.bz2
gentoo-4dfbdb5451ec3041b206bc057b5c1a2eb2a6b774.zip
sys-libs/glibc: Test for IA32 emulation before building amd64 multilib glibc, bug 326693.
Based on the patch by Steven Presser. Closes: https://bugs.gentoo.org/326693 Package-Manager: Portage-2.3.19, Repoman-2.3.6
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild17
1 files changed, 17 insertions, 0 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 522a3674fe0c..81dadb177948 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -701,6 +701,23 @@ pkg_pretend() {
fi
done
fi
+
+ # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
+ # we test for...
+ if ! is_crosscompile ; then
+
+ if use amd64 && use multilib ; then
+ ebegin "Checking that IA32 emulation is enabled in the running kernel"
+ echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
+ "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"
+ "${T}/check-ia32-emulation.elf32"
+ local STAT=$?
+ rm -f "${T}/check-ia32-emulation.elf32"
+ eend $STAT
+ [ $STAT -eq 0 ] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
+ fi
+
+ fi
}
# todo: shouldn't most of these checks be called also in src_configure again?
# (since consistency is not guaranteed between pkg_ and src_)