Gentoo Archives: gentoo-commits

From: Sergei Trofimovich <slyfox@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/
Date: Sat, 03 Feb 2018 01:39:08
Message-Id: 1517621918.2b297eb4b3b9114b1663b5affd9e3a9f0c22fedd.slyfox@gentoo
1 commit: 2b297eb4b3b9114b1663b5affd9e3a9f0c22fedd
2 Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
3 AuthorDate: Sat Feb 3 01:38:38 2018 +0000
4 Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 3 01:38:38 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b297eb4
7
8 sys-libs/glibc: restore ability to switch single->multiple ABIs
9
10 To recover broken system automatically from bug #646424
11 we need to skip IA32 ABI checks as those require multiabi
12 glibc checks at glibc build time.
13
14 There is no need to impose it as a requirement. Fail test
15 only if it compiled successfully and failed at runtime.
16
17 Bug: https://bugs.gentoo.org/326693
18 Bug: https://bugs.gentoo.org/646424
19 Package-Manager: Portage-2.3.20, Repoman-2.3.6
20
21 sys-libs/glibc/glibc-2.27-r1.ebuild | 14 ++++++++++----
22 sys-libs/glibc/glibc-9999.ebuild | 14 ++++++++++----
23 2 files changed, 20 insertions(+), 8 deletions(-)
24
25 diff --git a/sys-libs/glibc/glibc-2.27-r1.ebuild b/sys-libs/glibc/glibc-2.27-r1.ebuild
26 index 83df2bf9e6b..c22600909bf 100644
27 --- a/sys-libs/glibc/glibc-2.27-r1.ebuild
28 +++ b/sys-libs/glibc/glibc-2.27-r1.ebuild
29 @@ -648,13 +648,19 @@ sanity_prechecks() {
30 # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
31 # we test for...
32 if ! is_crosscompile ; then
33 -
34 if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
35 ebegin "Checking that IA32 emulation is enabled in the running kernel"
36 echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
37 - "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"
38 - "${T}/check-ia32-emulation.elf32"
39 - local STAT=$?
40 + local STAT
41 + if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
42 + "${T}/check-ia32-emulation.elf32"
43 + STAT=$?
44 + else
45 + # Don't fail here to allow single->multi ABI switch
46 + # or recover from breakage like bug #646424
47 + ewarn "Failed to compile the ABI test. Broken host glibc?"
48 + STAT=0
49 + fi
50 rm -f "${T}/check-ia32-emulation.elf32"
51 eend $STAT
52 [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
53
54 diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
55 index ec4e7fdcfb1..d70a1523ed9 100644
56 --- a/sys-libs/glibc/glibc-9999.ebuild
57 +++ b/sys-libs/glibc/glibc-9999.ebuild
58 @@ -648,13 +648,19 @@ sanity_prechecks() {
59 # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
60 # we test for...
61 if ! is_crosscompile ; then
62 -
63 if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
64 ebegin "Checking that IA32 emulation is enabled in the running kernel"
65 echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
66 - "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"
67 - "${T}/check-ia32-emulation.elf32"
68 - local STAT=$?
69 + local STAT
70 + if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
71 + "${T}/check-ia32-emulation.elf32"
72 + STAT=$?
73 + else
74 + # Don't fail here to allow single->multi ABI switch
75 + # or recover from breakage like bug #646424
76 + ewarn "Failed to compile the ABI test. Broken host glibc?"
77 + STAT=0
78 + fi
79 rm -f "${T}/check-ia32-emulation.elf32"
80 eend $STAT
81 [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."