commit:     30f1a6b113a4d96883f46987cd4952cfa4a5cca8
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 11 09:07:32 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Dec 11 09:09:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30f1a6b1

sys-libs/glibc: make mutilib bootstrap files optional

The binaries are only used for moving from smaller set
of ABIs to larger set of ABIs. Usually from 'amd64' to
'x86 amd64' or equivalent.

They are not used on a steady system (unless it's broken).

Let's make them optional for live ebuild first and pick up
for next glibc release.

Reported-by: Luke-Jr
Closes: https://bugs.gentoo.org/759358
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 sys-libs/glibc/glibc-9999.ebuild | 8 ++++----
 sys-libs/glibc/metadata.xml      | 1 +
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index d15e3bf4e50..279753c191f 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -35,9 +35,9 @@ GCC_BOOTSTRAP_VER=20201208
 LOCALE_GEN_VER=2.10
 
 SRC_URI+=" 
https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz";
-SRC_URI+=" multilib? ( 
https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
 )"
+SRC_URI+=" multilib-bootstrap? ( 
https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
 )"
 
-IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only 
+multiarch multilib nscd profile selinux +ssp +static-libs static-pie suid 
systemtap test vanilla"
+IUSE="audit caps cet compile-locales +crypt custom-cflags doc gd headers-only 
+multiarch multilib multilib-bootstrap nscd profile selinux +ssp +static-libs 
static-pie suid systemtap test vanilla"
 
 # Minimum kernel version that glibc requires
 MIN_KERN_VER="3.2.0"
@@ -743,7 +743,7 @@ src_unpack() {
        # Consistency is not guaranteed between pkg_ and src_ ...
        sanity_prechecks
 
-       use multilib && unpack 
gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
+       use multilib-bootstrap && unpack 
gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
 
        setup_env
 
@@ -990,7 +990,7 @@ glibc_do_configure() {
        # is built with MULTILIB_ABIS="amd64 x86" but we want to
        # add x32 to it, gcc/glibc don't yet support x32.
        #
-       if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then
+       if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then
                echo 'main(){}' > "${T}"/test.c
                if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c 
-Wl,-emain -lgcc 2>/dev/null ; then
                        sed -i -e '/^CC = /s:$: 
-B$(objdir)/../'"gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}/${ABI}:" 
config.make || die

diff --git a/sys-libs/glibc/metadata.xml b/sys-libs/glibc/metadata.xml
index 6630fde73e7..7dc64b63dde 100644
--- a/sys-libs/glibc/metadata.xml
+++ b/sys-libs/glibc/metadata.xml
@@ -12,6 +12,7 @@
  <flag name="debug">When USE=hardened, allow fortify/stack violations to dump 
core (SIGABRT) and not kill self (SIGKILL)</flag>
  <flag name="gd">build memusage and memusagestat tools</flag>
  <flag name="multiarch">enable optimizations for multiple CPU architectures 
(detected at runtime)</flag>
+ <flag name="multilib-bootstrap">Provide prebuilt libgcc.a and crt files if 
missing. Only needed for ABI switch.</flag>
  <flag name="nscd">Build, and enable support for, the Name Service Cache 
Daemon</flag>
  <flag name="rpc">Enable obsolete RPC/NIS layers</flag>
  <flag name="ssp">protect stack of glibc internals</flag>

Reply via email to