diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-11-12 16:49:02 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-11-12 16:49:02 +0000 |
commit | 519e4d5d99fc43d5c9a038098c029dc4ef9d6792 (patch) | |
tree | 7e99d88a777fe8c9d3ec6310bf7eea639b0e66b4 /sys-libs | |
parent | a5332b59346f7cbf0fdbd148b54aa8a84aaf8190 (diff) |
gentoo resync : 12.11.2017
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/glibc/Manifest | 6 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.25-r9.ebuild | 2 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.26-r3.ebuild | 789 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-9999.ebuild | 4 |
4 files changed, 796 insertions, 5 deletions
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index 8a40161d0fef..8431c68d87ee 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -38,6 +38,7 @@ DIST glibc-2.25-patches-11.tar.bz2 64221 SHA256 38c76c844238a7bbaecc85b359e67af6 DIST glibc-2.25-patches-12.tar.bz2 65396 SHA256 60a8901ceab4066661285cdbf7559d3a1f66bf468c5c1a5ecdde7f8ead282d3e SHA512 6af8c304ba70b42dfda294873d9a138d6c98e7a46496e305b2cac99a085d1ad3d00315162d1e1458e651de95e158bd35be74406a3f44fde13182e30baa663fcb WHIRLPOOL 96684d379d65ca6e4da7d397d4b803e0b0516080223de86080d6bbf3cae6a17b9fc8922d6fc2071b3116f35136378d85eb6671c7d9f7cf0f2135b66d1573bb90 DIST glibc-2.25.tar.xz 13873900 SHA256 067bd9bb3390e79aa45911537d13c3721f1d9d3769931a30c2681bfee66f23a0 SHA512 5b7a2418d5b8a1b6a907c6c7fb6477ee2a473151cb45e03d0d4cdd9a33497c90b1ee39e2e7e885e2b25743dcd3747336ef114b4a73eb001da1fd79f29e0f9a6e WHIRLPOOL dc2fafaa4a0e5581268338453838a03ed0c5e7a2af844e8fb7086ab8d3ae48efbdbe6f25db1d089ae669cd2f8b0412f690d965506753d86f8525da2df59b7953 DIST glibc-2.26-patches-2.tar.bz2 68040 SHA256 c40f03059d389fd8b22b54f83c0a669c44a38ee84cc359cb86d8f6dbdd1b957f SHA512 2b54d6e33b29d5ee5e4d4b64f299bf15e22ece5ce6555dafe43fd97ec8a2d9ef0645075ff24dc593ec6f89e02caf40c25a72af93ecd11113fba77268ccf486e2 WHIRLPOOL 59c54cdd2e3e64091dd206ad6b5ff467eff6c0d7f8ef5ab11504a4e6cfe958f762b9de2fbe8b6004a9e19963520a84a493ccf03908a78ea0a452dbc28e0df1e5 +DIST glibc-2.26-patches-4.tar.bz2 315447 SHA256 2f49edd3a45bc5bb3c16f86228bfdeaba7e2b48b7eefad63e2ffa2ed3f6d628e SHA512 04d229e5f9342d62f2fce039c70489609886782d8aabd49403863a1a679e3b0890ca26c129088738a4af7ef6d95c74f24fb3c4d03695bf7ba6e45eca4de1a5f0 WHIRLPOOL 06b31af65b4f6092fa7b8776507cfdd014649670dae49c1d6a35ce61b3345d08acb9e09076a8cfe310ffe7d698d212310c8f497366c57240a463a31a39a175d9 DIST glibc-2.26.tar.xz 14682748 SHA256 e54e0a934cd2bc94429be79da5e9385898d2306b9eaf3c92d5a77af96190f6bd SHA512 6ed368523bc55f00976f96c5177f114e3f714b27273d7bffc252812c8b98fb81970403c1f5b5f0a61da678811532fb446530745492d2b49bfefc0d5bd71ce8c0 WHIRLPOOL 9091c3bccc9b590de6b9595aa391ba01091f0c301bd9199d7c48fbeaeeb013ec9c683c68b65b59c5a69e3905b7f842cca1b0a410431967ecb3a1229b8535486f DIST glibc-9999-patches-3.tar.bz2 19892 SHA256 97f60ed6debd495610b123d7a27227e75942bea1a0fb1e5f78833a6f3bbe6c64 SHA512 75084b86a83d447d3a4b3959fa2a93d849e304ba9473ebec5570ca4fb5e2f8dfb38548faf3abc9fbd29b529f2c608b52eb2ef2e6e9a2ad5bea9a9298a19ef596 WHIRLPOOL 04a5c30aabf72530fa96fa3a8eadf8207d85d3a2a948ba5f4b72c0deeeae24e7eb71b99875f0e9b1018051fabb4a23630b41873fa4ff0d6ba9778ca6051212bf EBUILD glibc-2.17.ebuild 5489 SHA256 09a8f36c613552e89d7663fd29f79d1ec842e5732188610569e7f521f03178ec SHA512 2f68b5e8947a0c9086b788a0472260ab6e7026d3b1d8e35fe05ae0221a16079cbba085653dd676ff4af4f35de3f9e05d83eaed6cdfd44b5e9538ae7d802cdc87 WHIRLPOOL 5ee03596ade2788e055d9894bf85d3ab2f77d7541088ab1616cd888355a4f05d804cfb1dacfb460cf3f6f762afdc72c844844ab2dd7a725f3d261d3be6d8ddfe @@ -50,9 +51,10 @@ EBUILD glibc-2.23-r3.ebuild 4890 SHA256 364b764f399b9525f719563cf2d50c0c75c09241 EBUILD glibc-2.23-r4.ebuild 5011 SHA256 3690a8b559bd563dc9af89d1217f5021c7da1b89eb5ec513e8b725e04cb45e0e SHA512 3695c8acea09838cc79c33379cfcaf0eb774759f3af5863892ff9c63732926764a8a5187ab9aaccdfd358d62c0884feab95a7055735c9295549d5c8f0c198221 WHIRLPOOL d6a6404e9968ea604d578d500ff7cd550097c1cc30713d61253a130d6a26f9f228ea83189abc611b4704e58be2b74323ab8f106faf4d3db92f7c61f27bf43d93 EBUILD glibc-2.24-r4.ebuild 5047 SHA256 c200272f9c19ce196e788572aa0ff5e0e0a24b37b6fd3b0a85236406b6ea8f11 SHA512 d93834a9012716293c1992d6217eed6364782e6e01c692e349c6edb00bbda6dd5f227f70977e438b46de0861e9a2d4bc8c04270873cec75b1eb395b1328ea8e2 WHIRLPOOL 4dfbf4334444fb77baca96eb14911738f3253709816a6e87ddc2d53c5eebfec22abc32dd61dece00dd250a13574a35df5b8bb3d6812b6fb27e05e192c5d44297 EBUILD glibc-2.25-r8.ebuild 5040 SHA256 3a4f5ba8e69de50e0e454aba133307a8bd778fdaa06e8869769572cffa203e82 SHA512 e1794aca6c71a8ea5e93388ef4b86e426d19053b32ba606f9392c3c1586a410461921a847a191dc4c774230b48446f412aa1350774cea4aa85f4d3058f14f25a WHIRLPOOL a29f7b356bb02ea996a4c1b9e7f6aa2056fc624cb8fd47fde8fb89cd1ecc9e3964193a25e723ad32d29033fafae481db6313264b3561a30717bd0bd2c7634409 -EBUILD glibc-2.25-r9.ebuild 5048 SHA256 65ad3a50ea2e395aecc075eb39cef503ec18cc2fc8bacdfae061e3092cc7f3ac SHA512 db9960041e3f9049df29677022f46dbdb9053bebe9df3123d62c746c85e09d6b4c7b5fbc965129486feff8a24a6038b0524a1aebaf3bba4ee3dfae1578df88bb WHIRLPOOL 13d569b1bcde071f105717ae60c08ba7f71fec78e6f6928f04500609fefe7f7e6ab5c011214c11a6b22a27d75fd138bf73397edbcbf9f6545f3624caa1d1def2 +EBUILD glibc-2.25-r9.ebuild 5043 SHA256 be3b5fed6b709d7e7f0dc36bc0dc6d4a9684c64c3945333cd813c5b9366da43b SHA512 87925f8352aeb8d6c302b0f0ae6868c801915e026c2e1e991b83dbab64d8a8810e756b87b4b75ebedc88a30037da4abeade972bc72370b4c306cadb55b48596b WHIRLPOOL 2accb9ce6953832a1f38f3cc55ffab07874bdd65f575dcd5869f531268907b0bce5d91a197df859bef91ddb8190e69b88bda4a9434682b0e2d44c5b449afb2f3 EBUILD glibc-2.26-r2.ebuild 23725 SHA256 f67f77719efc019599fcefa6f54e1c5dd6f8ed90a0afb42307994d7d42b5ced8 SHA512 e9ef1fb2811ac3df63ea69f6f72d34c049917e8760ddb6526d10cd372d11958bfcff7de6d170553970de9a1a59f8eaace01743fa456a5bfa7156461059d30329 WHIRLPOOL 091ad1a6e474082e960a4a0b32a8fd461826a5e7a71b932f0c309c3e0eed7e97e664fdd109f945848a9fe77c6f5abc059555e0f4c258d3a9656201ccbc8c5aef -EBUILD glibc-9999.ebuild 23751 SHA256 40e60e78c634ca1d0f98e2977848293227f024061d3b5b94bc79efbc29f2da91 SHA512 b838731aada38f6cba85d93a4aaaec58fd812be2ebf36aea6194eee71b49c49c8d18a82e8dd081b1322585fea9cf2185e78a8a0acad48eebb258a55751a4bd5b WHIRLPOOL d85c92b0e66dc5e8c7f7076658a9a818bcd89ed4e5e8846064fe9fe8d30421ca34193017bc5cfee1c44da34a411ea9aa17d9630ccba009c136061d75bf110822 +EBUILD glibc-2.26-r3.ebuild 23521 SHA256 b9374463d1f12f67fcddd5ae29196253e86c54a2d7cadd823abba31080403338 SHA512 f2efa774e3cdf40e455c5141f78238809183204d170b599e485b344194db6d220202a85b0d7fae53e6d96b459e7f38d8f17a183739361c54fc4472dcdb64f08e WHIRLPOOL 3a2a6575138a898b5ed3a8e005e48e7844468a47b67c9d174b38df0e72a39f47157949505283ea75edd3ec450be3f54078baf18c2831fc50b18a96290829670d +EBUILD glibc-9999.ebuild 23748 SHA256 a930433b65ca897992f5803751a6ac2aa1b81b211ee5c4c70f66cd941742528e SHA512 aec196aa351d008f01520fe7b0805ffcff2b3a8c37c64282889c3e45ba9a08676e8b9e41e1d759b3d5087f4857776b371009f3dc749c77428643047159ee4318 WHIRLPOOL 406f255b67982e3c98207b3c8d8799e2eddce662c8664c19c70359b4c19ef806bbd0fa8b05d4c5539d1b7d6950ec0d1162a0fc2567f639c4c56388d46f62d38e MISC ChangeLog 17234 SHA256 6aa54d20b4de284c51e7d0691f861af52e68376d48e91788c79f8ee821300a91 SHA512 39aa17d86df6c1d53c9c2ad268b2123bafccd45a226e064e3b759bda73294c7896d43f9846bf2fa401d29fa04efecee414674d923bb632915175adf7e8b24b2b WHIRLPOOL d60c804c21d7b0065aca45a3f761f0c81f96fe681d60df7f33ce13c879325d23a9908a134f948e50f3c57b5c596c93d1b04932bfb501e88d6d1d88847df62d32 MISC ChangeLog-2007 108548 SHA256 d622be202eb0d61a363b0ae4065012cd1d494fefaa0c03d4aa7986177cdde6d0 SHA512 fdb3f311a3be4b97a6acfceb1763af5ea69e74d8195522c5d03307f75e15a9382991e9e29dbfdec79e74f1c36328f82648768749bc929e5050ff64b628c7ca98 WHIRLPOOL e550f354394569069e000a7e70ec69c94388a0f415c19b427203f0dcbcbeeec0f5e379ee2af7886cd2d68559e749fab8122e7e077985729d7e0e728ae9096d7a MISC ChangeLog-2015 77895 SHA256 d7c16b77521b14a7e1c148f1ad699128e4fcf7caf41a77b46844508ba68acf15 SHA512 1a7fee53e1ec55d0b16b949543b01ad6f429f74293cb6ed730f05a3ddfc4a21fdaf7ee80c0c839d456587a207780ccfefdaf68a236989db5129ffba30c77ff5e WHIRLPOOL 48d46ac586309e415b7d669598c330062afd6fcb2668600d5c62e234d5ab8c3dfd2e81d4f528689efb6d5fb5e2ca5e24c68a4c58be52e1c336127d63224e18fd diff --git a/sys-libs/glibc/glibc-2.25-r9.ebuild b/sys-libs/glibc/glibc-2.25-r9.ebuild index 677fd2bb5186..be7fea22eaac 100644 --- a/sys-libs/glibc/glibc-2.25-r9.ebuild +++ b/sys-libs/glibc/glibc-2.25-r9.ebuild @@ -9,7 +9,7 @@ DESCRIPTION="GNU libc6 (also called glibc2) C library" HOMEPAGE="https://www.gnu.org/software/libc/libc.html" LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +KEYWORDS="alpha ~amd64 ~arm ~arm64 ~hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh ~sparc x86" RESTRICT="strip" # strip ourself #46186 EMULTILIB_PKG="true" diff --git a/sys-libs/glibc/glibc-2.26-r3.ebuild b/sys-libs/glibc/glibc-2.26-r3.ebuild new file mode 100644 index 000000000000..e653041df346 --- /dev/null +++ b/sys-libs/glibc/glibc-2.26-r3.ebuild @@ -0,0 +1,789 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit prefix toolchain-glibc + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" + +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +RESTRICT="strip" # Strip ourself #46186 +EMULTILIB_PKG="true" + +# Configuration variables + +if [[ ${PV} == 9999* ]]; then + EGIT_REPO_URI="git://sourceware.org/git/glibc.git" + inherit git-r3 +else + # KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" + KEYWORDS="" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER="4.7.3-r1" + +# Gentoo patchset +PATCH_VER=4 + +SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2" +SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 )" + +IUSE="audit caps debug gd hardened multilib nscd selinux systemtap profile suid vanilla crosscompile_opts_headers-only" + +# Min kernel version nptl requires +: ${NPTL_KERN_VER:="2.6.32"} + +# 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 + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} + +SLOT="2.2" + +# General: We need a new-enough binutils/gcc to match upstream baseline. +# arch: we need to make sure our binutils/gcc supports TLS. +COMMON_DEPEND=" + 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} + >=app-misc/pax-utils-0.1.10 + !<sys-apps/sandbox-1.6 + !<sys-apps/portage-2.1.2 +" +RDEPEND="${COMMON_DEPEND} + !sys-kernel/ps3-sources + sys-apps/gentoo-functions + !sys-libs/nss-db +" + +if [[ ${CATEGORY} == cross-* ]] ; then + DEPEND+=" !crosscompile_opts_headers-only? ( + >=${CATEGORY}/binutils-2.24 + >=${CATEGORY}/gcc-4.9 + )" + [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" +else + DEPEND+=" + >=sys-devel/binutils-2.24 + >=sys-devel/gcc-4.9 + virtual/os-headers + " + RDEPEND+=" vanilla? ( !sys-libs/timezone-data )" + PDEPEND+=" !vanilla? ( sys-libs/timezone-data )" +fi + +# +# the phases +# + +pkg_pretend() { + # Make sure devpts is mounted correctly for use w/out setuid pt_chown + check_devpts + + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ ${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" + die "Aborting to save your system" + fi + + if ! glibc_run_test '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n' + then + eerror "Your patched vendor kernel is broken. You need to get an" + eerror "update from whoever is providing the kernel to you." + eerror "https://sourceware.org/bugzilla/show_bug.cgi?id=5227" + eerror "https://bugs.gentoo.org/262698" + die "Keeping your system alive, say thank you" + fi + + if ! glibc_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" + eerror "a newer version as syscall(<bignum>) will break." + eerror "https://bugs.gentoo.org/279260" + die "Keeping your system alive, say thank you" + 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 + + use hardened && ! tc-enables-pie && \ + ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" + + # Make sure host system is up to date #394453 + if has_version '<sys-libs/glibc-2.13' && \ + [[ -n $(scanelf -qys__guard -F'#s%F' "${EROOT}"/lib*/l*-*.so) ]] + then + ebegin "Scanning system for __guard to see if you need to rebuild first ..." + local files=$( + scanelf -qys__guard -F'#s%F' \ + "${EROOT}"/*bin/ \ + "${EROOT}"/lib* \ + "${EROOT}"/usr/*bin/ \ + "${EROOT}"/usr/lib* | \ + egrep -v \ + -e "^${EROOT}/lib.*/(libc|ld)-2.*.so$" \ + -e "^${EROOT}/sbin/(ldconfig|sln)$" + ) + [[ -z ${files} ]] + if ! eend $? ; then + eerror "Your system still has old SSP __guard symbols. You need to" + eerror "rebuild all the packages that provide these files first:" + eerror "${files}" + die "old __guard detected" + fi + fi +} + +src_unpack() { + use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 + + setup_env + + # Check NPTL support _before_ we unpack things to save some time + check_nptl_support + + if [[ -n ${EGIT_REPO_URI} ]] ; then + git-r3_src_unpack + else + unpack ${P}.tar.xz + fi + + cd "${S}" + touch locale/C-translit.h #185476 #218003 + + cd "${WORKDIR}" + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 +} + +src_prepare() { + if ! use vanilla ; then + elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + if just_headers ; then + if [[ -e ports/sysdeps/mips/preconfigure ]] ; then + # mips peeps like to screw with us. if building headers, + # we don't have a real compiler, so we can't let them + # insert -mabi on us. + sed -i '/CPPFLAGS=.*-mabi/s|.*|:|' ports/sysdeps/mips/preconfigure || die + find ports/sysdeps/mips/ -name Makefile -exec sed -i '/^CC.*-mabi=/s:-mabi=.*:-D_MIPS_SZPTR=32:' {} + + fi + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" + find . -name configure -exec touch {} + + + eprefixify extra/locale/locale-gen + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" + + if use hardened ; then + # We don't enable these for non-hardened as the output is very terse -- + # it only states that a crash happened. The default upstream behavior + # includes backtraces and symbols. + einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" + cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die + cp "${FILESDIR}"/2.25/glibc-2.25-gentoo-chk_fail.c debug/chk_fail.c || die + + if use debug ; then + # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested. + sed -i \ + -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ + -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ + debug/Makefile || die + fi + fi +} + +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 $1" + + local v + for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS ; do + einfo " $(printf '%15s' ${v}:) ${!v}" + done + + # The glibc configure script doesn't properly use LDFLAGS all the time. + export CC="$(tc-getCC ${CTARGET}) ${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)" + einfo " $(printf '%15s' 'Manual CXX:') ${CXX}" + + echo + + local myconf=() + + # set addons + pushd "${S}" > /dev/null + local addons=$(echo */configure | sed \ + -e 's:/configure::g' \ + -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \ + -e 's: \+$::' \ + -e 's! !,!g' \ + -e 's!^!,!' \ + -e '/^,\*$/d') + [[ -d ports ]] && addons+=",ports" + popd > /dev/null + + case ${CTARGET} in + powerpc-*) + # Currently gcc on powerpc32 generates invalid code for + # __builtin_return_address(0) calls. Normally programs + # don't do that but malloc hooks in glibc do: + # https://gcc.gnu.org/PR81996 + # https://bugs.gentoo.org/629054 + myconf+=( --enable-stack-protector=no ) + ;; + *) + myconf+=( --enable-stack-protector=all ) + ;; + esac + myconf+=( --enable-stackguard-randomization ) + + [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp ) + + if [[ $1 == "nptl" ]] ; then + myconf+=( --enable-kernel=${NPTL_KERN_VER} ) + else + die "invalid pthread option" + fi + myconf+=( --enable-add-ons="${addons#,}" ) + + # 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=$(alt_build_headers) + --prefix="${EPREFIX}/usr" + --sysconfdir="${EPREFIX}/etc" + --localstatedir="${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_multiarch || echo --disable-multi-arch) + $(in_iuse systemtap && use_enable systemtap) + $(in_iuse nscd && use_enable nscd) + ${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=$(in_iuse audit && usex audit || echo no) + ac_cv_lib_cap_cap_init=$(in_iuse caps && 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="${EPREFIX}/sbin" + export libc_cv_slibdir="${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 "$1") + 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 ; 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-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die + mkdir -p sunrpc + cp $(which rpcgen) sunrpc/cross-rpcgen || die + touch -t 202001010101 sunrpc/cross-rpcgen || 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_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_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 + + # 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 + + 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=$(alt_build_headers) + --prefix="${EPREFIX}/usr" + ${EXTRA_ECONF} + ) + + local addons + [[ -d ${S}/ports ]] && addons+=",ports" + myconf+=( --enable-add-ons="${addons#,}" ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + CC="$(tc-getBUILD_CC)" \ + CFLAGS="-O1 -pipe" \ + CPPFLAGS="-U_FORTIFY_SOURCE" \ + 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)" || die "make nptl for ${ABI} failed" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +glibc_src_test() { + cd "$(builddir $1)" + emake -j1 check +} + +do_src_test() { + local ret=0 + + glibc_src_test nptl + : $(( ret |= $? )) + + return ${ret} +} + +src_test() { + # Give tests more time to complete. + export TIMEOUTFACTOR=5 + + foreach_abi do_src_test || die "tests failed" +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}$(alt_prefix)" install || die + + # 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 real_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) + + # Newer versions get fancy with libm linkage to include vectorized support. + # While we don't really need a ldscript here, portage QA checks get upset. + if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + dosym ../../$(get_libdir)/libm-${upstream_pv}.so $(alt_usrlibdir)/libm-${upstream_pv}.so + 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 + ppc64 /lib64/ld64.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 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.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 + + # 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 in_iuse suid && ! 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. + cd "${ED}"$(alt_libdir)/.. + [[ -e lib ]] || mkdir lib + cd "${ED}"$(alt_usrlibdir)/.. + [[ -e lib ]] || mkdir 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 + + # Make sure all the ABI's can find the locales and so we only + # have to generate one set + local a + keepdir /usr/$(get_libdir)/locale + for a in $(get_install_abis) ; do + if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then + dosym ../$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale + fi + done + + cd "${S}" + + # Install misc network config files + insinto /etc + doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf + doins "${WORKDIR}"/extra/etc/*.conf + + if use nscd ; then + doinitd "$(prefixify_ro "${WORKDIR}"/extra/etc/nscd)" + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + systemd_dounit nscd/nscd.service + systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf + else + # Do this since extra/etc/*.conf above might have nscd.conf. + rm -f "${ED}"/etc/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 + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}$(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 + src_strip +} + +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 + elog "Defaulting /etc/host.conf:multi to on" + fi + + [[ ${ROOT} != "/" ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check +} + +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 && [[ ${ROOT} == "/" ]] ; then + # Reload init ... if in a chroot or a diff init package, ignore + # errors from this step #253697 + /sbin/telinit U 2>/dev/null + + # if the host locales.gen contains no entries, we'll install everything + local locale_list="${EROOT}etc/locale.gen" + if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then + ewarn "Generating all locales; edit /etc/locale.gen to save time/space" + locale_list="${EROOT}usr/share/i18n/SUPPORTED" + fi + locale-gen -j $(makeopts_jobs) --config "${locale_list}" + fi +} diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index 399cfc13dc60..25412dcedbb8 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -226,9 +226,9 @@ src_unpack() { src_prepare() { if ! use vanilla ; then - elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER} ..." + elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" eapply "${WORKDIR}"/patches - elog "Done." + einfo "Done." fi if just_headers ; then |