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@gentoo.org>
This commit is contained in:
Sergei Trofimovich
2020-12-11 09:07:32 +00:00
parent ee03c1dda0
commit 30f1a6b113
2 changed files with 5 additions and 4 deletions

View File

@@ -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

View File

@@ -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>