summaryrefslogtreecommitdiff
path: root/sys-libs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-08-17 11:36:49 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-08-17 11:36:49 +0100
commite2db47eaae00ec33f8971db44b68645c5d3b9590 (patch)
tree3ec0cf16ddb5854017e134fabebe14bf8cb94a34 /sys-libs
parent616579b5d773c50af31ee56f00105d96ce641ca2 (diff)
gentoo resync : 17.08.2021
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/Manifest.gzbin14069 -> 14075 bytes
-rw-r--r--sys-libs/gdbm/Manifest2
-rw-r--r--sys-libs/gdbm/gdbm-1.20.ebuild2
-rw-r--r--sys-libs/glibc/Manifest2
-rw-r--r--sys-libs/glibc/glibc-2.33-r6.ebuild1551
-rw-r--r--sys-libs/libcap/Manifest6
-rw-r--r--sys-libs/libcap/libcap-2.49-r1.ebuild (renamed from sys-libs/libcap/libcap-2.49.ebuild)4
-rw-r--r--sys-libs/libcap/libcap-2.51-r1.ebuild (renamed from sys-libs/libcap/libcap-2.51.ebuild)4
-rw-r--r--sys-libs/libcap/libcap-2.52-r1.ebuild (renamed from sys-libs/libcap/libcap-2.52.ebuild)4
-rw-r--r--sys-libs/libfaketime/Manifest4
-rw-r--r--sys-libs/libfaketime/libfaketime-0.9.6-r3.ebuild2
-rw-r--r--sys-libs/libfaketime/libfaketime-0.9.9.ebuild2
-rw-r--r--sys-libs/musl/Manifest3
-rw-r--r--sys-libs/musl/files/musl-1.2.2-gethostid.patch43
-rw-r--r--sys-libs/musl/musl-1.2.2-r3.ebuild (renamed from sys-libs/musl/musl-1.2.2-r2.ebuild)7
-rw-r--r--sys-libs/pam_wrapper/Manifest2
-rw-r--r--sys-libs/pam_wrapper/pam_wrapper-1.1.3.ebuild6
17 files changed, 1621 insertions, 23 deletions
diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz
index 7469d74f9dd1..ea6184862ba6 100644
--- a/sys-libs/Manifest.gz
+++ b/sys-libs/Manifest.gz
Binary files differ
diff --git a/sys-libs/gdbm/Manifest b/sys-libs/gdbm/Manifest
index 23d1c70c4326..61a74cabe736 100644
--- a/sys-libs/gdbm/Manifest
+++ b/sys-libs/gdbm/Manifest
@@ -2,5 +2,5 @@ AUX gdbm-1.18.1-gettext.patch 444 BLAKE2B 43496bf0e950e1af452439f881bca4fe5e3187
DIST gdbm-1.19.tar.gz 967861 BLAKE2B 92a1a9c461c763b01d7abced58800aa8db200ae746240c8ef8079a615d920efe95f0d805a8cfa63d8aa6bcbda637bcb07d98d630f58de5678b7633c3fcf6bf9b SHA512 118c5b8cdf74898bfb7c2100302fedf80096be017bf08e80a44486563cad5d93b93567622f2e7c7aceb72f30460504bd0b4ddfccf34df994ed65166e12ecd495
DIST gdbm-1.20.tar.gz 987628 BLAKE2B b0e01e63714b0485f9ac28f4a2260bf9309d2b3a87f6ccf6c9901619d383b6527d068b8614220eb6a6dec909fbf3fab5162a6c67bb928cfedaef36f1df26d0df SHA512 5f2fbd4318259e5b879ea2bff09e22defbb4e566ebbe11c44ac5b5369fd00745d7ed9f72ec1206153027eba245c4ee4a515a8ec6d67f84ec477483e72753590b
EBUILD gdbm-1.19.ebuild 1316 BLAKE2B 93f38c5f423af1033a05b2225589ce5643941b7bb158b9369d58494356333017ce0eea2e74fdd64b2beccf6754bc192729bdaab24ae703be268fc61ffdb757f4 SHA512 2198bd55c2d87547d3fa4eed0893947b6e33c11299bcbeca744c45c5df5ccb770a66c441c717d3b908e5d72c2a5ce4d9842e962f82bdd2d86b40fdc519724f69
-EBUILD gdbm-1.20.ebuild 1319 BLAKE2B deb8dfa4bd9562d0b80b4a0f6b0634414badf363e4fe17ce395eb3d9c04021fff9d833c15e5178c9b4c58055ef6a4ea75d736a721a2d1abdf7dbb45dbe87454f SHA512 12681ee5d353f44c439d5614988348d7b9dde410084ce7afc5d4fc1a56d2d6b28a6ba05c561938f4a3928a2647fdc8fca0740f1121edda6b1b72b78a61eab7d7
+EBUILD gdbm-1.20.ebuild 1318 BLAKE2B 9e5bcf1a9e223e73cbf85733483c4d8e03569a5166143f2da7b6eb0d8adad1e6535d0a2192d3f6aadb6ed494c5fa19fef7254baff5651124d205287abef8e1f7 SHA512 82fad8ba2fd4a2b6b1dd497ddd04b64852d430451560b3f3ea0f15db82de01e7f7f77389c2f41642be5679db94566810abf384360c7d08f12e6b7a1e5702ca30
MISC metadata.xml 359 BLAKE2B f58b008f8cd663d499052f6d3ea0f658b3816d28c044a4fb8a341a8ce7382104962f58b5ba881bb1dcfc8835cbfc22782471eb48088c547706caa63c35e21e97 SHA512 12da6a0492c269ebff68bf1b1d5ea44b9e011a9197c353157da04283fe865ffff01d6f6c28ecc73b5985ec39959c1c7911b2aa5c3e905929f41521b7cae0b169
diff --git a/sys-libs/gdbm/gdbm-1.20.ebuild b/sys-libs/gdbm/gdbm-1.20.ebuild
index 62c125e0e4eb..42db1a1b6f4f 100644
--- a/sys-libs/gdbm/gdbm-1.20.ebuild
+++ b/sys-libs/gdbm/gdbm-1.20.ebuild
@@ -11,7 +11,7 @@ SRC_URI="mirror://gnu/gdbm/${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0/6" # libgdbm.so version
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="+berkdb nls +readline static-libs"
DEPEND="
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 6bf37b9d6460..5306e14f98fb 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -30,6 +30,7 @@ DIST glibc-2.34-patches-1.tar.xz 7656 BLAKE2B e4ed403a10276a4ea468632b3f2baf31c8
DIST glibc-2.34.tar.xz 17301232 BLAKE2B 874031192f2f5a3b35c3f5b044a467d4be4e67e8593e070e5b49b901ce8ea6bde2f8d2f6c92fa33b3f61eb723572a9e5f2b45e56064168df80a96d3fdb6fa30c SHA512 15252affd9ef4523a8001db16d497f4fdcb3ddf4cde7fe80e075df0bd3cc6524dc29fbe20229dbf5f97af580556e6b1fac0de321a5fe25322bc3e72f93beb624
DIST glibc-systemd-20210727.tar.gz 1454 BLAKE2B 0383338f73cec9a13165f0be261eb3d46c0362425b5fe31846f0ec00da9aff69d941e8b0e0ad1f8691edf9dc30796c239e8e984207725e4cf98fd037e7168e22 SHA512 09a91f6351657abfca200d110b0a43d541399c2db142c5706e06b4eebb736932e8f1b026be8d844be64f8e2c981777c342004492ef99c3c81cb04bf75a2c3ee8
DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238
+DIST glibc-systemd-20210814.tar.gz 1469 BLAKE2B 10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1 SHA512 5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc
DIST locale-gen-2.00.tar.gz 7738 BLAKE2B cde6de5ba3400aea24d0d5f1b79471f89f09fb747c8e371e38316c7ada92f967e0865f573f23cb353d82419c234724143c0aeca9eb70eb945dfc581cc7491eb1 SHA512 b609fddb9ec5e567c008841fef3390eddb5d6e7699a8271b3b8c0ade1b44b0ac2e5d1daa8b9acabf3432e3b88110b538a96f209b1ad0f9e988b7efce66606dff
DIST locale-gen-2.10.tar.gz 7747 BLAKE2B 49f569c5ae5260fca128503bc6f22d6f6f1cda817920c41fdadadf1527bbb4f3eb161f79fa729830666a4673e9092f99f4685ec8fcac8ddea0b8242bca9c1f4f SHA512 e350e60d458d67638e3090711fca05af6fafac06c51b97648244549f8a0621dab7543f09dc7ad4c62392f13bdae8e5875dc6d0b6c3d83efc29d116bc2eef92db
EBUILD glibc-2.19-r2.ebuild 38454 BLAKE2B 6019c17c3cd333132abd3d88afd019367d451e6727a7528524ad8835a62d1a741068041dce840c0350a1acdfd8eddb840ac38a9cf6d25dcf46b07c98a31137b3 SHA512 e14489e34e3db70740b31e7b1250884a57a597021f913cd86cd4d946a4b8ceef2ed3fbc409b0c0b13526e128306276c96d48e5f437620835b5d1cf245d778262
@@ -39,6 +40,7 @@ EBUILD glibc-2.31-r7.ebuild 44522 BLAKE2B 1adfba68c35d3af5ec8476b2fe5d3bebf13880
EBUILD glibc-2.32-r8.ebuild 44853 BLAKE2B 724f95c0ed2cda18dc2edcaa03b0783a2bc603b72a67e1451535040ddc83be6d1a90ad4b30f9623140b5c0a329ecafb6f19793390137e629d43a3c26e202b28a SHA512 0973b86c266e40203e301cf0c6f8fddc4273c002ffb8fd6c16f6e78f2cfdfbea95fda04adfebb8ee84a14dc950763ba706eadadb2e83f7982b800bee636d5d8f
EBUILD glibc-2.33-r1.ebuild 45234 BLAKE2B 2a698cab717d087df0f991d2849cd293e9b7504265f1049906d64d36cabf7bd7d44204db38da3ea95984dec6908ae665d471ff1cf077c1b89d9677fec6447224 SHA512 d8799b40c1f61ed11f081285af9998fcfa025cc0b11eeed1de2798f3524ad9b8771708b01f1853ee203875ba881659c7a863ecebd363840dea4118d942b17b22
EBUILD glibc-2.33-r5.ebuild 46575 BLAKE2B 077bf1b4f462242a54d3730f9c5ee0cb137958b0687f40408f4af12f1665cdc0eceb82b05578a4448f7f0f4892da5c489b90996803ce0fd58e2d3c1d3f3ed434 SHA512 c807e788d85ecfeb8d9ade66ceb757976294b1ebb8aae17dabeb46be6304c14f643ecd1bd893591a24448ab4b27b6be57c30460c4ae702d30a5fb6d2ce4b819e
+EBUILD glibc-2.33-r6.ebuild 46610 BLAKE2B 94d2206661329a3ac7d57e41b6a868ede219b17611ba871a663fd26305eaf7b75e809649435ac2792076a8e40b7fc90b67150532a9b6ee2b7d97aa4af69f21d8 SHA512 b41acdca2bee62c009f4c4b4884f44819cce557ea6c6a6680b5391cc993625a47c04fb3f620a1084e71db36b5a2a252b2c683fbbd01e67fa3950b4ae30a67599
EBUILD glibc-2.33.ebuild 43992 BLAKE2B b5fd1fa3b2e2b727574028241e7805cab448b37d3975502f12140e2cd6cf98784af36393a1116c13ebaa490db3f18b7b20a56bd53343015abc521201c193eb3f SHA512 911c152ce3ff50ff79db9d53b570ff0fcf837549a072656fef8ad429d02788f89d6ee1266605c539dcbcf273aa791cf075043e8b4895eb8d67404be531631086
EBUILD glibc-2.34.ebuild 46846 BLAKE2B a879fcda54e7fb31e86992fd1a0f1beb06472f99033e886d8ab84aef7fefd853cae341707f15c12a5da8089dd947dd01914d97d4833de1563c44785ed35036ae SHA512 7c0cba27ac833a9c20c9d7072be33f3de3ebe46112854c4640917de68d655d04005a28e60820d5e258561bdc9bc7fe35d970cb73b2b197b0d1ecc0ed20d76673
EBUILD glibc-9999.ebuild 46844 BLAKE2B f509268bfe2452c28f5e75565ef2c704251452dc090ae9c0f1c01a37bafa450f65dae6b4a19b6fe968cc3eb9ae1dfd272c7f776001dc0999e5c60158caa6545a SHA512 27fde2de8f1aa15de4e6df6a7d04c416832628cf7420267485a624e2f6cffb9a7f464cb34e0ed2de78c69ff1a4f99951756cf7d6389dec4ca3ed4e05c7c972db
diff --git a/sys-libs/glibc/glibc-2.33-r6.ebuild b/sys-libs/glibc/glibc-2.33-r6.ebuild
new file mode 100644
index 000000000000..53507027d872
--- /dev/null
+++ b/sys-libs/glibc/glibc-2.33-r6.ebuild
@@ -0,0 +1,1551 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+TMPFILES_OPTIONAL=1
+
+inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \
+ multilib systemd multiprocessing tmpfiles
+
+DESCRIPTION="GNU libc C library"
+HOMEPAGE="https://www.gnu.org/software/libc/"
+LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
+SLOT="2.2"
+
+EMULTILIB_PKG="true"
+
+# Gentoo patchset (ignored for live ebuilds)
+PATCH_VER=5
+PATCH_DEV=dilfridge
+
+if [[ ${PV} == 9999* ]]; then
+ inherit git-r3
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+ SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
+ SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
+fi
+
+RELEASE_VER=${PV}
+
+GCC_BOOTSTRAP_VER=20201208
+
+LOCALE_GEN_VER=2.10
+
+GLIBC_SYSTEMD_VER=20210814
+
+SRC_URI+=" https://gitweb.gentoo.org/proj/locale-gen.git/snapshot/locale-gen-${LOCALE_GEN_VER}.tar.gz"
+SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
+SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )"
+
+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 systemd systemtap test vanilla"
+
+# Minimum kernel version that glibc requires
+MIN_KERN_VER="3.2.0"
+
+# Here's how the cross-compile logic breaks down ...
+# CTARGET - machine that will target the binaries
+# CHOST - machine that will host the binaries
+# CBUILD - machine that will build the binaries
+# If CTARGET != CHOST, it means you want a libc for cross-compiling.
+# If CHOST != CBUILD, it means you want to cross-compile the libc.
+# CBUILD = CHOST = CTARGET - native build/install
+# CBUILD != (CHOST = CTARGET) - cross-compile a native build
+# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
+# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
+# For install paths:
+# CHOST = CTARGET - install into /
+# CHOST != CTARGET - install into /usr/CTARGET/
+#
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we strip selectively.
+
+# We need a new-enough binutils/gcc to match upstream baseline.
+# Also we need to make sure our binutils/gcc supports TLS,
+# and that gcc already contains the hardened patches.
+# Lastly, let's avoid some openssh nastiness, bug 708224, as
+# convenience to our users.
+
+# gzip, grep, awk are needed by locale-gen, bug 740750
+
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=app-misc/pax-utils-1.3.1
+ sys-devel/bison
+ doc? ( sys-apps/texinfo )
+ !compile-locales? (
+ app-arch/gzip
+ sys-apps/grep
+ virtual/awk
+ )
+"
+COMMON_DEPEND="
+ gd? ( media-libs/gd:2= )
+ nscd? ( selinux? (
+ audit? ( sys-process/audit )
+ caps? ( sys-libs/libcap )
+ ) )
+ suid? ( caps? ( sys-libs/libcap ) )
+ selinux? ( sys-libs/libselinux )
+ systemtap? ( dev-util/systemtap )
+"
+DEPEND="${COMMON_DEPEND}
+ compile-locales? (
+ app-arch/gzip
+ sys-apps/grep
+ virtual/awk
+ )
+ test? ( >=net-dns/libidn2-2.3.0 )
+"
+RDEPEND="${COMMON_DEPEND}
+ app-arch/gzip
+ sys-apps/grep
+ virtual/awk
+ sys-apps/gentoo-functions
+ !<app-misc/pax-utils-1.3.1
+ !<net-misc/openssh-8.1_p1-r2
+"
+
+RESTRICT="!test? ( test )"
+
+if [[ ${CATEGORY} == cross-* ]] ; then
+ BDEPEND+=" !headers-only? (
+ >=${CATEGORY}/binutils-2.27
+ >=${CATEGORY}/gcc-6
+ )"
+ [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
+else
+ BDEPEND+="
+ >=sys-devel/binutils-2.27
+ >=sys-devel/gcc-6
+ "
+ DEPEND+=" virtual/os-headers "
+ RDEPEND+="
+ >=net-dns/libidn2-2.3.0
+ vanilla? ( !sys-libs/timezone-data )
+ "
+ PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
+fi
+
+# Ignore tests whitelisted below
+GENTOO_GLIBC_XFAIL_TESTS="${GENTOO_GLIBC_XFAIL_TESTS:-yes}"
+
+# The following tests fail due to the Gentoo build system and are thus
+# executed but ignored:
+XFAIL_TEST_LIST=(
+ # 9) Failures of unknown origin
+ tst-latepthread
+
+ # buggy test, assumes /dev/ and /dev/null on a single filesystem
+ # 'mount --bind /dev/null /chroot/dev/null' breaks it.
+ # https://sourceware.org/PR25909
+ tst-support_descriptors
+
+ # Flaky test, known to fail occasionally:
+ # https://sourceware.org/PR19329
+ # https://bugs.gentoo.org/719674#c12
+ tst-stack4
+)
+
+#
+# Small helper functions
+#
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+just_headers() {
+ is_crosscompile && use headers-only
+}
+
+alt_prefix() {
+ is_crosscompile && echo /usr/${CTARGET}
+}
+
+# This prefix is applicable to CHOST when building against this
+# glibc. It is baked into the library at configure time.
+host_eprefix() {
+ is_crosscompile || echo "${EPREFIX}"
+}
+
+# This prefix is applicable to CBUILD when building against this
+# glibc. It determines the destination path at install time.
+build_eprefix() {
+ is_crosscompile && echo "${EPREFIX}"
+}
+
+# We need to be able to set alternative headers for compiling for non-native
+# platform. Will also become useful for testing kernel-headers without screwing
+# up the whole system.
+alt_headers() {
+ echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
+}
+
+alt_build_headers() {
+ if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
+ ALT_BUILD_HEADERS="$(host_eprefix)$(alt_headers)"
+ if tc-is-cross-compiler ; then
+ ALT_BUILD_HEADERS=${SYSROOT}$(alt_headers)
+ if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
+ local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
+ ALT_BUILD_HEADERS=${header_path%/linux/version.h}
+ fi
+ fi
+ fi
+ echo "${ALT_BUILD_HEADERS}"
+}
+
+alt_libdir() {
+ echo $(alt_prefix)/$(get_libdir)
+}
+alt_usrlibdir() {
+ echo $(alt_prefix)/usr/$(get_libdir)
+}
+
+builddir() {
+ echo "${WORKDIR}/build-${ABI}-${CTARGET}-$1"
+}
+
+do_compile_test() {
+ local ret save_cflags=${CFLAGS}
+ CFLAGS+=" $1"
+ shift
+
+ pushd "${T}" >/dev/null
+
+ rm -f glibc-test*
+ printf '%b' "$*" > glibc-test.c
+
+ # Most of the time CC is already set, but not in early sanity checks.
+ nonfatal emake glibc-test CC="${CC-$(tc-getCC ${CTARGET})}"
+ ret=$?
+
+ popd >/dev/null
+
+ CFLAGS=${save_cflags}
+ return ${ret}
+}
+
+do_run_test() {
+ local ret
+
+ if [[ ${MERGE_TYPE} == "binary" ]] ; then
+ # ignore build failures when installing a binary package #324685
+ do_compile_test "" "$@" 2>/dev/null || return 0
+ else
+ if ! do_compile_test "" "$@" ; then
+ ewarn "Simple build failed ... assuming this is desired #324685"
+ return 0
+ fi
+ fi
+
+ pushd "${T}" >/dev/null
+
+ ./glibc-test
+ ret=$?
+ rm -f glibc-test*
+
+ popd >/dev/null
+
+ return ${ret}
+}
+
+setup_target_flags() {
+ # This largely mucks with compiler flags. None of which should matter
+ # when building up just the headers.
+ just_headers && return 0
+
+ case $(tc-arch) in
+ x86)
+ # -march needed for #185404 #199334
+ # TODO: When creating the first glibc cross-compile, this test will
+ # always fail as it does a full link which in turn requires glibc.
+ # Probably also applies when changing multilib profile settings (e.g.
+ # enabling x86 when the profile was amd64-only previously).
+ # We could change main to _start and pass -nostdlib here so that we
+ # only test the gcc code compilation. Or we could do a compile and
+ # then look for the symbol via scanelf.
+ if ! do_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
+ filter-flags '-march=*'
+ export CFLAGS="-march=${t} ${CFLAGS}"
+ einfo "Auto adding -march=${t} to CFLAGS #185404"
+ fi
+ ;;
+ amd64)
+ # -march needed for #185404 #199334
+ # TODO: See cross-compile issues listed above for x86.
+ [[ ${ABI} == x86 ]] &&
+ if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
+ # Normally the target is x86_64-xxx, so turn that into the -march that
+ # gcc actually accepts. #528708
+ [[ ${t} == "x86_64" ]] && t="x86-64"
+ filter-flags '-march=*'
+ # ugly, ugly, ugly. ugly.
+ CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}")
+ export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
+ einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})"
+ fi
+ ;;
+ mips)
+ # The mips abi cannot support the GNU style hashes. #233233
+ filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both
+ ;;
+ ppc|ppc64)
+ # Many arch-specific implementations do not work on ppc with
+ # cache-block not equal to 128 bytes. This breaks memset:
+ # https://sourceware.org/PR26522
+ # https://bugs.gentoo.org/737996
+ # Use default -mcpu=. For ppc it means non-multiarch setup.
+ filter-flags '-mcpu=*'
+ ;;
+ sparc)
+ # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
+ filter-flags "-fcall-used-g7"
+ append-flags "-fcall-used-g6"
+
+ local cpu
+ case ${CTARGET} in
+ sparc64-*)
+ cpu="sparc64"
+ case $(get-flag mcpu) in
+ v9)
+ # We need to force at least v9a because the base build doesn't
+ # work with just v9.
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=19477
+ append-flags "-Wa,-xarch=v9a"
+ ;;
+ esac
+ ;;
+ sparc-*)
+ case $(get-flag mcpu) in
+ v8|supersparc|hypersparc|leon|leon3)
+ cpu="sparcv8"
+ ;;
+ *)
+ cpu="sparcv9"
+ ;;
+ esac
+ ;;
+ esac
+ [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}"
+ ;;
+ esac
+}
+
+setup_flags() {
+ # Make sure host make.conf doesn't pollute us
+ if is_crosscompile || tc-is-cross-compiler ; then
+ CHOST=${CTARGET} strip-unsupported-flags
+ fi
+
+ # Store our CFLAGS because it's changed depending on which CTARGET
+ # we are building when pulling glibc on a multilib profile
+ CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
+ CFLAGS=${CFLAGS_BASE}
+ CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
+ CXXFLAGS=${CXXFLAGS_BASE}
+ ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
+ ASFLAGS=${ASFLAGS_BASE}
+
+ # Allow users to explicitly avoid flag sanitization via
+ # USE=custom-cflags.
+ if ! use custom-cflags; then
+ # Over-zealous CFLAGS can often cause problems. What may work for one
+ # person may not work for another. To avoid a large influx of bugs
+ # relating to failed builds, we strip most CFLAGS out to ensure as few
+ # problems as possible.
+ strip-flags
+ # Lock glibc at -O2; we want to be conservative here.
+ filter-flags '-O?'
+ append-flags -O2
+ fi
+ strip-unsupported-flags
+ filter-flags -m32 -m64 '-mabi=*'
+
+ # glibc aborts if rpath is set by LDFLAGS
+ filter-ldflags '-Wl,-rpath=*'
+
+ # ld can't use -r & --relax at the same time, bug #788901
+ # https://sourceware.org/PR27837
+ filter-ldflags '-Wl,--relax'
+
+ # #492892
+ filter-flags -frecord-gcc-switches
+
+ unset CBUILD_OPT CTARGET_OPT
+ if use multilib ; then
+ CTARGET_OPT=$(get_abi_CTARGET)
+ [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
+ fi
+
+ setup_target_flags
+
+ if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
+ CBUILD_OPT=${CTARGET_OPT}
+ fi
+
+ # glibc's headers disallow -O0 and fail at build time:
+ # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization"
+ replace-flags -O0 -O1
+
+ filter-flags '-fstack-protector*'
+}
+
+want_tls() {
+ # Archs that can use TLS (Thread Local Storage)
+ case $(tc-arch) in
+ x86)
+ # requires i486 or better #106556
+ [[ ${CTARGET} == i[4567]86* ]] && return 0
+ return 1
+ ;;
+ esac
+ return 0
+}
+
+want__thread() {
+ want_tls || return 1
+
+ # For some reason --with-tls --with__thread is causing segfaults on sparc32.
+ [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
+
+ [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
+
+ # only test gcc -- can't test linking yet
+ tc-has-tls -c ${CTARGET}
+ WANT__THREAD=$?
+
+ return ${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
+ bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}')
+ case $(tc-arch ${CTARGET}) in
+ amd64|x86) nver="2.20" ;;
+ arm) nver="2.22" ;;
+ hppa) nver="2.23" ;;
+ ppc|ppc64) nver="2.20" ;;
+ # ifunc support was added in 2.23, but glibc also needs
+ # machinemode which is in 2.24.
+ s390) nver="2.24" ;;
+ sparc) nver="2.21" ;;
+ *) return 1 ;;
+ esac
+ ver_test ${bver} -ge ${nver}
+}
+
+# Setup toolchain variables that had historically been defined in the
+# profiles for these archs.
+setup_env() {
+ # silly users
+ unset LD_RUN_PATH
+ unset LD_ASSUME_KERNEL
+
+ if is_crosscompile || tc-is-cross-compiler ; then
+ multilib_env ${CTARGET_OPT:-${CTARGET}}
+
+ if ! use multilib ; then
+ MULTILIB_ABIS=${DEFAULT_ABI}
+ else
+ MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
+ fi
+
+ # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
+ # and fall back on CFLAGS.
+ local VAR=CFLAGS_${CTARGET//[-.]/_}
+ CFLAGS=${!VAR-${CFLAGS}}
+ einfo " $(printf '%15s' 'Manual CFLAGS:') ${CFLAGS}"
+ fi
+
+ setup_flags
+
+ export ABI=${ABI:-${DEFAULT_ABI:-default}}
+
+ if just_headers ; then
+ # Avoid mixing host's CC and target's CFLAGS_${ABI}:
+ # At this bootstrap stage we have only binutils for
+ # target but not compiler yet.
+ einfo "Skip CC ABI injection. We can't use (cross-)compiler yet."
+ return 0
+ fi
+ local VAR=CFLAGS_${ABI}
+ # We need to export CFLAGS with abi information in them because glibc's
+ # configure script checks CFLAGS for some targets (like mips). Keep
+ # around the original clean value to avoid appending multiple ABIs on
+ # top of each other.
+ : ${__GLIBC_CC:=$(tc-getCC ${CTARGET})}
+ export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
+ einfo " $(printf '%15s' 'Manual CC:') ${CC}"
+}
+
+foreach_abi() {
+ setup_env
+
+ local ret=0
+ local abilist=""
+ if use multilib ; then
+ abilist=$(get_install_abis)
+ else
+ abilist=${DEFAULT_ABI}
+ fi
+ local -x ABI
+ for ABI in ${abilist:-default} ; do
+ setup_env
+ einfo "Running $1 for ABI ${ABI}"
+ $1
+ : $(( ret |= $? ))
+ done
+ return ${ret}
+}
+
+glibc_banner() {
+ local b="Gentoo ${PVR}"
+ [[ -n ${PATCH_VER} ]] && ! use vanilla && b+=" p${PATCH_VER}"
+ echo "${b}"
+}
+
+# The following Kernel version handling functions are mostly copied from portage
+# source. It's better not to use linux-info.eclass here since a) it adds too
+# much magic, see bug 326693 for some of the arguments, and b) some of the
+# functions are just not provided.
+
+g_get_running_KV() {
+ uname -r
+ return $?
+}
+
+g_KV_major() {
+ [[ -z $1 ]] && return 1
+ local KV=$@
+ echo "${KV%%.*}"
+}
+
+g_KV_minor() {
+ [[ -z $1 ]] && return 1
+ local KV=$@
+ KV=${KV#*.}
+ echo "${KV%%.*}"
+}
+
+g_KV_micro() {
+ [[ -z $1 ]] && return 1
+ local KV=$@
+ KV=${KV#*.*.}
+ echo "${KV%%[^[:digit:]]*}"
+}
+
+g_KV_to_int() {
+ [[ -z $1 ]] && return 1
+ local KV_MAJOR=$(g_KV_major "$1")
+ local KV_MINOR=$(g_KV_minor "$1")
+ local KV_MICRO=$(g_KV_micro "$1")
+ local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
+
+ # We make version 2.2.0 the minimum version we will handle as
+ # a sanity check ... if its less, we fail ...
+ if [[ ${KV_int} -ge 131584 ]] ; then
+ echo "${KV_int}"
+ return 0
+ fi
+ return 1
+}
+
+g_int_to_KV() {
+ local version=$1 major minor micro
+ major=$((version / 65536))
+ minor=$(((version % 65536) / 256))
+ micro=$((version % 256))
+ echo ${major}.${minor}.${micro}
+}
+
+eend_KV() {
+ [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]]
+ eend $?
+}
+
+get_kheader_version() {
+ printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
+ $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \
+ tail -n 1
+}
+
+# We collect all sanity checks here. Consistency is not guranteed between
+# pkg_ and src_ phases, so we call this function both in pkg_pretend and in
+# src_unpack.
+sanity_prechecks() {
+ # Prevent native builds from downgrading
+ if [[ ${MERGE_TYPE} != "buildonly" ]] && \
+ [[ -z ${ROOT} ]] && \
+ [[ ${CBUILD} == ${CHOST} ]] && \
+ [[ ${CHOST} == ${CTARGET} ]] ; then
+
+ # The high rev # is to allow people to downgrade between -r#
+ # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2
+ # should be fine. Hopefully we never actually use a r# this
+ # high.
+ if has_version ">${CATEGORY}/${P}-r10000" ; then
+ eerror "Sanity check to keep you from breaking your system:"
+ eerror " Downgrading glibc is not supported and a sure way to destruction."
+ [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system."
+ fi
+
+ if ! do_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' ; then
+ eerror "Your old kernel is broken. You need to update it to a newer"
+ eerror "version as syscall(<bignum>) will break. See bug 279260."
+ die "Old and broken kernel."
+ fi
+ fi
+
+ # Users have had a chance to phase themselves, time to give em the boot
+ if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
+ eerror "You still haven't deleted ${EROOT}/etc/locales.build."
+ eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
+ die "Lazy upgrader detected"
+ fi
+
+ if [[ ${CTARGET} == i386-* ]] ; then
+ eerror "i386 CHOSTs are no longer supported."
+ eerror "Chances are you don't actually want/need i386."
+ eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
+ die "Please fix your CHOST"
+ fi
+
+ if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
+ ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
+ ewarn "This will result in a 50% performance penalty when running with a 32bit"
+ ewarn "hypervisor, which is probably not what you want."
+ fi
+
+ # ABI-specific checks follow here. Hey, we have a lot more specific conditions that
+ # we test for...
+ if ! is_crosscompile ; then
+ if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then
+ ebegin "Checking that IA32 emulation is enabled in the running kernel"
+ echo 'int main(){return 0;}' > "${T}/check-ia32-emulation.c"
+ local STAT
+ if "${CC-${CHOST}-gcc}" ${CFLAGS_x86} "${T}/check-ia32-emulation.c" -o "${T}/check-ia32-emulation.elf32"; then
+ "${T}/check-ia32-emulation.elf32"
+ STAT=$?
+ else
+ # Don't fail here to allow single->multi ABI switch
+ # or recover from breakage like bug #646424
+ ewarn "Failed to compile the ABI test. Broken host glibc?"
+ STAT=0
+ fi
+ rm -f "${T}/check-ia32-emulation.elf32"
+ eend $STAT
+ [[ $STAT -eq 0 ]] || die "CONFIG_IA32_EMULATION must be enabled in the kernel to compile a multilib glibc."
+ fi
+
+ fi
+
+ # When we actually have to compile something...
+ if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then
+ ebegin "Checking gcc for __thread support"
+ if ! eend $(want__thread ; echo $?) ; then
+ echo
+ eerror "Could not find a gcc that supports the __thread directive!"
+ eerror "Please update your binutils/gcc and try again."
+ die "No __thread support in gcc!"
+ fi
+
+ if [[ ${CTARGET} == *-linux* ]] ; then
+ local run_kv build_kv want_kv
+
+ run_kv=$(g_get_running_KV)
+ build_kv=$(g_int_to_KV $(get_kheader_version))
+ want_kv=${MIN_KERN_VER}
+
+ if ! is_crosscompile && ! tc-is-cross-compiler ; then
+ # Building fails on an non-supporting kernel
+ ebegin "Checking running kernel version (${run_kv} >= ${want_kv})"
+ if ! eend_KV ${run_kv} ${want_kv} ; then
+ echo
+ eerror "You need a kernel of at least ${want_kv}!"
+ die "Kernel version too low!"
+ fi
+ fi
+
+ ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})"
+ if ! eend_KV ${build_kv} ${want_kv} ; then
+ echo
+ eerror "You need linux-headers of at least ${want_kv}!"
+ die "linux-headers version too low!"
+ fi
+ fi
+ fi
+}
+
+#
+# the phases
+#
+
+# pkg_pretend
+
+pkg_pretend() {
+ # All the checks...
+ einfo "Checking general environment sanity."
+ sanity_prechecks
+}
+
+pkg_setup() {
+ # see bug 682570
+ [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup
+}
+
+# src_unpack
+
+src_unpack() {
+ # Consistency is not guaranteed between pkg_ and src_ ...
+ sanity_prechecks
+
+ use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz
+
+ setup_env
+
+ if [[ ${PV} == 9999* ]] ; then
+ EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git"
+ EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git
+ git-r3_src_unpack
+ mv patches-git/9999 patches || die
+
+ EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
+ EGIT_CHECKOUT_DIR=${S}
+ git-r3_src_unpack
+ else
+ unpack ${P}.tar.xz
+
+ cd "${WORKDIR}" || die
+ unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz
+ fi
+
+ cd "${WORKDIR}" || die
+ unpack locale-gen-${LOCALE_GEN_VER}.tar.gz
+ use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz
+}
+
+src_prepare() {
+ local patchsetname
+ if ! use vanilla ; then
+ if [[ ${PV} == 9999* ]] ; then
+ patchsetname="from git master"
+ else
+ patchsetname="${RELEASE_VER}-${PATCH_VER}"
+ fi
+ einfo "Applying Gentoo Glibc Patchset ${patchsetname}"
+ eapply "${WORKDIR}"/patches
+ einfo "Done."
+ fi
+
+ default
+
+ gnuconfig_update
+
+ cd "${WORKDIR}"
+ find . -name configure -exec touch {} +
+
+ # move the external locale-gen to its old place
+ mkdir extra || die
+ mv locale-gen-${LOCALE_GEN_VER} extra/locale || die
+
+ eprefixify extra/locale/locale-gen
+
+ # Fix permissions on some of the scripts.
+ chmod u+x "${S}"/scripts/*.sh
+
+ cd "${S}"
+}
+
+glibc_do_configure() {
+ # Glibc does not work with gold (for various reasons) #269274.
+ tc-ld-disable-gold
+
+ # CXX isnt handled by the multilib system, so if we dont unset here
+ # we accumulate crap across abis
+ unset CXX
+
+ einfo "Configuring glibc for nptl"
+
+ if use doc ; then
+ export MAKEINFO=makeinfo
+ else
+ export MAKEINFO=/dev/null
+ fi
+
+ local v
+ for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS MAKEINFO NM READELF; do
+ einfo " $(printf '%15s' ${v}:) ${!v}"
+ done
+
+ # CFLAGS can contain ABI-specific flags like -mfpu=neon, see bug #657760
+ # To build .S (assembly) files with the same ABI-specific flags
+ # upstream currently recommends adding CFLAGS to CC/CXX:
+ # https://sourceware.org/PR23273
+ # Note: Passing CFLAGS via CPPFLAGS overrides glibc's arch-specific CFLAGS
+ # and breaks multiarch support. See 659030#c3 for an example.
+ # The glibc configure script doesn't properly use LDFLAGS all the time.
+ export CC="$(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS}"
+ einfo " $(printf '%15s' 'Manual CC:') ${CC}"
+
+ # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
+ export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS) ${CFLAGS}"
+
+ if is_crosscompile; then
+ # Assume worst-case bootstrap: glibc is buil first time
+ # when ${CTARGET}-g++ is not available yet. We avoid
+ # building auxiliary programs that require C++: bug #683074
+ # It should not affect final result.
+ export libc_cv_cxx_link_ok=no
+ # The line above has the same effect. We set CXX explicitly
+ # to make build logs less confusing.
+ export CXX=
+ fi
+ einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
+
+ # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure
+ # can't detect them automatically due to ${CHOST} mismatch and fallbacks
+ # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup().
+ export NM="$(tc-getNM ${CTARGET})"
+ export READELF="$(tc-getREADELF ${CTARGET})"
+ einfo " $(printf '%15s' 'Manual NM:') ${NM}"
+ einfo " $(printf '%15s' 'Manual READELF:') ${READELF}"
+
+ echo
+
+ local myconf=()
+
+ case ${CTARGET} in
+ m68k*)
+ # setjmp() is not compatible with stack protection:
+ # https://sourceware.org/PR24202
+ myconf+=( --enable-stack-protector=no )
+ ;;
+ *)
+ # Use '=strong' instead of '=all' to protect only functions
+ # worth protecting from stack smashes.
+ # '=all' is also known to have a problem in IFUNC resolution
+ # tests: https://sourceware.org/PR25680, bug #712356.
+ myconf+=( --enable-stack-protector=$(usex ssp strong no) )
+ ;;
+ esac
+ myconf+=( --enable-stackguard-randomization )
+
+ # Keep a whitelist of targets supporing IFUNC. glibc's ./configure
+ # is not robust enough to detect proper support:
+ # https://bugs.gentoo.org/641216
+ # https://sourceware.org/PR22634#c0
+ case $(tc-arch ${CTARGET}) in
+ # Keep whitelist of targets where autodetection mostly works.
+ amd64|x86|sparc|ppc|ppc64|arm|arm64|s390) ;;
+ # Blacklist everywhere else
+ *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
+ esac
+
+ # Enable Intel Control-flow Enforcement Technology on amd64 if requested
+ case ${CTARGET} in
+ x86_64-*) myconf+=( $(use_enable cet) ) ;;
+ *) ;;
+ esac
+
+ [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
+
+ myconf+=( --enable-kernel=${MIN_KERN_VER} )
+
+ # Since SELinux support is only required for nscd, only enable it if:
+ # 1. USE selinux
+ # 2. only for the primary ABI on multilib systems
+ # 3. Not a crosscompile
+ if ! is_crosscompile && use selinux ; then
+ if use multilib ; then
+ if is_final_abi ; then
+ myconf+=( --with-selinux )
+ else
+ myconf+=( --without-selinux )
+ fi
+ else
+ myconf+=( --with-selinux )
+ fi
+ else
+ myconf+=( --without-selinux )
+ fi
+
+ # Force a few tests where we always know the answer but
+ # configure is incapable of finding it.
+ if is_crosscompile ; then
+ export \
+ libc_cv_c_cleanup=yes \
+ libc_cv_forced_unwind=yes
+ fi
+
+ myconf+=(
+ --without-cvs
+ --disable-werror
+ --enable-bind-now
+ --build=${CBUILD_OPT:-${CBUILD}}
+ --host=${CTARGET_OPT:-${CTARGET}}
+ $(use_enable profile)
+ $(use_with gd)
+ --with-headers=$(build_eprefix)$(alt_build_headers)
+ --prefix="$(host_eprefix)/usr"
+ --sysconfdir="$(host_eprefix)/etc"
+ --localstatedir="$(host_eprefix)/var"
+ --libdir='$(prefix)'/$(get_libdir)
+ --mandir='$(prefix)'/share/man
+ --infodir='$(prefix)'/share/info
+ --libexecdir='$(libdir)'/misc/glibc
+ --with-bugurl=https://bugs.gentoo.org/
+ --with-pkgversion="$(glibc_banner)"
+ $(use_enable crypt)
+ $(use_multiarch || echo --disable-multi-arch)
+ $(use_enable static-pie)
+ $(use_enable systemtap)
+ $(use_enable nscd)
+
+ # locale data is arch-independent
+ # https://bugs.gentoo.org/753740
+ libc_cv_complocaledir='${exec_prefix}/lib/locale'
+
+ # -march= option tricks build system to infer too
+ # high ISA level: https://sourceware.org/PR27318
+ libc_cv_include_x86_isa_level=no
+ # Explicit override of https://sourceware.org/PR27991
+ # exposes a bug in glibc's configure:
+ # https://sourceware.org/PR27991
+ libc_cv_have_x86_lahf_sahf=no
+ libc_cv_have_x86_movbe=no
+
+ ${EXTRA_ECONF}
+ )
+
+ # We rely on sys-libs/timezone-data for timezone tools normally.
+ myconf+=( $(use_enable vanilla timezone-tools) )
+
+ # These libs don't have configure flags.
+ ac_cv_lib_audit_audit_log_user_avc_message=$(usex audit || echo no)
+ ac_cv_lib_cap_cap_init=$(usex caps || echo no)
+
+ # There is no configure option for this and we need to export it
+ # since the glibc build will re-run configure on itself
+ export libc_cv_rootsbindir="$(host_eprefix)/sbin"
+ export libc_cv_slibdir="$(host_eprefix)/$(get_libdir)"
+
+ # We take care of patching our binutils to use both hash styles,
+ # and many people like to force gnu hash style only, so disable
+ # this overriding check. #347761
+ export libc_cv_hashstyle=no
+
+ local builddir=$(builddir nptl)
+ mkdir -p "${builddir}"
+ cd "${builddir}"
+ set -- "${S}"/configure "${myconf[@]}"
+ echo "$@"
+ "$@" || die "failed to configure glibc"
+
+ # ia64 static cross-compilers are a pita in so much that they
+ # can't produce static ELFs (as the libgcc.a is broken). so
+ # disable building of the programs for those targets if it
+ # doesn't work.
+ # XXX: We could turn this into a compiler test, but ia64 is
+ # the only one that matters, so this should be fine for now.
+ if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
+ sed -i '1i+link-static = touch $@' config.make
+ fi
+
+ # If we're trying to migrate between ABI sets, we need
+ # to lie and use a local copy of gcc. Like if the system
+ # 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-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
+ fi
+ fi
+}
+
+glibc_headers_configure() {
+ export ABI=default
+
+ local builddir=$(builddir "headers")
+ mkdir -p "${builddir}"
+ cd "${builddir}"
+
+ # if we don't have a compiler yet, we can't really test it now ...
+ # hopefully they don't affect header generation, so let's hope for
+ # the best here ...
+ local v vars=(
+ ac_cv_header_cpuid_h=yes
+ libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
+ libc_cv_asm_cfi_directives=yes
+ libc_cv_broken_visibility_attribute=no
+ libc_cv_c_cleanup=yes
+ libc_cv_compiler_powerpc64le_binary128_ok=yes
+ libc_cv_forced_unwind=yes
+ libc_cv_gcc___thread=yes
+ libc_cv_mlong_double_128=yes
+ libc_cv_mlong_double_128ibm=yes
+ libc_cv_ppc_machine=yes
+ libc_cv_ppc_rel16=yes
+ libc_cv_predef_fortify_source=no
+ libc_cv_target_power8_ok=yes
+ libc_cv_visibility_attribute=yes
+ libc_cv_z_combreloc=yes
+ libc_cv_z_execstack=yes
+ libc_cv_z_initfirst=yes
+ libc_cv_z_nodelete=yes
+ libc_cv_z_nodlopen=yes
+ libc_cv_z_relro=yes
+ libc_mips_abi=${ABI}
+ libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
+ # These libs don't have configure flags.
+ ac_cv_lib_audit_audit_log_user_avc_message=no
+ ac_cv_lib_cap_cap_init=no
+ )
+
+ einfo "Forcing cached settings:"
+ for v in "${vars[@]}" ; do
+ einfo " ${v}"
+ export ${v}
+ done
+
+ local headers_only_arch_CPPFLAGS=()
+
+ # Blow away some random CC settings that screw things up. #550192
+ if [[ -d ${S}/sysdeps/mips ]]; then
+ pushd "${S}"/sysdeps/mips >/dev/null
+ sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
+ sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
+
+ # Force the mips ABI to the default. This is OK because the set of
+ # installed headers in this phase is the same between the 3 ABIs.
+ # If this ever changes, this hack will break, but that's unlikely
+ # as glibc discourages that behavior.
+ # https://crbug.com/647033
+ sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
+
+ popd >/dev/null
+ fi
+
+ case ${CTARGET} in
+ riscv*)
+ # RISC-V interrogates the compiler to determine which target to
+ # build. If building the headers then we don't strictly need a
+ # RISC-V compiler, so the built-in definitions that are provided
+ # along with all RISC-V compiler might not exist. This causes
+ # glibc's RISC-V preconfigure script to blow up. Since we're just
+ # building the headers any value will actually work here, so just
+ # pick the standard one (rv64g/lp64d) to make the build scripts
+ # happy for now -- the headers are all the same anyway so it
+ # doesn't matter.
+ headers_only_arch_CPPFLAGS+=(
+ -D__riscv_xlen=64
+ -D__riscv_flen=64
+ -D__riscv_float_abi_double=1
+ -D__riscv_atomic=1
+ ) ;;
+ esac
+
+ local myconf=()
+ myconf+=(
+ --disable-sanity-checks
+ --enable-hacker-mode
+ --without-cvs
+ --disable-werror
+ --enable-bind-now
+ --build=${CBUILD_OPT:-${CBUILD}}
+ --host=${CTARGET_OPT:-${CTARGET}}
+ --with-headers=$(build_eprefix)$(alt_build_headers)
+ --prefix="$(host_eprefix)/usr"
+ ${EXTRA_ECONF}
+ )
+
+ # Nothing is compiled here which would affect the headers for the target.
+ # So forcing CC/CFLAGS is sane.
+ local headers_only_CC=$(tc-getBUILD_CC)
+ local headers_only_CFLAGS="-O1 -pipe"
+ local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}"
+ local headers_only_LDFLAGS=""
+ set -- "${S}"/configure "${myconf[@]}"
+ echo \
+ "CC=${headers_only_CC}" \
+ "CFLAGS=${headers_only_CFLAGS}" \
+ "CPPFLAGS=${headers_only_CPPFLAGS}" \
+ "LDFLAGS=${headers_only_LDFLAGS}" \
+ "$@"
+ CC=${headers_only_CC} \
+ CFLAGS=${headers_only_CFLAGS} \
+ CPPFLAGS=${headers_only_CPPFLAGS} \
+ LDFLAGS="" \
+ "$@" || die "failed to configure glibc"
+}
+
+do_src_configure() {
+ if just_headers ; then
+ glibc_headers_configure
+ else
+ glibc_do_configure nptl
+ fi
+}
+
+src_configure() {
+ foreach_abi do_src_configure
+}
+
+do_src_compile() {
+ emake -C "$(builddir nptl)"
+}
+
+src_compile() {
+ if just_headers ; then
+ return
+ fi
+
+ foreach_abi do_src_compile
+}
+
+glibc_src_test() {
+ cd "$(builddir nptl)"
+
+ local myxfailparams=""
+ if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then
+ for myt in ${XFAIL_TEST_LIST[@]} ; do
+ myxfailparams+="test-xfail-${myt}=yes "
+ done
+ fi
+
+ # sandbox does not understand unshare() and prevents
+ # writes to /proc/, which makes many tests fail
+
+ SANDBOX_ON=0 LD_PRELOAD= emake ${myxfailparams} check
+}
+
+do_src_test() {
+ local ret=0
+
+ glibc_src_test
+ : $(( ret |= $? ))
+
+ return ${ret}
+}
+
+src_test() {
+ if just_headers ; then
+ return
+ fi
+
+ # Give tests more time to complete.
+ export TIMEOUTFACTOR=5
+
+ foreach_abi do_src_test || die "tests failed"
+}
+
+run_locale_gen() {
+ # if the host locales.gen contains no entries, we'll install everything
+ local root="$1"
+ local inplace=""
+
+ if [[ "${root}" == "--inplace-glibc" ]] ; then
+ inplace="--inplace-glibc"
+ root="$2"
+ fi
+
+ local locale_list="${root}/etc/locale.gen"
+
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
+ [[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
+ locale_list="${root}/usr/share/i18n/SUPPORTED"
+ fi
+
+ set -- locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
+ --destdir "${root}"
+ echo "$@"
+ "$@"
+
+ popd >/dev/null
+}
+
+glibc_do_src_install() {
+ local builddir=$(builddir nptl)
+ cd "${builddir}"
+
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install
+
+ # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
+ # which come without headers etc. Only needed for binary packages since the
+ # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
+ find "${D}" -name "libnsl.a" -delete
+ find "${D}" -name "libnsl.so" -delete
+
+ # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need
+ # to infer upstream version:
+ # '#define VERSION "2.26.90"' -> '2.26.90'
+ local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
+
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+ # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
+ # Move versioned .a file out of libdir to evade portage QA checks
+ # instead of using gen_usr_ldscript(). We fix ldscript as:
+ # "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die
+ dodir $(alt_usrlibdir)/${P}
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
+ fi
+
+ # We'll take care of the cache ourselves
+ rm -f "${ED}"/etc/ld.so.cache
+
+ # Everything past this point just needs to be done once ...
+ is_final_abi || return 0
+
+ # Make sure the non-native interp can be found on multilib systems even
+ # if the main library set isn't installed into the right place. Maybe
+ # we should query the active gcc for info instead of hardcoding it ?
+ local i ldso_abi ldso_name
+ local ldso_abi_list=(
+ # x86
+ amd64 /lib64/ld-linux-x86-64.so.2
+ x32 /libx32/ld-linux-x32.so.2
+ x86 /lib/ld-linux.so.2
+ # mips
+ o32 /lib/ld.so.1
+ n32 /lib32/ld.so.1
+ n64 /lib64/ld.so.1
+ # powerpc
+ ppc /lib/ld.so.1
+ # riscv
+ ilp32d /lib/ld-linux-riscv32-ilp32d.so.1
+ ilp32 /lib/ld-linux-riscv32-ilp32.so.1
+ lp64d /lib/ld-linux-riscv64-lp64d.so.1
+ lp64 /lib/ld-linux-riscv64-lp64.so.1
+ # s390
+ s390 /lib/ld.so.1
+ s390x /lib/ld64.so.1
+ # sparc
+ sparc32 /lib/ld-linux.so.2
+ sparc64 /lib64/ld-linux.so.2
+ )
+ case $(tc-endian) in
+ little)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64.so.1
+ # ELFv2 (glibc does not support ELFv1 on LE)
+ ppc64 /lib64/ld64.so.2
+ )
+ ;;
+ big)
+ ldso_abi_list+=(
+ # arm
+ arm64 /lib/ld-linux-aarch64_be.so.1
+ # ELFv1 (glibc does not support ELFv2 on BE)
+ ppc64 /lib64/ld64.so.1
+ )
+ ;;
+ esac
+ if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ fi
+ for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
+ ldso_abi=${ldso_abi_list[i]}
+ has ${ldso_abi} $(get_install_abis) || continue
+
+ ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
+ if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
+ dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
+ fi
+ done
+
+ # In the LSB 5.0 definition, someone had the excellent idea to "standardize"
+ # the runtime loader name, see also https://xkcd.com/927/
+ # Normally, in Gentoo one should never come across executables that require this.
+ # However, binary commercial packages are known to adhere to weird practices.
+ # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB
+ local lsb_ldso_name native_ldso_name lsb_ldso_abi
+ local lsb_ldso_abi_list=(
+ # x86
+ amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
+ )
+ for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do
+ lsb_ldso_abi=${lsb_ldso_abi_list[i]}
+ native_ldso_name=${lsb_ldso_abi_list[i+1]}
+ lsb_ldso_name=${lsb_ldso_abi_list[i+2]}
+ has ${lsb_ldso_abi} $(get_install_abis) || continue
+
+ if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then
+ dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}"
+ fi
+ done
+
+ # With devpts under Linux mounted properly, we do not need the pt_chown
+ # binary to be setuid. This is because the default owners/perms will be
+ # exactly what we want.
+ if ! use suid ; then
+ find "${ED}" -name pt_chown -exec chmod -s {} +
+ fi
+
+ #################################################################
+ # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
+ # Make sure we install some symlink hacks so that when we build
+ # a 2nd stage cross-compiler, gcc finds the target system
+ # headers correctly. See gcc/doc/gccinstall.info
+ if is_crosscompile ; then
+ # We need to make sure that /lib and /usr/lib always exists.
+ # gcc likes to use relative paths to get to its multilibs like
+ # /usr/lib/../lib64/. So while we don't install any files into
+ # /usr/lib/, we do need it to exist.
+ keepdir $(alt_prefix)/lib
+ keepdir $(alt_prefix)/usr/lib
+
+ dosym usr/include $(alt_prefix)/sys-include
+ return 0
+ fi
+
+ # Files for Debian-style locale updating
+ dodir /usr/share/i18n
+ sed \
+ -e "/^#/d" \
+ -e "/SUPPORTED-LOCALES=/d" \
+ -e "s: \\\\::g" -e "s:/: :g" \
+ "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
+ || die "generating /usr/share/i18n/SUPPORTED failed"
+ cd "${WORKDIR}"/extra/locale
+ dosbin locale-gen
+ doman *.[0-8]
+ insinto /etc
+ doins locale.gen
+
+ keepdir /usr/lib/locale
+
+ cd "${S}"
+
+ # Install misc network config files
+ insinto /etc
+ doins posix/gai.conf
+
+ if use systemd ; then
+ doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf"
+ else
+ doins nss/nsswitch.conf
+ fi
+
+ # Gentoo-specific
+ newins "${FILESDIR}"/host.conf-1 host.conf
+
+ if use nscd ; then
+ doins nscd/nscd.conf
+
+ newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd
+
+ local nscd_args=(
+ -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
+ )
+
+ sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
+
+ use systemd && systemd_dounit nscd/nscd.service
+ newtmpfiles nscd/nscd.tmpfiles nscd.conf
+ fi
+
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
+ doenvd "${T}"/00glibc
+
+ for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
+ [[ -s ${d} ]] && dodoc ${d}
+ done
+ dodoc -r ChangeLog.old
+
+ # Prevent overwriting of the /etc/localtime symlink. We'll handle the
+ # creation of the "factory" symlink in pkg_postinst().
+ rm -f "${ED}"/etc/localtime
+
+ # Generate all locales if this is a native build as locale generation
+ if use compile-locales && ! is_crosscompile ; then
+ run_locale_gen --inplace-glibc "${ED}/"
+ sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
+ fi
+}
+
+glibc_headers_install() {
+ local builddir=$(builddir "headers")
+ cd "${builddir}"
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
+
+ insinto $(alt_headers)/gnu
+ doins "${S}"/include/gnu/stubs.h
+
+ # Make sure we install the sys-include symlink so that when
+ # we build a 2nd stage cross-compiler, gcc finds the target
+ # system headers correctly. See gcc/doc/gccinstall.info
+ dosym usr/include $(alt_prefix)/sys-include
+}
+
+src_install() {
+ if just_headers ; then
+ export ABI=default
+ glibc_headers_install
+ return
+ fi
+
+ foreach_abi glibc_do_src_install
+
+ if ! use static-libs ; then
+ einfo "Not installing static glibc libraries"
+ find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete
+ fi
+}
+
+# Simple test to make sure our new glibc isn't completely broken.
+# Make sure we don't test with statically built binaries since
+# they will fail. Also, skip if this glibc is a cross compiler.
+#
+# If coreutils is built with USE=multicall, some of these files
+# will just be wrapper scripts, not actual ELFs we can test.
+glibc_sanity_check() {
+ cd / #228809
+
+ # We enter ${ED} so to avoid trouble if the path contains
+ # special characters; for instance if the path contains the
+ # colon character (:), then the linker will try to split it
+ # and look for the libraries in an unexpected place. This can
+ # lead to unsafe code execution if the generated prefix is
+ # within a world-writable directory.
+ # (e.g. /var/tmp/portage:${HOSTNAME})
+ pushd "${ED}"/$(get_libdir) >/dev/null
+
+ local x striptest
+ for x in cal date env free ls true uname uptime ; do
+ x=$(type -p ${x})
+ [[ -z ${x} || ${x} != ${EPREFIX}/* ]] && continue
+ striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) || continue
+ case ${striptest} in
+ *"statically linked"*) continue;;
+ *"ASCII text"*) continue;;
+ esac
+ # We need to clear the locale settings as the upgrade might want
+ # incompatible locale data. This test is not for verifying that.
+ LC_ALL=C \
+ ./ld-*.so --library-path . ${x} > /dev/null \
+ || die "simple run test (${x}) failed"
+ done
+
+ popd >/dev/null
+}
+
+pkg_preinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ # prepare /etc/ld.so.conf.d/ for files
+ mkdir -p "${EROOT}"/etc/ld.so.conf.d
+
+ # Default /etc/hosts.conf:multi to on for systems with small dbs.
+ if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
+ sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
+ einfo "Defaulting /etc/host.conf:multi to on"
+ fi
+
+ [[ -n ${ROOT} ]] && return 0
+ [[ -d ${ED}/$(get_libdir) ]] || return 0
+ [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
+
+ if [[ -L ${EROOT}/usr/lib/locale ]]; then
+ # Help portage migrate this to a directory
+ # https://bugs.gentoo.org/753740
+ rm "${EROOT}"/usr/lib/locale || die
+ fi
+
+ # Keep around libcrypt so that Perl doesn't break when merging libxcrypt
+ # (libxcrypt is the new provider for now of libcrypt.so.{1,2}).
+ # bug #802207
+ if ! use crypt && has_version "${CATEGORY}/${PN}[crypt]"; then
+ PRESERVED_OLD_LIBCRYPT=1
+ preserve_old_lib /$(get_libdir)/libcrypt$(get_libname 1)
+ cp "${EROOT}"/usr/include/crypt.h "${T}"/crypt.h || die
+ else
+ PRESERVED_OLD_LIBCRYPT=0
+ fi
+}
+
+pkg_postinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
+ # Generate fastloading iconv module configuration file.
+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/"
+ fi
+
+ if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
+ use compile-locales || run_locale_gen "${EROOT}/"
+ fi
+
+ # Check for sanity of /etc/nsswitch.conf, take 2
+ if [[ -e ${EROOT}/etc/nsswitch.conf ]] && ! has_version sys-auth/libnss-nis ; then
+ local entry
+ for entry in passwd group shadow; do
+ if egrep -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then
+ ewarn ""
+ ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been"
+ ewarn "removed from glibc and is now provided by the package"
+ ewarn " sys-auth/libnss-nis"
+ ewarn "Install it now to keep your NIS setup working."
+ ewarn ""
+ fi
+ done
+ fi
+
+ if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then
+ preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1)
+ cp "${T}"/crypt.h "${EROOT}"/usr/include/crypt.h || eerror "Error restoring crypt.h, please file a bug"
+ elog "Please ignore a possible later error message about a file collision involving"
+ elog "/usr/include/crypt.h. We need to preserve this file for the moment to keep"
+ elog "the upgrade working, but it also needs to be overwritten when"
+ elog "sys-libs/libxcrypt is installed. See bug 802210 for more details."
+ fi
+}
diff --git a/sys-libs/libcap/Manifest b/sys-libs/libcap/Manifest
index 21096467e341..158d459d5e02 100644
--- a/sys-libs/libcap/Manifest
+++ b/sys-libs/libcap/Manifest
@@ -7,7 +7,7 @@ AUX libcap-2.52-build-system-fixes.patch 7320 BLAKE2B 7b7de195e7cec61b395e9cbf1d
DIST libcap-2.49.tar.xz 139568 BLAKE2B 5746dcdf2a737e747450bd50a701ee8543277b17b7fbf1304b79f707a088ea74dc6dc79c61ff89b55b718a460a7b0814f960f44d07944a97b832b78f4e14e07f SHA512 2934a2ded1370edeb9603dbf43d8ca23a2eb5d67efc5cec5d4ba96c707a8db2702da8aa9be0cb86c5ff100d37ec96115c7777a7566ad0ab2e0b4a288bbe357d0
DIST libcap-2.51.tar.xz 145440 BLAKE2B 9f004e28891fbbb3552016e2e9250eab38935b6b40ad9e808a64ab07eecb52c5fa9032caed0baab719df8afe9aeec98403d10b05336bebe15a50b64020e5afc2 SHA512 3b4a97ef864a2ce2f87056ebc282223b0c71ca71c539744dc629ffe7905ca5fdde937ca70c34ec84406fe54863d39abf32775818a5e5a6fdf3069706b1723a88
DIST libcap-2.52.tar.xz 158720 BLAKE2B 0696ae00a485df019f5441efe1d71676ddf294f1116e7fc3f352ad0595f9d4830f2e4fac1f98353016de36a4866f9d018f53419970ccd114c6df0faa556bcea3 SHA512 95d9e0f81fd955c42a0f299163a4402f00e9e7a2b392dfbabe613abea4babba2730576e76c9b612665a0bb8bd88aa98bf28ea3eb5582b5c06cd1137594a59893
-EBUILD libcap-2.49.ebuild 2195 BLAKE2B b5950f22f86e8ee2008751b9ab76013d603c201e5b1c1665c34f4d7e31bb2102ad1e3ad1c0ad67b2ca48ae5f76ba4c12169f61493a3861e97f1744a3d5355133 SHA512 2a84719633d35cd16a301cbdcde67dc1ee4e7f1f04c043303404d1b088529491fdfdfadd29c3eb5f8a2afbfe7dede105885063322645bca986ffcdf002bb42ee
-EBUILD libcap-2.51.ebuild 2203 BLAKE2B 399ce7893f4ca837e9dfef9812c20f59d415e713ce8c8e12e314c9661afbff6eec1be46550b75d2b853babf4cf1b10d51272ab3b8effc3d3cfe20f6244f9bc12 SHA512 c156a98c337eb09e24a36bbe746d1f724f360df9d53a6e551ee556bf0d794414c505251611e2dd7fafbe759b1550837d609eada16dea2354e5e13fc9f4995902
-EBUILD libcap-2.52.ebuild 2146 BLAKE2B d9876af9fcd0de4fd1e1289ec51e1697700162c57c7222a3a63c5a8faff5233458cc2251e66914768d6ce2a46ce95ff5dde738388054480f4fafcdc5c8a7b7d2 SHA512 ca8d558788aa27fc57270906e6df1f10f50135ccf8e2c5fc329f3f2c15358a6dbed9e0bcc0962f810387f3bf3bd963c757a873f646740885631640ba15d2346e
+EBUILD libcap-2.49-r1.ebuild 2127 BLAKE2B d77712422b1cb13b04b1a18e573c20151b03098a9effaee4a62b51f4035eac2f3dcc2760f6050d05220dca63edbd978df79299e6be4c885a73ec7a079d1cd558 SHA512 fb01c7f3c68d3fa55221bc0602c21ddb399121f97a0a3c9ef5788bbecb3912cc9f9924bd0339e27acc3103d3a1e110b4029f99c27a7232fd83229075383d898b
+EBUILD libcap-2.51-r1.ebuild 2135 BLAKE2B 57512b05627f25da7f0f5f0d4c666033d10314f3616ce0c948e1e1efdb830e258db3fc84c09e07f738a98557045901033504392a7108143ce935dab9b2019f56 SHA512 c995e678606e6c344bcf81c628590566044d7b8f36088d1672cfda880a80ee16d6c2b611cc816d93bd8b2af7d263eaa4030668b46fe6ec585e31faab8cb77852
+EBUILD libcap-2.52-r1.ebuild 2078 BLAKE2B 40292480d5d4b12d8656b2a8957ba1f8e1196d48292673f0f7e1d72283867afd7e45cba1c128a342fef2b21346eef2f073df75104a37effccf488ba2e38b7cc8 SHA512 d34a442320a909d2f1051cbb0582ff8b60adcd6e909c4acac7e1cb3da1996f1253a4853aedd07dd0a8d62bc38d668670be063a6180bc656fa716730c9ad2634d
MISC metadata.xml 332 BLAKE2B 2177c836192a85a6d943221da405f7f11f355011767789d81009d5e4d822a203302a946fa1a0ffbc66be6a37a7069aa94a796125fa1dedbdf023762b47f8f614 SHA512 a9887500fd60b72156ac2589b1fefab8dd70b0c03477dd795f147fdc91bbe6fd027b8cf58c3e86cdb6e831368d34b4881cdf0e833af5aee9e7d1a01e90408ae1
diff --git a/sys-libs/libcap/libcap-2.49.ebuild b/sys-libs/libcap/libcap-2.49-r1.ebuild
index 48e28fcd6555..993d6f47b1c0 100644
--- a/sys-libs/libcap/libcap-2.49.ebuild
+++ b/sys-libs/libcap/libcap-2.49-r1.ebuild
@@ -17,10 +17,8 @@ IUSE="pam static-libs"
# While the build system optionally uses gperf, we don't DEPEND on it because
# the build automatically falls back when it's unavailable. #604802
-RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]"
PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- ${PDEPEND}
+DEPEND="${PDEPEND}
sys-kernel/linux-headers"
# Requires test suite being run as root (via sudo)
diff --git a/sys-libs/libcap/libcap-2.51.ebuild b/sys-libs/libcap/libcap-2.51-r1.ebuild
index 20f0382faa41..c4a5075d066b 100644
--- a/sys-libs/libcap/libcap-2.51.ebuild
+++ b/sys-libs/libcap/libcap-2.51-r1.ebuild
@@ -17,10 +17,8 @@ IUSE="pam static-libs"
# While the build system optionally uses gperf, we don't DEPEND on it because
# the build automatically falls back when it's unavailable. #604802
-RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]"
PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- ${PDEPEND}
+DEPEND="${PDEPEND}
sys-kernel/linux-headers"
# Requires test suite being run as root (via sudo)
diff --git a/sys-libs/libcap/libcap-2.52.ebuild b/sys-libs/libcap/libcap-2.52-r1.ebuild
index 6dc8e00f317b..7a79484719d5 100644
--- a/sys-libs/libcap/libcap-2.52.ebuild
+++ b/sys-libs/libcap/libcap-2.52-r1.ebuild
@@ -17,10 +17,8 @@ IUSE="pam static-libs"
# While the build system optionally uses gperf, we don't DEPEND on it because
# the build automatically falls back when it's unavailable. #604802
-RDEPEND=">=sys-apps/attr-2.4.47-r1[${MULTILIB_USEDEP}]"
PDEPEND="pam? ( sys-libs/pam[${MULTILIB_USEDEP}] )"
-DEPEND="${RDEPEND}
- ${PDEPEND}
+DEPEND="${PDEPEND}
sys-kernel/linux-headers"
# Requires test suite being run as root (via sudo)
diff --git a/sys-libs/libfaketime/Manifest b/sys-libs/libfaketime/Manifest
index b3a7b72c1f2e..cd656170908c 100644
--- a/sys-libs/libfaketime/Manifest
+++ b/sys-libs/libfaketime/Manifest
@@ -1,5 +1,5 @@
DIST libfaketime-0.9.6.tar.gz 53540 BLAKE2B 5559e683d9d513fe60fe4b7f22a2ee794bccd8b1fe2a58735876fb9a0f05e1157d20485cfc2f0bcefa0b1f642f3b981de00471a36998867b0024dd8ac5a77466 SHA512 22cd796d4c6f7b327c664895df5b93b72a7243d886bf5241f932cc23fd54049c5fb6a8351078d036d78d12cb6f530ff66b98ef75df6eba5339ebfef1e7561225
DIST libfaketime-0.9.9.tar.gz 78610 BLAKE2B 863e3aaf5f26a7b4d6104bdf5dd8fc0ac70547770d01cad302e476a7eeee63f0900ddc825aa75f6db7be08155d7ceb05f3b730fffb9e4928147fbdc097ee0df8 SHA512 b1aecf456753ccf771f0f80c92d57ffcd2c8349dde93a575862b4570a06812d4bce104f2efbcfd627a85a80fed99dbc37cb156dda0389892bfb4e71df816191f
-EBUILD libfaketime-0.9.6-r3.ebuild 1405 BLAKE2B 999273c6ac101056ad34a6f44b0400f96c1e878cd07d685efd5811672a4675bb8fa404086e7cefbb6b92ef909a11db9bf6ad69ff6d5a725fac125f6bc088a041 SHA512 8bae6e88b782a616c114a87be7255918f03e94c69f32244fca36d0b209c179067c6cd71023005f27b9cb1d237e009835ec50236f9301733d86dfd687e613db35
-EBUILD libfaketime-0.9.9.ebuild 1775 BLAKE2B dc603ba42319e8d6359805baabedbbf547feb4a80012d67e0513d857b26b013f59ebc64b977a49058693b855d1a220fd7be4f349a4933c6316addfcfeb970885 SHA512 fec54ad27961e625d2bec81056131cde46f8a14747302e5c151130df788df1a6fd154e0867555904e749e0deca44881ee0323df1d8c14fab4a27dd15a3250bd5
+EBUILD libfaketime-0.9.6-r3.ebuild 1412 BLAKE2B bc345e1c106a7d8965bf8925082672760927259f7b03ae1d6695ee0afdce025711d383c5dc1e742276573b043826609cdad9b738daf7af23904219339fe1d5da SHA512 4ac78c91052aca7ea4197efd078c3fb5012f973601669b310f5643e96d86c00c8632755873598980c4ccf112882669ab7b815fe9bf6d5d578ac9de6b4697ea10
+EBUILD libfaketime-0.9.9.ebuild 1782 BLAKE2B ec3bea54e1113a5f411ae8e375f1ee470a1ac5958a091d75588d6e6edbed0fb1179fb1fc40861f5555189928d4545d41d9a015e0a3b4e7cb84b63d5e6cfc423e SHA512 718bd709994ad62613ad6f96bbd1496fb21ee284b99430b01cc0c5c2df172286a4debb7212b9972329554143ce7fbad8c405e6747ee50858e33200918557cd5b
MISC metadata.xml 844 BLAKE2B 55b522c415ccd092c6f940fafffe6d3ef871259265d125844b179f00c3fce55fd4b359c1b535a0ace47722938d2d2b744cf9062e1ff3e32bbea89b9b7a200691 SHA512 77924230fc18b29ee6c5891a73acde9158dabdec2d3f892ceeb84bc6e1b6f2b977dba05382a1da67fa8db6e57ca3be2161f6218e2f52feaefef690a0e1989893
diff --git a/sys-libs/libfaketime/libfaketime-0.9.6-r3.ebuild b/sys-libs/libfaketime/libfaketime-0.9.6-r3.ebuild
index abb0ce44c96d..b115280410ee 100644
--- a/sys-libs/libfaketime/libfaketime-0.9.6-r3.ebuild
+++ b/sys-libs/libfaketime/libfaketime-0.9.6-r3.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/wolfcw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ~ppc64 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~ppc ~ppc64 -riscv sparc x86"
src_prepare() {
default
diff --git a/sys-libs/libfaketime/libfaketime-0.9.9.ebuild b/sys-libs/libfaketime/libfaketime-0.9.9.ebuild
index 6f985492cd6d..332eb881b2bd 100644
--- a/sys-libs/libfaketime/libfaketime-0.9.9.ebuild
+++ b/sys-libs/libfaketime/libfaketime-0.9.9.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/wolfcw/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 -riscv ~sparc ~x86"
src_prepare() {
default
diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest
index 8ab1adf59fe4..abd9825e05ab 100644
--- a/sys-libs/musl/Manifest
+++ b/sys-libs/musl/Manifest
@@ -1,9 +1,10 @@
AUX ldconfig.in 2552 BLAKE2B c94f9900e8582d707519171c4b61079c801b60c555677b1740b04adbdec9645578b9a8fc91f11413072568f316c795e46a332970f3d2dde5272b0c49a5d60a78 SHA512 59f1b57361196363d3f127366764f05d26c23dbe3d3dbcdba9bd3c8ca26a671fd713b96d31c509d22805c57ada2b596d979a3f5795bcf0a4d3ac7d168f3bf377
+AUX musl-1.2.2-gethostid.patch 1028 BLAKE2B fbe554e681c8f0e4bff6ec6fe97c88fd3c7f84ac07580b5f6cfef13b6b27c985f4f0e1d7722f397c59e655b8cd864fa845f9af2aa0eaa9287349f41e71f7a257 SHA512 d2959ef272e3a2742efec3983a41705cfa6424110dbc1eb53a912492cf067881cdbcb8cd864757e6450dda9b47e0cca7dbe3a86d3e6e74e7f33fb7d1723edfde
AUX stack_chk_fail_local.c 1798 BLAKE2B 380bcbb920bd40a5185246621ba93716f27d61cd0077cd796ff267e10c534c9cc64982b2a66c89b61395dc93d67dae77e8c59908f65f2903f16016180cf94bbb SHA512 bb0bdd7f205d57771920c7ea898c1f84a55d6f90ddd1f8203bfeed98d13ccefa6f68d5fd1c0761321b2732ca928ca81b425e3fe8321c936d1316dea6f1930091
DIST getconf.c 11614 BLAKE2B ba49a573fc16d51780a0b0b81fbf7b64a1142f1dbad203c9609a59b6b07e7404f676c415383ae88c0aede95694821f6ee381bffd93cc3330501e17dc07d122bd SHA512 0d80f37b34a35e3d14b012257c50862dfeb9d2c81139ea2dfa101d981d093b009b9fa450ba27a708ac59377a48626971dfc58e20a3799084a65777a0c32cbc7d
DIST iconv.c 2577 BLAKE2B 070ca87b30c90ab98c27d5faf7a2fcb64ff7c67ca212ee6072165b2146979c551f714954dbd465462a171837c59b6ea027e0206458a2df0f977e45f01be3ce48 SHA512 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf
DIST musl-1.2.2.tar.gz 1055220 BLAKE2B a000357ed52e417d8cebe5537df658dc0f8f02f2da3efcd79125544ad63e11e05fa96136551d0bfeb09a3f6c9a2260bffcfbd329ea92e6a7b62aa690f48968aa SHA512 5344b581bd6463d71af8c13e91792fa51f25a96a1ecbea81e42664b63d90b325aeb421dfbc8c22e187397ca08e84d9296a0c0c299ba04fa2b751d6864914bd82
DIST musl-getent-93a08815f8598db442d8b766b463d0150ed8e2ab.c 11656 BLAKE2B 1b7bf7102a1eb91a8cb881ed8ca65eb8eed911dd50238e97dc2952d89d4c6ebed6bfd046a2b38776c550b2872ab54ced8cb452fcc2ad56e5616f722debda761f SHA512 7f5b9d934d82deb5f8b23e16169a5d9b99ccab3a4708df06a95d685e1b24a3a3e69b3dcf4942f2f66c12a3d4bf0c5827e2ee2e8c4d7b1997359fccc2ac212dee
-EBUILD musl-1.2.2-r2.ebuild 3686 BLAKE2B 66d760890b32b593cb681b8c6d2ef8cfa314d540cdb0bac165acb35b13b9a69b43820fe6c8a5f8eeab555d72066e62a3dba6426b56140e534ac9a12a5e720d07 SHA512 e7f1ee6262e1f7d249086541addea444540671f135c78f84731500ff7b3b1f8b59e8219616e949b3fd167a1d520291e62ddbea16c0202233d36b797b5fd31d66
+EBUILD musl-1.2.2-r3.ebuild 3814 BLAKE2B 037af7d810ace77441369b4dc9a8513298167bbe7af7a010ad22f6ff7e99aba2cac0b6b8befd51f080fb3c695452ec7a3cecbdeb46cbfd06d2aef2415a96c28e SHA512 48cb68039a1cc61b230d2c9b549f01c40607ef2a0726589e558e412311f7e1ae988c7328f86b61b148ba88f2f107c72b2829ccd8ba16567a52a3840f2286d477
EBUILD musl-9999.ebuild 3692 BLAKE2B 1c5437d46c9c246d3f618416f07e209af31c1dae22abdfd7a5afd25a49f163511e9de93679d89edaf553646b10d349ab3b41f652b54270bad65e0f0461c893a9 SHA512 00d876467974f641804e1a27560c348c3eb25d7b9d776160fd505810e68a7c7afb82b228acd5d2787e3bb05c3878e6bf26912efa4c5ad8f38fc7635b04302270
MISC metadata.xml 453 BLAKE2B d7b2840a6b0bb2ede2124f22bde34a9f77ac258792a9fbf9d9e3f552a85d6ee539a98c8704729efb75dec627db62b33759fc0cfdfd01614abbc4960a163c5019 SHA512 5d8bebce119ed34a6a6b8cb07b3ce056db5efc91db80709fc8031c955b16e29965f3741f75e9afbe9f428bbac1e39e7c30278cd63f04479e3a1493b006195e0a
diff --git a/sys-libs/musl/files/musl-1.2.2-gethostid.patch b/sys-libs/musl/files/musl-1.2.2-gethostid.patch
new file mode 100644
index 000000000000..96c799cfca29
--- /dev/null
+++ b/sys-libs/musl/files/musl-1.2.2-gethostid.patch
@@ -0,0 +1,43 @@
+Subject: [musl] [PATCH] extend gethostid beyond a stub
+Archived-At: <https://inbox.vuxu.org/musl/20210420191519.23822-3-ericonr@disroot.org/>
+List-Archive: <https://inbox.vuxu.org/musl/>
+List-Post: <mailto:musl@inbox.vuxu.org>
+
+From: Érico Rolim <erico.erc@gmail.com>
+
+Implement part of the glibc behavior, where the 32-bit identifier stored
+in /etc/hostid, if the file exists, is returned. If this file doesn't
+contain at least 32 bits or can't be opened for some reason, return 0.
+---
+ src/misc/gethostid.c | 15 ++++++++++++++-
+ 1 file changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/src/misc/gethostid.c b/src/misc/gethostid.c
+index 25bb35db..d529de9c 100644
+--- a/src/misc/gethostid.c
++++ b/src/misc/gethostid.c
+@@ -1,6 +1,19 @@
+ #include <unistd.h>
++#include <stdio.h>
++#include <stdint.h>
+
+ long gethostid()
+ {
+- return 0;
++ FILE *f;
++ int32_t rv = 0;
++
++ f = fopen("/etc/hostid", "reb");
++ if (f) {
++ if (fread(&rv, sizeof(rv), 1, f) == 0) {
++ rv = 0;
++ }
++ fclose(f);
++ }
++
++ return rv;
+ }
+--
+2.31.1
+
+
diff --git a/sys-libs/musl/musl-1.2.2-r2.ebuild b/sys-libs/musl/musl-1.2.2-r3.ebuild
index 905348ba854e..5d2851eac250 100644
--- a/sys-libs/musl/musl-1.2.2-r2.ebuild
+++ b/sys-libs/musl/musl-1.2.2-r3.ebuild
@@ -71,6 +71,13 @@ src_unpack() {
cp "${DISTDIR}"/iconv.c misc/iconv.c || die
}
+src_prepare() {
+ default
+
+ # Expand gethostid instead of being just a stub
+ eapply "${FILESDIR}/${PN}-1.2.2-gethostid.patch"
+}
+
src_configure() {
tc-getCC ${CTARGET}
just_headers && export CC=true
diff --git a/sys-libs/pam_wrapper/Manifest b/sys-libs/pam_wrapper/Manifest
index 805d75f9808c..3e055fcc71b6 100644
--- a/sys-libs/pam_wrapper/Manifest
+++ b/sys-libs/pam_wrapper/Manifest
@@ -1,3 +1,3 @@
DIST pam_wrapper-1.1.3.tar.gz 118034 BLAKE2B 3c05e74959f3c6dfd35575cc5f9187f4a328bfd7ce002e327fc135c82a4ff1513add87678360992d2010c124f7fd95e4bdb3c0a4d63418d9711069cbc200e417 SHA512 3b7cbd25ae7dd73f4a0c64a7762cdeb38cc7ba6e8b4e18e79aceffea09241d520aa884de88e4105b5957b2b18ec682be6568a6bfccf82b9354a3510cd2cd98eb
-EBUILD pam_wrapper-1.1.3.ebuild 1100 BLAKE2B 24d7a05108dd7594995423f5036c61c8db36c82968bb855a92224c2ea1089f5cfbad1967aa5011796ea7a3072dab18b470d9040dd66ce7fb04608693c4e8c773 SHA512 448124cc522109acca526d0314a71d88bc81d097c7844d40d5327fdfd5022c6b3fec39f73969540f0e8e4c3847aa79d8427f706b1a724db45304530b5bf32477
+EBUILD pam_wrapper-1.1.3.ebuild 1107 BLAKE2B c7c5c853f9a1afb50dbf13cb3ffbce7cf53e8c8dba0bcf18e58ea54357c8e4a34e464e6d920d4d86e28a76b345f350067f7a9392f20f4d07be2fc354a6fb9928 SHA512 565455f3861d0b67f6cf68962816f9059002b37bc66221903f4b5e5555db0d3351323b2de3e5bb372b92ba0c4095a4ab1daf1209234243d93b5c3e8905a8855a
MISC metadata.xml 249 BLAKE2B 274f77317bba157c3ad4c3e9827ce5ce934c855b8bd41e603df69f1343c296abf7faec755a56f5f8d0e76f43058156e95480a386494265385604401e70484acf SHA512 940515e5f54189b5ba3c1118ea45f679182c9075091ade1959b197a6dc5fba894cd52cd0289e00a4a139b1cd3c6563771a1e21d2baa460a25892b0fa20e819a8
diff --git a/sys-libs/pam_wrapper/pam_wrapper-1.1.3.ebuild b/sys-libs/pam_wrapper/pam_wrapper-1.1.3.ebuild
index 7c80c4284bc8..2643b37d037f 100644
--- a/sys-libs/pam_wrapper/pam_wrapper-1.1.3.ebuild
+++ b/sys-libs/pam_wrapper/pam_wrapper-1.1.3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-PYTHON_COMPAT=( python3_{7..9} )
+PYTHON_COMPAT=( python3_{8..9} )
CMAKE_ECLASS=cmake
inherit cmake-multilib python-single-r1
@@ -14,7 +14,7 @@ SRC_URI="https://www.samba.org/ftp/pub/cwrap/${P}.tar.gz
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc x86"
+KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc x86"
IUSE="test"
RESTRICT="!test? ( test )"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"