commit:     d4dc260608afee733d52135f9c87325d43593b57
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 26 09:47:53 2018 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue Jun 26 09:48:15 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4dc2606

sys-libs/glibc: add USE=multiarch (enabled by default)

Normally multiarch should be enabled (where available).
But sometimes disabling multiarch is useful:
- to workaround or validate bugs specific to selected
  runtime arch or IFUNC handling.
- to get code that matches -march= CFLAGS setting

Bug: https://bugs.gentoo.org/659030
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-libs/glibc/glibc-2.27-r5.ebuild | 4 +++-
 sys-libs/glibc/glibc-9999.ebuild    | 4 +++-
 sys-libs/glibc/metadata.xml         | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/sys-libs/glibc/glibc-2.27-r5.ebuild 
b/sys-libs/glibc/glibc-2.27-r5.ebuild
index 0e9283a66ca..e123d28e80d 100644
--- a/sys-libs/glibc/glibc-2.27-r5.ebuild
+++ b/sys-libs/glibc/glibc-2.27-r5.ebuild
@@ -32,7 +32,7 @@ PATCH_VER=2
 SRC_URI+=" 
https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2";
 SRC_URI+=" multilib? ( 
https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
 )"
 
-IUSE="audit caps compile-locales doc gd hardened headers-only multilib nscd 
profile selinux suid systemtap vanilla"
+IUSE="audit caps compile-locales doc gd hardened headers-only +multiarch 
multilib nscd profile selinux suid systemtap vanilla"
 
 # Minimum kernel version that glibc requires
 MIN_KERN_VER="3.2.0"
@@ -412,6 +412,8 @@ want__thread() {
 }
 
 use_multiarch() {
+       # Allow user to disable runtime arch detection in multilib.
+       use multiarch || return 1
        # Make sure binutils is new enough to support indirect functions,
        # #336792. This funky sed supports gold and bfd linkers.
        local bver nver

diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index 9417381e164..8fe8178fbb4 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -33,7 +33,7 @@ PATCH_VER=6
 SRC_URI+=" 
https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2";
 SRC_URI+=" multilib? ( 
https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
 )"
 
-IUSE="audit caps compile-locales doc gd hardened headers-only multilib nscd 
profile selinux suid systemtap test vanilla"
+IUSE="audit caps compile-locales doc gd hardened headers-only +multiarch 
multilib nscd profile selinux suid systemtap test vanilla"
 
 # Minimum kernel version that glibc requires
 MIN_KERN_VER="3.2.0"
@@ -415,6 +415,8 @@ want__thread() {
 }
 
 use_multiarch() {
+       # Allow user to disable runtime arch detection in multilib.
+       use multiarch || return 1
        # Make sure binutils is new enough to support indirect functions,
        # #336792. This funky sed supports gold and bfd linkers.
        local bver nver

diff --git a/sys-libs/glibc/metadata.xml b/sys-libs/glibc/metadata.xml
index a9538704369..89da155531e 100644
--- a/sys-libs/glibc/metadata.xml
+++ b/sys-libs/glibc/metadata.xml
@@ -9,6 +9,7 @@
  <flag name="compile-locales">build *all* locales in src_install; this is 
generally meant for stage building only as it ignores /etc/locale.gen file and 
can be pretty slow</flag>
  <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 single DSO with optimizations for multiple 
architectures</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="suid">Make internal pt_chown helper setuid -- not needed if using 
Linux and have /dev/pts mounted with gid=5</flag>

Reply via email to