sys-libs/glibc: add USE=multiarch (enabled by default)
authorSergei Trofimovich <slyfox@gentoo.org>
Tue, 26 Jun 2018 09:47:53 +0000 (10:47 +0100)
committerSergei Trofimovich <slyfox@gentoo.org>
Tue, 26 Jun 2018 09:48:15 +0000 (10:48 +0100)
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
sys-libs/glibc/glibc-9999.ebuild
sys-libs/glibc/metadata.xml

index 0e9283a66caf44fecf74f723fcbef142fca497fa..e123d28e80d575b2be479d13dcaf888eac12ce8f 100644 (file)
@@ -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
index 9417381e1648b3997d1918d200e8d9d8cac77e95..8fe8178fbb4c29dc588170c4a6edb7c50c20f369 100644 (file)
@@ -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
index a9538704369e498dd4c4b33863bf46a1e16024c9..89da155531ed4d03fa4e4146c43254d2f8ce8363 100644 (file)
@@ -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>