diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-02-03 01:38:38 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-02-03 01:38:38 +0000 |
commit | 2b297eb4b3b9114b1663b5affd9e3a9f0c22fedd (patch) | |
tree | 871130e04af37983e8b4509ff22b2c9cfbb988d9 /sys-libs | |
parent | sys-libs/glibc: cleanup: use [[, not [ (diff) | |
download | gentoo-2b297eb4b3b9114b1663b5affd9e3a9f0c22fedd.tar.gz gentoo-2b297eb4b3b9114b1663b5affd9e3a9f0c22fedd.tar.bz2 gentoo-2b297eb4b3b9114b1663b5affd9e3a9f0c22fedd.zip |
sys-libs/glibc: restore ability to switch single->multiple ABIs
To recover broken system automatically from bug #646424
we need to skip IA32 ABI checks as those require multiabi
glibc checks at glibc build time.
There is no need to impose it as a requirement. Fail test
only if it compiled successfully and failed at runtime.
Bug: https://bugs.gentoo.org/326693
Bug: https://bugs.gentoo.org/646424
Package-Manager: Portage-2.3.20, Repoman-2.3.6
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/glibc/glibc-2.27-r1.ebuild | 14 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-9999.ebuild | 14 |
2 files changed, 20 insertions, 8 deletions
diff --git a/sys-libs/glibc/glibc-2.27-r1.ebuild b/sys-libs/glibc/glibc-2.27-r1.ebuild index 83df2bf9e6b4..c22600909bf0 100644 --- a/sys-libs/glibc/glibc-2.27-r1.ebuild +++ b/sys-libs/glibc/glibc-2.27-r1.ebuild @@ -648,13 +648,19 @@ sanity_prechecks() { # 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 && [[ ${MERGE_TYPE} != "binary" ]] ; 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=$? + local STAT + if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi 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." diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index ec4e7fdcfb13..d70a1523ed91 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -648,13 +648,19 @@ sanity_prechecks() { # 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 && [[ ${MERGE_TYPE} != "binary" ]] ; 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=$? + local STAT + if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then + "${T}/check-ia32-emulation.elf32" + STAT=$? + else + # Don't fail here to allow single->multi ABI switch + # or recover from breakage like bug #646424 + ewarn "Failed to compile the ABI test. Broken host glibc?" + STAT=0 + fi 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." |