From bd4aeefe33e63f613512604e47bfca7b2187697d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 3 Nov 2019 16:06:58 +0000 Subject: gentoo resync : 03.11.2019 --- sys-libs/Manifest.gz | Bin 15272 -> 15068 bytes sys-libs/binutils-libs/Manifest | 2 +- .../binutils-libs/binutils-libs-2.32-r1.ebuild | 7 +- sys-libs/compiler-rt-sanitizers/Manifest | 6 +- .../compiler-rt-sanitizers-10.0.0.9999.ebuild | 31 +- .../compiler-rt-sanitizers-9.0.0.ebuild | 29 +- .../compiler-rt-sanitizers-9.0.1.9999.ebuild | 30 +- sys-libs/compiler-rt/Manifest | 7 +- .../compiler-rt/compiler-rt-10.0.0.9999.ebuild | 11 +- sys-libs/compiler-rt/compiler-rt-9.0.0-r1.ebuild | 111 ++ sys-libs/compiler-rt/compiler-rt-9.0.0.ebuild | 110 -- sys-libs/compiler-rt/compiler-rt-9.0.1.9999.ebuild | 12 +- ...-crt-make-test-case-nontrivial-in-check_c.patch | 41 + sys-libs/e2fsprogs-libs/Manifest | 2 +- .../e2fsprogs-libs/e2fsprogs-libs-1.45.4.ebuild | 2 +- sys-libs/fts-standalone/Manifest | 2 +- .../fts-standalone/fts-standalone-1.2.7.ebuild | 4 +- sys-libs/glibc/Manifest | 28 +- sys-libs/glibc/glibc-2.19-r2.ebuild | 22 + sys-libs/glibc/glibc-2.24-r4.ebuild | 22 + sys-libs/glibc/glibc-2.25-r11.ebuild | 22 + sys-libs/glibc/glibc-2.26-r7.ebuild | 22 + sys-libs/glibc/glibc-2.27-r6.ebuild | 22 + sys-libs/glibc/glibc-2.28-r6.ebuild | 22 + sys-libs/glibc/glibc-2.29-r2.ebuild | 22 + sys-libs/glibc/glibc-2.29-r4.ebuild | 1454 ------------------- sys-libs/glibc/glibc-2.29-r5.ebuild | 22 + sys-libs/glibc/glibc-2.29-r6.ebuild | 1479 +++++++++++++++++++ sys-libs/glibc/glibc-2.30-r1.ebuild | 22 + sys-libs/glibc/glibc-2.30-r2.ebuild | 1491 ++++++++++++++++++++ sys-libs/glibc/glibc-2.30.ebuild | 1462 ------------------- sys-libs/glibc/glibc-9999.ebuild | 29 +- sys-libs/kpmcore/Manifest | 4 +- sys-libs/kpmcore/kpmcore-4.0.0.ebuild | 38 - sys-libs/kpmcore/kpmcore-4.0.1.ebuild | 2 +- sys-libs/libcxx/Manifest | 6 +- sys-libs/libcxx/libcxx-10.0.0.9999.ebuild | 13 +- sys-libs/libcxx/libcxx-9.0.0.ebuild | 13 +- sys-libs/libcxx/libcxx-9.0.1.9999.ebuild | 14 +- sys-libs/libcxxabi/Manifest | 6 +- sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild | 23 +- sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild | 20 +- sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild | 24 +- sys-libs/libomp/Manifest | 6 +- sys-libs/libomp/libomp-10.0.0.9999.ebuild | 11 +- sys-libs/libomp/libomp-9.0.0.ebuild | 11 +- sys-libs/libomp/libomp-9.0.1.9999.ebuild | 12 +- sys-libs/libstdc++-v3-bin/Manifest | 4 - .../libstdc++-v3-bin/libstdc++-v3-bin-3.3.6.ebuild | 23 - sys-libs/libstdc++-v3-bin/metadata.xml | 8 - sys-libs/llvm-libunwind/Manifest | 6 +- .../llvm-libunwind-10.0.0.9999.ebuild | 31 +- .../llvm-libunwind/llvm-libunwind-9.0.0.ebuild | 28 +- .../llvm-libunwind-9.0.1.9999.ebuild | 32 +- sys-libs/musl-nscd/Manifest | 4 +- sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild | 42 + sys-libs/musl-nscd/musl-nscd-9999.ebuild | 23 +- sys-libs/musl/Manifest | 2 + sys-libs/musl/musl-1.1.24.ebuild | 124 ++ sys-libs/newlib/Manifest | 4 +- sys-libs/newlib/newlib-3.1.0.ebuild | 141 ++ sys-libs/newlib/newlib-9999.ebuild | 16 +- sys-libs/readline/Manifest | 3 +- sys-libs/readline/readline-7.0_p5-r1.ebuild | 174 +++ sys-libs/readline/readline-7.0_p5.ebuild | 174 --- sys-libs/readline/readline-8.0_p1-r1.ebuild | 175 +++ sys-libs/tevent/Manifest | 4 +- sys-libs/tevent/tevent-0.10.1.ebuild | 72 + sys-libs/tevent/tevent-0.9.28.ebuild | 56 - sys-libs/timezone-data/Manifest | 12 +- sys-libs/timezone-data/timezone-data-2018i.ebuild | 178 --- sys-libs/timezone-data/timezone-data-2019a.ebuild | 178 --- .../timezone-data/timezone-data-2019b-r1.ebuild | 178 --- .../timezone-data/timezone-data-2019b-r2.ebuild | 2 +- sys-libs/timezone-data/timezone-data-2019c.ebuild | 178 +++ sys-libs/uclibc-ng/Manifest | 8 +- sys-libs/uclibc-ng/metadata.xml | 1 - sys-libs/uclibc-ng/uclibc-ng-1.0.26.ebuild | 411 ------ sys-libs/uclibc-ng/uclibc-ng-1.0.30-r1.ebuild | 405 ------ sys-libs/uclibc-ng/uclibc-ng-1.0.32.ebuild | 404 ++++++ 80 files changed, 4819 insertions(+), 5033 deletions(-) create mode 100644 sys-libs/compiler-rt/compiler-rt-9.0.0-r1.ebuild delete mode 100644 sys-libs/compiler-rt/compiler-rt-9.0.0.ebuild create mode 100644 sys-libs/compiler-rt/files/9.0.0/0001-compiler-rt-crt-make-test-case-nontrivial-in-check_c.patch delete mode 100644 sys-libs/glibc/glibc-2.29-r4.ebuild create mode 100644 sys-libs/glibc/glibc-2.29-r6.ebuild create mode 100644 sys-libs/glibc/glibc-2.30-r2.ebuild delete mode 100644 sys-libs/glibc/glibc-2.30.ebuild delete mode 100644 sys-libs/kpmcore/kpmcore-4.0.0.ebuild delete mode 100644 sys-libs/libstdc++-v3-bin/Manifest delete mode 100644 sys-libs/libstdc++-v3-bin/libstdc++-v3-bin-3.3.6.ebuild delete mode 100644 sys-libs/libstdc++-v3-bin/metadata.xml create mode 100644 sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild create mode 100644 sys-libs/musl/musl-1.1.24.ebuild create mode 100644 sys-libs/newlib/newlib-3.1.0.ebuild create mode 100644 sys-libs/readline/readline-7.0_p5-r1.ebuild delete mode 100644 sys-libs/readline/readline-7.0_p5.ebuild create mode 100644 sys-libs/readline/readline-8.0_p1-r1.ebuild create mode 100644 sys-libs/tevent/tevent-0.10.1.ebuild delete mode 100644 sys-libs/tevent/tevent-0.9.28.ebuild delete mode 100644 sys-libs/timezone-data/timezone-data-2018i.ebuild delete mode 100644 sys-libs/timezone-data/timezone-data-2019a.ebuild delete mode 100644 sys-libs/timezone-data/timezone-data-2019b-r1.ebuild create mode 100644 sys-libs/timezone-data/timezone-data-2019c.ebuild delete mode 100644 sys-libs/uclibc-ng/uclibc-ng-1.0.26.ebuild delete mode 100644 sys-libs/uclibc-ng/uclibc-ng-1.0.30-r1.ebuild create mode 100644 sys-libs/uclibc-ng/uclibc-ng-1.0.32.ebuild (limited to 'sys-libs') diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz index 7056219df8af..caf94a6e2abd 100644 Binary files a/sys-libs/Manifest.gz and b/sys-libs/Manifest.gz differ diff --git a/sys-libs/binutils-libs/Manifest b/sys-libs/binutils-libs/Manifest index 38c20b33be6c..28762eb7bf0d 100644 --- a/sys-libs/binutils-libs/Manifest +++ b/sys-libs/binutils-libs/Manifest @@ -15,5 +15,5 @@ EBUILD binutils-libs-2.28.1.ebuild 2850 BLAKE2B 57b3e0b62ca8539dee42212155d8b1a1 EBUILD binutils-libs-2.29.1-r1.ebuild 2899 BLAKE2B 4f2469ace95d68e9f9a8bf8c820758543eac6ac8b266ae8bc0460f5f66eabb0cd93519023487e4cc40aab918e10dd891c365daadeec538c5f9cf98a5ff3cd3e8 SHA512 a4453c637003017dbf893e35502005d370e5bfeef2cae062df8d0c1c1590b9bb3417beea2eb31525d08711ff600df9580d8c807c7d72108a1208a241f9fba5b4 EBUILD binutils-libs-2.30-r4.ebuild 3572 BLAKE2B ff5ff847f4de66dc13fab3f905aaad930a2565d0ded1aa0ab4bbf7f3c9fa9d7b883d4bff782ecb1004a2bf542278609ca107e3168dffc2c655cd671a9fd92a06 SHA512 21e81cb7ec342000c26c8cd96560ecd6d437e9bd58687235bf32fd256c9664cdf3bf3c9455649b5205cf14b4056f299f2fde636e59843b2255d552a2ec2fbb71 EBUILD binutils-libs-2.31.1-r6.ebuild 3551 BLAKE2B b411715ff0600b9bb16b7b201fd50359d3c58dcf068c72f0133781e7c105daefbc4fa5b4bfd40069c8677b5ec5364bb35c424b01a27d7b9e34f35044e0f22bdc SHA512 84af124ed436ba20cd89365d90e6f1415f08a92600b0bf680513b928157240c8c8243f298fb09c0df614c3287c772e4bc4498b314ac0ea75d5e2384707e35ccc -EBUILD binutils-libs-2.32-r1.ebuild 3559 BLAKE2B caf8b0469daa9fdddc0465c5596c41533fec733029ca9f5fb7c87505bd83d7ff28507547990d724a4a0653d35d9967b374806a223fd899af89653d63b9e103f3 SHA512 97d8b2448d1f61568da3520c44b3e6727dfd6150d757dca8d18a744dba297e0046ba58d9aea783a034f5ea9a158182959aac82e41571953ae18514dfce8cb829 +EBUILD binutils-libs-2.32-r1.ebuild 3675 BLAKE2B d41e2723bd517cfa48e84ef6b576d408b2fd9470c17bb7761b90ab1c80196e76e7bcf2567f99516c2e4a64d675f378455c0ec716525eae851fd279cd77bb3942 SHA512 66837d1cc240df0ab6d169cb8ff4e79f79e43213b47edb4f1915f9027ca6b2bd1dd4b834023143b62c26e2e6a671915b65aeaceaa75578fd1f8f9c07d799a5e0 MISC metadata.xml 524 BLAKE2B 6f00793b2dc155b19d816b8acfd49e6bfc2ae35418ecc97fbbd3f9d0ed08b5f95a299b28fe6edad1a66f4d64abe99dc8a62a974fd70e28b535cd366239bf1cca SHA512 9db7c7a3082ee848ec4963831da06cced596d543e53660747fb56ac33998c219e1d7252892ffc32132d7db3c99ce9746fb6d9e85f866c3cba97552c31948342c diff --git a/sys-libs/binutils-libs/binutils-libs-2.32-r1.ebuild b/sys-libs/binutils-libs/binutils-libs-2.32-r1.ebuild index 1d047890a615..193bdfdaded8 100644 --- a/sys-libs/binutils-libs/binutils-libs-2.32-r1.ebuild +++ b/sys-libs/binutils-libs/binutils-libs-2.32-r1.ebuild @@ -25,7 +25,6 @@ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sp COMMON_DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]" DEPEND="${COMMON_DEPEND} - >=sys-apps/texinfo-4.7 nls? ( sys-devel/gettext )" # Need a newer binutils-config that'll reset include/lib symlinks for us. RDEPEND="${COMMON_DEPEND} @@ -105,6 +104,12 @@ multilib_src_configure() { ECONF_SOURCE=${S} \ econf "${myconf[@]}" + + # Prevent makeinfo from running as we don't build docs here. + # bug #622652 + sed -i \ + -e '/^MAKEINFO/s:=.*:= true:' \ + Makefile || die } multilib_src_install() { diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest index 6b13e6b16267..7c055e15c401 100644 --- a/sys-libs/compiler-rt-sanitizers/Manifest +++ b/sys-libs/compiler-rt-sanitizers/Manifest @@ -9,10 +9,10 @@ DIST llvm-6.0.1.src.tar.xz 25306628 BLAKE2B 60232d4d22f8096b565cc8d81fea0639f24f DIST llvm-7.1.0.src.tar.xz 28313784 BLAKE2B b78d9a7fc5ef6e352e77d339e5c4eef5ccedf67c05e7abd949e72619aa8a5ed65e7e5e2008354be8e7916d75581719b99f34227838fcc86c5d0080913c2fb22c SHA512 a7dbd5693d1f2dae6b6e52893a100f9349cbfcfb25c5fdcad46364acbff0dbd3573f8fbc026c68eb9fd56335198aa94b866cc3dd7ea0cbd2cbfb5f8fe3444a7a DIST llvm-8.0.1.src.tar.xz 30477608 BLAKE2B 4319c837b36111401e3b0f9659b8d875c89463bcc7816df1aefe1e3ff989860bbaa92504718f8e15416cfd9f3491c13777cd5cb661877b237b342b0e515b93f5 SHA512 82e120be5cabdfd5111aebbea68a663fe229c8861d73802d6ab09a3bf48f60de333e07e61f8fb61beaa14ac2bea24fcd74fa6f761acaf62469f536b79fcb1e16 DIST llvm-9.0.0.src.tar.xz 32994768 BLAKE2B 7f09bff9bcada95ab9c920c78aef92b57e665d9188bab39c734084ceb03a801c942fed48ea77fabeeb6110c648cb69363c659a6ce93ebf67dbba5c187219b13b SHA512 1bb3341e1d231559b948f1505b33c2e2e03989f9b8bbfef0e0cdaff5ac43f85574c9ec5ac53399b914f497d6899425d861411024e8d7e1d1a338c1c6951ac658 -EBUILD compiler-rt-sanitizers-10.0.0.9999.ebuild 5091 BLAKE2B 49de7e76998a3a58caae207454c1e795b20439d2691626e91319e96598b5e7d01fb9cc362bf0d43ed4b9bdc8da38bc8ce518369c63e96f6a192fb06c4ad79074 SHA512 b9e8b1f384378298d01689c831e771199891e39620e54ee843428f416cb63e888f12cbd13595e21a987c9ccacad29817c510bd774801110319cc7b2b1d4b34c7 +EBUILD compiler-rt-sanitizers-10.0.0.9999.ebuild 4690 BLAKE2B 6af6661f0ea4c83cf103d0ce21a1bbd360c7497512fde80e7fb77fbc4ff564b5c6a89bf3123bde7a368efe3c656640a66dbb6f79373aa2c68df8ec678798ad52 SHA512 46a2ded095d2e0f0c6433acb76c8bfee8ec2c8b1b32b4cb33936015db6a915bb660377ba9b679d6f6a9f0132d1f8748b254529ed044cc19fd61e3523909057a1 EBUILD compiler-rt-sanitizers-6.0.1.ebuild 5441 BLAKE2B aee706d982849e61b7fc87a63812131c41eead7135740385719610bee8ba1e3e10823e36ea9ffc2041f15c70a51a56c902e887507aabc2dc02c04a23672bd721 SHA512 aae5f86ab86a09e64a5a07e3432c78478eaf6c9faf3c57101806af49746672d95dd78481f31356286f4c0ceed09ba305d7a0dcf1922d849ebedec87ef6769426 EBUILD compiler-rt-sanitizers-7.1.0.ebuild 5388 BLAKE2B 63d9681596e72e8df4c04046d5ad5277402957ebea29f2ceca0e3252a69ef8498998b710bc5be8a66efde59087223e5bd23fb5c2ffa1ef644a07577032e1330f SHA512 f94e76d0bdc8d99c09d4e9d1bfc3f566f45b0c7e42242cd76ba1d61d46f8d244ff971a154693980753a0323ece57138285a5f7e42af1f41f662f32f6ac09b23b EBUILD compiler-rt-sanitizers-8.0.1.ebuild 5186 BLAKE2B fb334e5216a59f76afb035414e1d145c3780fa672439a728b37e34c63f73516b0c5a55efc75dc6abe59b7f47240dc5969016eeb597cc00a873ff77a16dba72d9 SHA512 305c3018df76a6c55f1d0121f02b87d821d1645145bda6ab631ddfbc23714ee3879e9c5f2e6fbee12872c0a05a8730216120b1a141b722fd36cafdaffb5773eb -EBUILD compiler-rt-sanitizers-9.0.0.ebuild 5212 BLAKE2B 05e518ad210dba3aae0ff0c66f4b091766e6f0988d4d50d16a62739fd691554ccf1d8efd23b7149d14b1d152ee22ea0f9f7a2f6a7b2663cbf9293a6ccd45c149 SHA512 6c9b05b80c80a16f40cda94b6692733ceee1a017e671142a438489cda52398c55ec839f29e6c1debd9f566f5d6d3251f47915c57abbbb6c4037485151d3dde22 -EBUILD compiler-rt-sanitizers-9.0.1.9999.ebuild 5116 BLAKE2B c574e6f2864ba854d45b1aa09daf7d732b66c9f368a5224f48d448ad4e750f95c2c7c5b29d38333a482a281af9ca2da441aa5231f43cb628335dc846bce0104f SHA512 4eb6b23b9c538d0da4e6ced124b32a3ef5a6f6706dcb48c991b7335de9bdee0f0abf0b77439e547ece607a47f07bd568cd492580440ceebd55d443f1adde3219 +EBUILD compiler-rt-sanitizers-9.0.0.ebuild 4740 BLAKE2B fb32526d40411bfc5989a6d6c86271ff514920a84260c0a29e370d3ea9f7c2edc734e2fb74b9f1af24ed2fa1aebe7dd06c28cba8d45cfa2275918b5ef505fc9b SHA512 457f032b1b8ce3f2c181fa7cc79c07c13552f59090c4b544120fddb0ad376bfadaff7377d0a4bf0d980f9e585a35fbcb8a5165e5edab1a223fe2f2e6d637670f +EBUILD compiler-rt-sanitizers-9.0.1.9999.ebuild 4689 BLAKE2B 21ba79f3b045b5738ea187035606dbbf28ba464cef95fd84c83bb937a2a6286f688e58ced5fd3399c801681a115e4daa96302cac5763a0cc25e63f2abcb0ab6b SHA512 508c98f4aaabb84793f500240abf830686352d361f7cab7051d5a3ba76c497a6e5897d415fddba65a54f4e73d804236d0a2746993522f0cc1c5e5ddd050166c8 MISC metadata.xml 547 BLAKE2B 6f9d8b65c12797fd3d168e9b3948c604265db135bda5493d9f1d8b1d01fd73a79d07e5241afc3a7fa1672827fac23d3d9dc4d7ae42371a0de892a900c8c28269 SHA512 fb73a96b1ffbc7ff2fecfba35c9acd3e54ade0154016ae04423217f5c000eee2b0b821cc626908647551a0aa7b7f462d42d56cde3993ddd52248bc373b117c3e diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild index 93ab308a4cf4..85a0884b7a92 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-10.0.0.9999.ebuild @@ -3,19 +3,15 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit check-reqs cmake-utils flag-o-matic git-r3 llvm \ +inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ multiprocessing python-any-r1 DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/compiler-rt.git - https://github.com/llvm-mirror/compiler-rt.git" +LLVM_COMPONENTS=( compiler-rt ) +LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="$(ver_cut 1-3)" @@ -59,21 +55,6 @@ pkg_setup() { python-any-r1_pkg_setup } -src_unpack() { - if use test; then - # needed for patched gtest - git-r3_fetch "https://git.llvm.org/git/llvm.git - https://github.com/llvm-mirror/llvm.git" - fi - git-r3_fetch - - if use test; then - git-r3_checkout https://llvm.org/git/llvm.git \ - "${WORKDIR}"/llvm '' utils/unittest - fi - git-r3_checkout -} - src_prepare() { cmake-utils_src_prepare @@ -81,14 +62,14 @@ src_prepare() { # remove tests that are (still) broken by new glibc # https://bugs.llvm.org/show_bug.cgi?id=36065 if use elibc_glibc && has_version '>=sys-libs/glibc-2.25'; then - rm test/lsan/TestCases/Linux/fork_and_leak.cc || die + rm test/lsan/TestCases/Linux/fork_and_leak.cpp || die fi fi } src_configure() { # pre-set since we need to pass it to cmake - BUILD_DIR=${WORKDIR}/${P}_build + BUILD_DIR=${WORKDIR}/compiler-rt_build if use clang; then local -x CC=${CHOST}-clang diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild index 47659864723e..1ced0d080379 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.0.ebuild @@ -3,22 +3,15 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit check-reqs cmake-utils flag-o-matic llvm \ +inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ multiprocessing python-any-r1 -MY_P=compiler-rt-${PV/_/}.src -LLVM_P=llvm-${PV/_/}.src - DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" HOMEPAGE="https://llvm.org/" -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz - test? ( https://releases.llvm.org/${PV}/${LLVM_P}.tar.xz )" -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( compiler-rt ) +LLVM_TEST_COMPONENTS=( llvm/utils/unittest ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="$(ver_cut 1-3)" @@ -62,18 +55,6 @@ pkg_setup() { python-any-r1_pkg_setup } -src_unpack() { - einfo "Unpacking ${MY_P}.tar.xz ..." - tar -xf "${DISTDIR}/${MY_P}.tar.xz" || die - - if use test; then - einfo "Unpacking parts of ${LLVM_P}.tar.xz ..." - tar -xf "${DISTDIR}/${LLVM_P}.tar.xz" \ - "${LLVM_P}"/utils/unittest || die - mv "${LLVM_P}" llvm || die - fi -} - src_prepare() { cmake-utils_src_prepare @@ -88,7 +69,7 @@ src_prepare() { src_configure() { # pre-set since we need to pass it to cmake - BUILD_DIR=${WORKDIR}/${P}_build + BUILD_DIR=${WORKDIR}/compiler-rt_build if use clang; then local -x CC=${CHOST}-clang diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild index f147105624d8..f28bb313413d 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-9.0.1.9999.ebuild @@ -3,20 +3,15 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit check-reqs cmake-utils flag-o-matic git-r3 llvm \ +inherit check-reqs cmake-utils flag-o-matic llvm llvm.org \ multiprocessing python-any-r1 DESCRIPTION="Compiler runtime libraries for clang (sanitizers & xray)" HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/compiler-rt.git - https://github.com/llvm-mirror/compiler-rt.git" -EGIT_BRANCH="release_90" +LLVM_COMPONENTS=( compiler-rt ) +LLVM_TEST_COMPONENTS=( llvm/lib/Testing/Support llvm/utils/unittest ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="$(ver_cut 1-3)" @@ -60,21 +55,6 @@ pkg_setup() { python-any-r1_pkg_setup } -src_unpack() { - if use test; then - # needed for patched gtest - git-r3_fetch "https://git.llvm.org/git/llvm.git - https://github.com/llvm-mirror/llvm.git" - fi - git-r3_fetch - - if use test; then - git-r3_checkout https://llvm.org/git/llvm.git \ - "${WORKDIR}"/llvm '' utils/unittest - fi - git-r3_checkout -} - src_prepare() { cmake-utils_src_prepare @@ -89,7 +69,7 @@ src_prepare() { src_configure() { # pre-set since we need to pass it to cmake - BUILD_DIR=${WORKDIR}/${P}_build + BUILD_DIR=${WORKDIR}/compiler-rt_build if use clang; then local -x CC=${CHOST}-clang diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest index d6b20e0bb439..8d9f6f2b3b9d 100644 --- a/sys-libs/compiler-rt/Manifest +++ b/sys-libs/compiler-rt/Manifest @@ -1,11 +1,12 @@ +AUX 9.0.0/0001-compiler-rt-crt-make-test-case-nontrivial-in-check_c.patch 1552 BLAKE2B 5045e2cc506282a6fb708c21e916a0e4ff24f0ccfbeb6d27af506c085ff759c203377e12ab969e40a2fbb9834bbc190de0e649061aec1b2ddd36b52ed99ede11 SHA512 d52245c1eaf650f8f666b9ec352332202fa5d76bdefd37a85f0c6939fecd8be80e386485851990efc918e53e82280489d0653d7c4e90637f328bd131bde6f6cb DIST compiler-rt-6.0.1.src.tar.xz 1686820 BLAKE2B 59fa3f6e478bd4d6dfa056c85dcdc4349cbce7cea7fc56519feddc9d66c88c9ca48bad7967432ceb81d754213577f12707035afd827cf630a58627575b73b798 SHA512 69850c1ad92c66977fa217cbfb42a6a3f502fbe3d1a08daa7fc4cfeb617a7736d231f8ad8d93b10b1ae29bd753315d2a2d70f9ff1f4d18a9a7cc81758d91f963 DIST compiler-rt-7.1.0.src.tar.xz 1864248 BLAKE2B 42ab86416f7f85c5833cf85dbfb66b18a5d5cf53fa0560ad43b2ef39f5a2cd7ec1dbe4192cc8dac9b3f658b828c8306f26745c4d0e8f846d9f550ac22717eb33 SHA512 54d3ad80936f011dbf2ecebba3f1b7d4a156044b178228411ba855be5ec48eb646155b74dea1a96674adab6f93803456ae1435395e3240a4423a3f65f4566b55 DIST compiler-rt-8.0.1.src.tar.xz 1954204 BLAKE2B cbba1d5fb37385116920da39dea26739d09e3f11c392503f8bc45293f1ef00c97f6a9fbd3ba67094d7f1e532410d0eca461943dadfdb10646110470a8e3b5f1f SHA512 12bf1bdabe25c0c3a84cc73a718fe154573dd729ec3ff5e099bd5f74c6bec9c80521b87ded646d3b20dfdb9aa51dea0234281418c7eb81805e1dd5d3107d3d8e DIST compiler-rt-9.0.0.src.tar.xz 1993084 BLAKE2B 4aece9570df4cc38aaa58a3740aa0e1b5cbfe0bfc2d1a590e9e95871fda6ba4dcdeab6125d243c31ce5130386235475339f13da9f900b505eb2fec850a711646 SHA512 a7bb0a67165d29317cee58c22ed79f0d6a9cb9279dcd355d4267f3cd6c531a7be455a28267c591d6e2c0f9c56e363d40c10a405391e07d02ab3e30f00ffef2a8 -EBUILD compiler-rt-10.0.0.9999.ebuild 2921 BLAKE2B 3f96154943747cc7a8945c8af75880650e919266dda3232fb1c6984c8fb2af92dde32e0557f2c3b9805cefac69166fa34aa42b42f6bb1ec328b389757f7f2fa1 SHA512 fc713062020b5ed70e12ceaaf2043d4e907a8d840e152b43a8177f892985d116475818048262162fd856392ba2080a6c7b830a52bc590b5d12c379d375e7c1be +EBUILD compiler-rt-10.0.0.9999.ebuild 2750 BLAKE2B c1be7a966c49f9b035b9ba8cdbb0b2e5b839a6a96ca68b45cc412a1bd5e94c41dcdb1df865723a758365cf176a5e5e77d2be1eed3dfb67cae341a854258849e8 SHA512 3958a62494587f94138cfe86e588f456ac75442f9ab7081c7aebb1719345e828e41dcf79f13d7fd2f857d52acf450aa3331589cc285c02ab8a86d9e330c52e38 EBUILD compiler-rt-6.0.1.ebuild 2899 BLAKE2B 9db37364c5e328b38c64dc2c6ed076b944e2d3528e17bb34ec2ade4e498226f8c3f26196ac416ff51bd0b64335856b7161a6ca2b264a8db331fa4626d9b3eac6 SHA512 ea9086fc9943fc9910522d1672fb0448b47c51ad81aa3c0d59282c6109f63a87190392c46c3cb234427ef190fa116e8b4232f089c428e1b28ea80744285e8e50 EBUILD compiler-rt-7.1.0.ebuild 2900 BLAKE2B 60bec479b6e5caa39b98e5bf54621e9cf395c7e20ce0269d336153811f39de065b53744c11bded995899a6be33cf207c0c4a091b4be8a9ce8b8b479d26b057e8 SHA512 6cf5d533db3bbc75125f40439f8a6132f6c0c4fa04bd1d6007e9014ae4638fb1e99d475da780e07d12509873c26d129696cbd657c6c0b79521aa0561a927b23e EBUILD compiler-rt-8.0.1.ebuild 2938 BLAKE2B 6ce7229e928bbd6b269b3d37ad233f188e831fc2dd3153346eecad4a031a6a6f7a82fa8c25020fc8169eeeeede6e138aee2d7b3f520be02c1f5450bb802fac9a SHA512 567c3cd3d932f02a5d0f627cac45fbbeb403b346a421e805a8a48289bddc8868d1307f35cd37f7d6ab60ecf466c0651c93dc1ace24b99971a3a131f0d12d6261 -EBUILD compiler-rt-9.0.0.ebuild 2966 BLAKE2B 242c593f1dda27843a3bd6c929ea535d8455435392f48fb2581bddc3e9e6ed81bca70838d94553892c82e306ad40ec5a9ca0a639e97c2ff422b2febde226cb02 SHA512 3edb443f357d3e2508b08616259e668b5f49281a90ccd32c6c5d290c6ec4dd2b500f28cc631974806d8c7006340c21b45034b76ebe4026eb88cd116be49c2e88 -EBUILD compiler-rt-9.0.1.9999.ebuild 2946 BLAKE2B 94fd398f887d1d5726a8397621864353d72b081b57e981bb2cc77199cb42419f590c0f45cb7c2e3ea8ad431efccef0091557d7169b009c5796a92d384c0c84f1 SHA512 8ea75505267484b1aa9f9f873fba4bdb745903f4618d38a151cfb1f66b9e251c5f6647731fb99d108447a4bac1d9878e06b958cf4d922cb8a4a5601d879219b0 +EBUILD compiler-rt-9.0.0-r1.ebuild 2997 BLAKE2B 641abc9127b63a93a8c79762fc2a4a0136cec073b1869a9a9bdae1be0cb2db8b933d2562d26bb43f69b81828fb8af334f2737c2012af625437e824629eed7cb7 SHA512 af614fd60c9aba59d4ff7d35155632befa2f5d364572fc784c9c43fe5f1e76bfa0571bc84376e05cc1aa3f3b8f9b3d8219a0fd9e08dbfc016d7ce64c7b9a4098 +EBUILD compiler-rt-9.0.1.9999.ebuild 2750 BLAKE2B c1be7a966c49f9b035b9ba8cdbb0b2e5b839a6a96ca68b45cc412a1bd5e94c41dcdb1df865723a758365cf176a5e5e77d2be1eed3dfb67cae341a854258849e8 SHA512 3958a62494587f94138cfe86e588f456ac75442f9ab7081c7aebb1719345e828e41dcf79f13d7fd2f857d52acf450aa3331589cc285c02ab8a86d9e330c52e38 MISC metadata.xml 333 BLAKE2B 24e417cb7b8ab7730b18a3e1e5e29d008042e4fd53cf1ba3cc9d18719160b0410854ddfae52315c690138e61fb0196015968fa09b98af6470cd8bdecc09205ef SHA512 97daa7452a696b7297c47f5f637a33425f82b51426060a75b3de6bc812f9ddcd3c70ae068bc3e88ce937ab1eb10d59b0ab48a2d2c0397a112b8b6a754e333bdc diff --git a/sys-libs/compiler-rt/compiler-rt-10.0.0.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-10.0.0.9999.ebuild index 13a5397acde0..1c0ee0530aff 100644 --- a/sys-libs/compiler-rt/compiler-rt-10.0.0.9999.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-10.0.0.9999.ebuild @@ -3,19 +3,14 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-utils flag-o-matic git-r3 llvm multiprocessing \ +inherit cmake-utils flag-o-matic llvm llvm.org multiprocessing \ python-any-r1 toolchain-funcs DESCRIPTION="Compiler runtime library for clang (built-in part)" HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/compiler-rt.git - https://github.com/llvm-mirror/compiler-rt.git" +LLVM_COMPONENTS=( compiler-rt ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="$(ver_cut 1-3)" diff --git a/sys-libs/compiler-rt/compiler-rt-9.0.0-r1.ebuild b/sys-libs/compiler-rt/compiler-rt-9.0.0-r1.ebuild new file mode 100644 index 000000000000..ed72a058928f --- /dev/null +++ b/sys-libs/compiler-rt/compiler-rt-9.0.0-r1.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) +inherit cmake-utils flag-o-matic llvm llvm.org multiprocessing \ + python-any-r1 toolchain-funcs + +DESCRIPTION="Compiler runtime library for clang (built-in part)" +HOMEPAGE="https://llvm.org/" +LLVM_COMPONENTS=( compiler-rt ) +llvm.org_set_globals + +LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" +SLOT="$(ver_cut 1-3)" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="+clang test" +RESTRICT="!test? ( test ) !clang? ( test )" + +CLANG_SLOT=${SLOT%%.*} +# llvm-6 for new lit options +DEPEND=" + >=sys-devel/llvm-6" +BDEPEND=" + clang? ( sys-devel/clang ) + test? ( + $(python_gen_any_dep "dev-python/lit[\${PYTHON_USEDEP}]") + =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} ) + ${PYTHON_DEPS}" + +# least intrusive of all +CMAKE_BUILD_TYPE=RelWithDebInfo + +PATCHES=( + # Fix building broken crtbegin/crtend + # https://bugs.gentoo.org/698086 + "${FILESDIR}"/9.0.0/0001-compiler-rt-crt-make-test-case-nontrivial-in-check_c.patch +) + +pkg_pretend() { + if ! use clang && ! tc-is-clang; then + ewarn "Building using a compiler other than clang may result in broken atomics" + ewarn "library. Enable USE=clang unless you have a very good reason not to." + fi +} + +pkg_setup() { + llvm_pkg_setup + python-any-r1_pkg_setup +} + +test_compiler() { + $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \ + <<<'int main() { return 0; }' &>/dev/null +} + +src_configure() { + # pre-set since we need to pass it to cmake + BUILD_DIR=${WORKDIR}/${P}_build + + local nolib_flags=( -nodefaultlibs -lc ) + if use clang; then + local -x CC=${CHOST}-clang + local -x CXX=${CHOST}-clang++ + # ensure we can use clang before installing compiler-rt + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" + strip-unsupported-flags + elif ! test_compiler; then + if test_compiler "${nolib_flags[@]}"; then + local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" + ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" + fi + fi + + local mycmakeargs=( + -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" + + -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) + -DCOMPILER_RT_BUILD_LIBFUZZER=OFF + -DCOMPILER_RT_BUILD_PROFILE=OFF + -DCOMPILER_RT_BUILD_SANITIZERS=OFF + -DCOMPILER_RT_BUILD_XRAY=OFF + ) + + if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then + mycmakeargs+=( + # disable use of SDK for the system itself + -DDARWIN_macosx_CACHED_SYSROOT=/ + ) + fi + + if use test; then + mycmakeargs+=( + -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" + -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" + + -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang" + -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++" + ) + fi + + cmake-utils_src_configure +} + +src_test() { + # respect TMPDIR! + local -x LIT_PRESERVES_TMP=1 + + cmake-utils_src_make check-builtins +} diff --git a/sys-libs/compiler-rt/compiler-rt-9.0.0.ebuild b/sys-libs/compiler-rt/compiler-rt-9.0.0.ebuild deleted file mode 100644 index bfb57a667381..000000000000 --- a/sys-libs/compiler-rt/compiler-rt-9.0.0.ebuild +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 -PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-utils flag-o-matic llvm multiprocessing \ - python-any-r1 toolchain-funcs - -MY_P=${P}.src -DESCRIPTION="Compiler runtime library for clang (built-in part)" -HOMEPAGE="https://llvm.org/" -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz" -S=${WORKDIR}/${MY_P} - -LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" -SLOT="$(ver_cut 1-3)" -KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" -IUSE="+clang test" -RESTRICT="!test? ( test ) !clang? ( test )" - -CLANG_SLOT=${SLOT%%.*} -# llvm-6 for new lit options -DEPEND=" - >=sys-devel/llvm-6" -BDEPEND=" - clang? ( sys-devel/clang ) - test? ( - $(python_gen_any_dep "dev-python/lit[\${PYTHON_USEDEP}]") - =sys-devel/clang-${PV%_*}*:${CLANG_SLOT} ) - ${PYTHON_DEPS}" - -# least intrusive of all -CMAKE_BUILD_TYPE=RelWithDebInfo - -pkg_pretend() { - if ! use clang && ! tc-is-clang; then - ewarn "Building using a compiler other than clang may result in broken atomics" - ewarn "library. Enable USE=clang unless you have a very good reason not to." - fi -} - -pkg_setup() { - llvm_pkg_setup - python-any-r1_pkg_setup -} - -test_compiler() { - $(tc-getCC) ${CFLAGS} ${LDFLAGS} "${@}" -o /dev/null -x c - \ - <<<'int main() { return 0; }' &>/dev/null -} - -src_configure() { - # pre-set since we need to pass it to cmake - BUILD_DIR=${WORKDIR}/${P}_build - - local nolib_flags=( -nodefaultlibs -lc ) - if use clang; then - local -x CC=${CHOST}-clang - local -x CXX=${CHOST}-clang++ - # ensure we can use clang before installing compiler-rt - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" - strip-unsupported-flags - elif ! test_compiler; then - if test_compiler "${nolib_flags[@]}"; then - local -x LDFLAGS="${LDFLAGS} ${nolib_flags[*]}" - ewarn "${CC} seems to lack runtime, trying with ${nolib_flags[*]}" - fi - fi - - local mycmakeargs=( - -DCOMPILER_RT_INSTALL_PATH="${EPREFIX}/usr/lib/clang/${SLOT}" - - -DCOMPILER_RT_INCLUDE_TESTS=$(usex test) - -DCOMPILER_RT_BUILD_LIBFUZZER=OFF - -DCOMPILER_RT_BUILD_PROFILE=OFF - -DCOMPILER_RT_BUILD_SANITIZERS=OFF - -DCOMPILER_RT_BUILD_XRAY=OFF - ) - - if use prefix && [[ "${CHOST}" == *-darwin* ]] ; then - mycmakeargs+=( - # disable use of SDK for the system itself - -DDARWIN_macosx_CACHED_SYSROOT=/ - ) - fi - - if use test; then - mycmakeargs+=( - -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" - -DLLVM_LIT_ARGS="-vv;-j;${LIT_JOBS:-$(makeopts_jobs "${MAKEOPTS}" "$(get_nproc)")}" - - -DCOMPILER_RT_TEST_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang" - -DCOMPILER_RT_TEST_CXX_COMPILER="${EPREFIX}/usr/lib/llvm/${CLANG_SLOT}/bin/clang++" - ) - fi - - cmake-utils_src_configure -} - -src_test() { - # respect TMPDIR! - local -x LIT_PRESERVES_TMP=1 - - cmake-utils_src_make check-builtins -} diff --git a/sys-libs/compiler-rt/compiler-rt-9.0.1.9999.ebuild b/sys-libs/compiler-rt/compiler-rt-9.0.1.9999.ebuild index 88bfd8aa0ad2..1c0ee0530aff 100644 --- a/sys-libs/compiler-rt/compiler-rt-9.0.1.9999.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-9.0.1.9999.ebuild @@ -3,20 +3,14 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-utils flag-o-matic git-r3 llvm multiprocessing \ +inherit cmake-utils flag-o-matic llvm llvm.org multiprocessing \ python-any-r1 toolchain-funcs DESCRIPTION="Compiler runtime library for clang (built-in part)" HOMEPAGE="https://llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/compiler-rt.git - https://github.com/llvm-mirror/compiler-rt.git" -EGIT_BRANCH="release_90" +LLVM_COMPONENTS=( compiler-rt ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="$(ver_cut 1-3)" diff --git a/sys-libs/compiler-rt/files/9.0.0/0001-compiler-rt-crt-make-test-case-nontrivial-in-check_c.patch b/sys-libs/compiler-rt/files/9.0.0/0001-compiler-rt-crt-make-test-case-nontrivial-in-check_c.patch new file mode 100644 index 000000000000..ccae96cad98a --- /dev/null +++ b/sys-libs/compiler-rt/files/9.0.0/0001-compiler-rt-crt-make-test-case-nontrivial-in-check_c.patch @@ -0,0 +1,41 @@ +From 155a43edb0c161bb5122ad4eeee991b43a0278bc Mon Sep 17 00:00:00 2001 +From: Jian Cai +Date: Mon, 16 Sep 2019 21:47:47 +0000 +Subject: [PATCH] [compiler-rt][crt] make test case nontrivial in + check_cxx_section_exists + +Summary: +.init_array gets optimized away when building with -O2 and as a result, +check_cxx_section_exists failed to pass -DCOMPILER_RT_HAS_INITFINI_ARRAY +when building crtbegin.o and crtend.o, which causes binaries linked with +them encounter segmentation fault. See https://crbug.com/855759 for +details. This change prevents .init_array section to be optimized away +even with -O2 or higher optimization level. + +Subscribers: dberris, mgorny, #sanitizers, llvm-commits + +Tags: #sanitizers, #llvm + +Differential Revision: https://reviews.llvm.org/D67628 + +llvm-svn: 372038 +--- + lib/crt/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/crt/CMakeLists.txt b/lib/crt/CMakeLists.txt +index 34c368f7ca4..90e94b93db4 100644 +--- a/lib/crt/CMakeLists.txt ++++ b/lib/crt/CMakeLists.txt +@@ -70,7 +70,7 @@ function(check_cxx_section_exists section output) + endfunction() + + check_cxx_section_exists(".init_array" COMPILER_RT_HAS_INITFINI_ARRAY +- SOURCE "__attribute__((constructor)) void f() {}\nint main() { return 0; }\n") ++ SOURCE "volatile int x;\n__attribute__((constructor)) void f() {x = 0;}\nint main() { return 0; }\n") + + append_list_if(COMPILER_RT_HAS_STD_C11_FLAG -std=c11 CRT_CFLAGS) + append_list_if(COMPILER_RT_HAS_INITFINI_ARRAY -DCRT_HAS_INITFINI_ARRAY CRT_CFLAGS) +-- +2.23.0 + diff --git a/sys-libs/e2fsprogs-libs/Manifest b/sys-libs/e2fsprogs-libs/Manifest index 26b5ebfa7af9..bfe203dfe84c 100644 --- a/sys-libs/e2fsprogs-libs/Manifest +++ b/sys-libs/e2fsprogs-libs/Manifest @@ -6,5 +6,5 @@ DIST e2fsprogs-1.45.4.tar.xz 5567164 BLAKE2B ab7be15e504b674290a25572d09d1ca4bac EBUILD e2fsprogs-libs-1.44.5.ebuild 2409 BLAKE2B ca5e6323859f592666d6dedb4beaa9da7c9e824176f74c2488f057dcf696972275c204b50bbfa65c3e943a9bc0d5f9035197be1347172edb5f2067701bfb3eac SHA512 6f7676e0e299d12089f0729a186b423da58d2f6b689e0bee42968c994adafc7ab432f12d8216589d503993c10b3e5bb2cb1e6bc7bec5bfcb3648da8ce8c307bc EBUILD e2fsprogs-libs-1.45.2.ebuild 2409 BLAKE2B 17bbfab5da7d135492e007479a9fd880e090e9eef000afa37bffae3af862e7f1b805341ade7723353deb89536779570c63d197781a1a3fc8d0e896d4a0782c2a SHA512 d4590a8108e941e40041f210dc80674522ec3ac9b1a3f4f78ba754446acf4a4deefce2486a20220e5bbdfd1f62a07842714f6697d17035419cca35faaca2b1be EBUILD e2fsprogs-libs-1.45.3.ebuild 2422 BLAKE2B 25eac7e393f359b5fd1093309582a404cabe6756cbcc831c8fb3580e8b0603d1d1322ad7e2d185741b3778340419f8d4221c5db4525b0754322a217f3e80ed3b SHA512 981063c8ebe1cd74a44d2b8039e20864e838853aae967f21b1c4839c93a93f3763d9854de102ac622fad5691491469c49887c0a099db47913d7c2cfc238f5f45 -EBUILD e2fsprogs-libs-1.45.4.ebuild 2410 BLAKE2B 77a4df3b77766eeff45ea8a698b454aa35e05b705d64b59c1900d70a6645239dbcd58d328cc98f15afad7edb0c31bed82e0c4e23be093ce65a216fdd56ea015f SHA512 cb83e7fc42bced941421ced0ffdcae4a3edc7b46662617a1ce5ffdeaf8dcbacc69b78ad9dc03bd5ead79d9d989bf8920eb3c5ff50e1e609f69ca29dc644e82ca +EBUILD e2fsprogs-libs-1.45.4.ebuild 2409 BLAKE2B 17bbfab5da7d135492e007479a9fd880e090e9eef000afa37bffae3af862e7f1b805341ade7723353deb89536779570c63d197781a1a3fc8d0e896d4a0782c2a SHA512 d4590a8108e941e40041f210dc80674522ec3ac9b1a3f4f78ba754446acf4a4deefce2486a20220e5bbdfd1f62a07842714f6697d17035419cca35faaca2b1be MISC metadata.xml 399 BLAKE2B 7f75ab727887efba1f1991c5944cd262c95b53dbc48a391afdd67cb5c1f99d9c06753b06c7d28c5472075835ff5da4718eb0c3ca5b9e68a4d83173f223162c31 SHA512 45e90f3d9b83bffd42173290d47dce2247a2eff4d6293b7bcbcf422115e11b8c958a7a13f60b7742a96350bd5a2b37d8e76a807776f943c88833b77782d4f180 diff --git a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.4.ebuild b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.4.ebuild index 79663f659096..610d4705abb0 100644 --- a/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.4.ebuild +++ b/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.45.4.ebuild @@ -15,7 +15,7 @@ SRC_URI="mirror://sourceforge/e2fsprogs/${MY_P}.tar.xz LICENSE="GPL-2" SLOT="0" -KEYWORDS="alpha amd64 arm arm64 ~hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-linux ~x86-linux ~m68k-mint ~x86-solaris" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-linux ~x86-linux ~m68k-mint ~x86-solaris" IUSE="static-libs" RDEPEND="!sys-libs/com_err diff --git a/sys-libs/fts-standalone/Manifest b/sys-libs/fts-standalone/Manifest index ab6518268232..a3225d2e9953 100644 --- a/sys-libs/fts-standalone/Manifest +++ b/sys-libs/fts-standalone/Manifest @@ -1,5 +1,5 @@ DIST fts-0.2.tar.gz 339498 BLAKE2B 3800196fd67d03c5e732dec1cf6aeee85d417720c3e89f650f2c7238f60d57e4e51a69eb11dc67fdb8ca19093726d0f3f8b48e60c20ceb08b9173767ab895586 SHA512 4f31182f4ebce7f663db893def0e2380b87ef1a262a021837fc6fc9965803a829217142df140c67b1cd83b292eb8862fa0a470cf795a312494674e6e94f02f79 DIST fts-standalone-1.2.7.tar.gz 19336 BLAKE2B 045cfc32dffd18b58093dfe578a029ca15083eec98812ea2849acf37fd2c8e7272840b15b4966201421624d96ba69208a36b58d5420cef2563c107cfae98ea93 SHA512 949f73b9406b06bd8712c721b4ec89afcb37d4eaef5666cccf3712242d3a57fc0acf3ca994934e0f57c1e92f40521a9370132a21eb6d1957415a83c76bf20feb EBUILD fts-standalone-0.2-r1.ebuild 525 BLAKE2B 69878ba35048a77fc19dd2d93877d6d4bd35175b0953a8e77ebaf8a4dae9ce0996db1310ba3ca1ac086e3f02176de2b26391d14ea1e0f8419d2a9284c7d31c51 SHA512 063e7e8c5505871d0340145f31197227d0aa724d1ffb55fbe4b5637e56673bf749406528164c82196094c5d91065658ad431406eca54bc6d3d1bf76d260c0f98 -EBUILD fts-standalone-1.2.7.ebuild 730 BLAKE2B b61d7241e915951ffc808a58de99094e5c14dcd19478b7c410bd6f900d9876caae5dc6fcb21bccae456d2b7cd4f3edb3f0992d41a90a34dcd05d5c0afd5f6db0 SHA512 e0b99fe23f471c82b8bb2766e281fa50b58bcf65a7489d90c9dbd20a9048bf5fa0befbdab411afb0a14bb0373ef9b3c4ce5e3f9762a06b1eee3ac92ed433605e +EBUILD fts-standalone-1.2.7.ebuild 734 BLAKE2B 160cbab275f81cc656eb7b643b31778264b37946abee4ae6f3043a9cbb235047551ce10e8bc691e3c8f6246822419f047b04445a7cf87224e01e5cff5f252e7b SHA512 37571470a05121d40e07b38add14c1cc93ac6ab2d912e3564c7286a8363721640d9f88040f06c86d080f1a78ce22c1f3bc33a9a80210bc1222f4b19383773146 MISC metadata.xml 334 BLAKE2B b0cf07fe22c503cef4450546f0825c6e72df4e7b6fb85de9bc7d6e206e96efbb0f2d50391aa1fc3d5ffb6376aa290481253ca2ff8762bc1686b6057df9401d76 SHA512 f42362781a8bd718ddb3cc00aba96d8f7c5104a3dd0722cb189e827d2c0f7e78cec8d7dffbf3cf9ee82b5fba00330427486ae48247e3a2b3c0308e68d45702ab diff --git a/sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild b/sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild index d724eebce1d9..6dd663b39246 100644 --- a/sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild +++ b/sys-libs/fts-standalone/fts-standalone-1.2.7.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -11,7 +11,7 @@ SRC_URI="https://github.com/pullmoll/musl-fts/archive/v${PV}.tar.gz -> ${P}.tar. LICENSE="BSD" SLOT="0" -KEYWORDS="amd64 arm ~mips ppc x86" +KEYWORDS="amd64 arm ~arm64 ~mips ppc x86" IUSE="static-libs" DEPEND=" diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index 67928a4cbf36..6b1700cc5994 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -18,23 +18,23 @@ DIST glibc-2.27.tar.xz 15395316 BLAKE2B ea206d304c8c9aa86d69db981a14bea008602cea DIST glibc-2.28-patches-9.tar.xz 98588 BLAKE2B 4ab583be712994f949dee2512da6e12fd7f7ad73e96393f21678552b43da98f49321b53b5b009551300cdb09ca135e7f6adc636ff750c251a1d6d7f262dbc410 SHA512 e3f40ae6e9d06471c1a11bd2bce7b5161d07c3d0a81791505a72aec4817e7faf9ef09841e98c6dcf62a0a00754dff87dd194d97ac6b6354aeb2497cf60900b96 DIST glibc-2.28.tar.xz 16484344 BLAKE2B 9aa8cbd5a145c2a6fde3a60b3d0a14b12b46ed79333ad1ca3e73464adcfe700277a17a9e7fd0ca36e355a0c5b0b27decfa091da320ba802741ad75cc955bbcc8 SHA512 521f820953ff07c69ece4c2186f59fc061a7f9747932cd70ef2995c2b2deee76eeb6de700d85071cdca5949179aa8ccee75eda7feca1394121ec7b821ad0a3f3 DIST glibc-2.29-patches-3.tar.xz 35812 BLAKE2B 90b8bc57b7a63f03617795c368b92e525eccfec462d638dbc25c581e5b7a2a72ffd5191842f5ac443a868cbc950838d7e5120e866d343a14b80c55dcbfa48f30 SHA512 4c9b78d9d1a8aa629418f2d758ef800857780b8a1fd8d3582b88348a513ca26ca7f6ac9110a8c6bae16949b360ba36840d184f42293cd4324760273592d1b438 -DIST glibc-2.29-patches-5.tar.xz 64032 BLAKE2B 6c3104bd80aaba617201812a631b734ded4b02f8d4dadb5e353af48692f2a1509ddae1d34098de913ae5b3ac1a29111a44dfae71c3024fab4a805a22e9d66e33 SHA512 39add1388268ecf2029cb90b8312fb610b203f459a092dc1da8b46ce91ccfbbdff235592aa6174edf9efe71039d984ee121dc9adf7e18490cf92fe24561b1267 DIST glibc-2.29-patches-6.tar.xz 64076 BLAKE2B 04c1baf838eff9275e79145d4a5a642dcd6572aadcdfc6782769f2de107dcd1648b81d0690068db8c0d53229efe2130e279f4aafe8a91238e5dd6a8a7120a433 SHA512 6494dcd23441fe308de97706f7abbea1571e0015d1456e719268b8026e1fb23733c2efd5256840f4b9f0df4f02ac7827b1fad56905cbd8919bca9c25b0afe822 +DIST glibc-2.29-patches-7.tar.xz 64752 BLAKE2B 766f3f2d11aedf7e1b83db94fd2793244e29abc0beb78071a3eadfb83d3589f56b07b68c8faffd77ecc859497ba52f0327e03cf984b00adbeee3e196b0c5e57c SHA512 aea61fd3e084b293d0a92c89cd83d176ca95112e23224091e31ac77f54089922926ebbd9b75748d5b750f3d88c6f55f9953f11375a07a219946c485d4bf6bcaf DIST glibc-2.29.tar.xz 16515488 BLAKE2B b754e6825176538a2b8ca03fce014f0d87d333dc4d038bf0cda5ee8a2f484cd3ce93ad78ec126737e093ab64b55ceedf04cd08aecb4f8041daaa329e99717afa SHA512 146bc0769fe853d9edbf93cea7f74c5b3d84d69cb7614c62588e7acdecd1ec789a9d8949f3e8b99f8f36f2ccac740a003bed94f32b07817baf780b06cfeb6ed0 -DIST glibc-2.30-patches-1.tar.xz 19364 BLAKE2B 853ae651cf48a78796ac0a3c9c84098731d5a43b37644ee5029d2e2b06dab0d1d96b9dd7c3fd896c5513f5f712beca13845c1e24c698fe824ce0f529a2a827d4 SHA512 23065ec67b1a6302eece79da1ba731aa158a2abc0c65aed755cafea388c19aa1f545a6ea6d9db1fd128d06c6878b4c73aea07c6acc053b56bc416143e96e1c05 DIST glibc-2.30-patches-2.tar.xz 19588 BLAKE2B 672343ef8a44486304f03091844635febef9d1bc8000ab3382d702dcc1111a107b5e758355beaef8db5012f7e324e4c2365e10fc642b01c9f9a3a315de2dc7f6 SHA512 494155147b56e094a4427aed79e278b4a350928ddaff84330d6a40fad079131a4574f20c591dc95e572391b68ef72c49790571ee5323a2a541ec0757bcaeb161 +DIST glibc-2.30-patches-3.tar.xz 20412 BLAKE2B 8cd588284bf07985262a0289d8cbae03b0a75c48110fed6152c0431dc4f729a9695df910b1521a6072e9736b26145bf372d5b60163f64f4556f17f2f9f223e11 SHA512 0da9107518117a1cf901d282f2b84a2f4780130ab9eb7025ffd8b7e629aa6fd5f05b293dd49fc3c300bc2e74e7f81fc1f8a7cb12428b2be086a160d429715758 DIST glibc-2.30.tar.xz 16576920 BLAKE2B bd5aae4c9854f40785b91f83c3b632de6d48d811027ddfe61651cb1bc617db8017d7914c23a770cdd3feed06fcc316da841eea916cdba54179e7eace4ea45484 SHA512 37483990cd653685873e96c45dd1651b32b441b6d7919a68ebe3bae31a0c3f7ce183fc9b110f0b268b353f80312f18370559a1e7aecea0e5aa755c8f2aef1d6b DIST glibc-9999-patches-14.tar.xz 17908 BLAKE2B a6e1f22a4358111ff757431c5d42fd020f6095584c3517aa854ea266129d1a177a7c09b310643f1cea32ffaf253806ac08f3aed864fb477097aaa2c4010450f4 SHA512 ef28b409b26472ec1d868167345aecfee70b1edf1863374dc2f25892f40c10f0826620a8b22fbbc9f737c8f611569b3412e8e2ea041da1ad1ef7f6398b82cddc -EBUILD glibc-2.19-r2.ebuild 37294 BLAKE2B 61b3d7264b4591a645540b7be6b7f7c617dba61af38972ff9547d48bbf90b959e634391a4fbd950de631f092d23f4585b85e8b1eda5386dd57db5d201c7a306a SHA512 620140ba758d17e0d1edcc08e71477c5f9b240a2b86b170898841a9abc7e3090b5f3ec3730f44ff3315453696d1818c6f6c5e205544bb76efd3c562b05f2abf8 -EBUILD glibc-2.24-r4.ebuild 4945 BLAKE2B abeea3d030413af56ead335673e72fe6231de26f9d770b58928300bc8f8632c1eb1a7d65ed1b8e7c0ccc32f1283cd2e72a30253900fcce1c8cb34c9afe8aca83 SHA512 6d4e53d4ffb0789a4f92fd171058997ad2ec52b9c6cd5e8086cf79ab44dddeb0e14158a1c2e2cdc9a462e9b6a77fabde696b174c757ecd143d28b7cd606abd3a -EBUILD glibc-2.25-r11.ebuild 4932 BLAKE2B bdc57cade5e96352ecb62e032f0ad048ae1f95383e66745b76f291f58b153f7ae5c37ad96a94b628c9b115db11d1bf9cb093da1eb5d47f7a70bff59dd296a805 SHA512 486937b13919c3c64539a2da3ebb32f8bd8a1b2b7286562d3525a111f23cd34df90ffb0fe10b793c30dc51af767ee580b9dcebbf390fdf2544c1fe2f20240414 -EBUILD glibc-2.26-r7.ebuild 25504 BLAKE2B fb61b5f6d84c58a183e5bff7143e11105c9a5ce6afcde505aede6cbaf48524e64aebe22eb47b877736fe82ca2a1eb4c6e9de7bff4d24dfe418bc2fcd89a2b276 SHA512 5ec483b841d43b8bcd9626d2ee94e56c6c58138c06a62b9bd53752396fe96e7e9c8dac565fd7de1dd30b04caaec790aec666b6e54870e37f4b2beb9d1644cd02 -EBUILD glibc-2.27-r6.ebuild 40871 BLAKE2B ca9730540a24b18d1da227e39ee5679012e8e28a8a787b21aefdf294b0668c28a1268103e459d52b233dce783cdfd1cf2fae6c582fd3a947dced3b9d7f0b138d SHA512 0965ba376cc7a55aa5cf960071a3d38c54ef180a443e3b8953d57e9e790a7365838ba24ca24750150d306db5fbd069e686add8ecc1c61c052f8756005ab62265 -EBUILD glibc-2.28-r6.ebuild 40641 BLAKE2B 0fb54fd95d02a5a6afc214625e743d5c2693809e274b7e2ab9664ae9f38056ba977cae6bc5751a0fe8208764da93ef9749d54f4bb5863c2026bb40c75cdf6869 SHA512 4e2e8bae3c31efce1a72c7baab698131f3903e69ba358a25090df3cd99d78ff7555cb366d48c7226e475cc43d06b437ba51a942365689c7f32de89fa8c18d941 -EBUILD glibc-2.29-r2.ebuild 41930 BLAKE2B bcb1911a391d7b7d60741a3a8f0084613894fd1fc6d74086433f8eac5afa1a834c4ffbb786fa9590f84b1c0dd619f7957863ef4d389a810df28474125146c8a6 SHA512 f3565011646ed6b5d1107fa32c0ba288235669f966a9fd15050e9d913e362c2bef68cc1565b527bf732ab53fa111f7ab5910a05212fc6383732568501a7eaeb7 -EBUILD glibc-2.29-r4.ebuild 42236 BLAKE2B 13a3249b2e56420e8587aeabded76157b2fa2a4f7bff84c25e9883af5334acb9a9e42d0d3f00abeaa3274f6b7d115afc9777b3deb0395cf91e67c140b08651f1 SHA512 1efb98c9cebfe87dcac0e51f7bb6294ac1e4e9cd5957830e3724fd45ff492195e5db450b590c7f4001bb54338902ed904bec2e34f50cc4a9d98a1e5e4eb140cc -EBUILD glibc-2.29-r5.ebuild 42233 BLAKE2B 6a5918963b4f90b4e888bdb0c6153f50b536525db0fa7686c85cc0d79fc1fcfc1a3832145d2daea73cd8720bc8ffa92b3af4c17a27f59c5d141025f761067051 SHA512 f6bf65bf58c10803ab27e4b43167fa8bd6553bb7f4106732cab6fcb411e3289cb9aeb37bf3728a7d6c638851dfd7c2b267ead97716b23bf67513b6be8d475f6d -EBUILD glibc-2.30-r1.ebuild 42522 BLAKE2B a2355b8c31b26e29591c7a9ac81db727cc0df5d84397f21880ccdfd30575d6e4d0bf5cdb2e1661dc38be65205e9f1feaa41f2adf7c4d13f53592e208ec6fb319 SHA512 6595471409756012d59a97246c6f0677e38eaffe1a077d5ff15e3ddef65acb5702818a36ab7ff22774d3c007a1642d36ee07fc449189a927f97703bf07052e43 -EBUILD glibc-2.30.ebuild 42525 BLAKE2B 3b7d542211e97f0ac15ea8c18c90c4742c622bad2dd07abf6cc2c8b4a283f8b905d92de7a4b288c0855ec5bd578f4f7dbd3974e5ddab7c8e6d4407bdff9299c5 SHA512 90fe39b77505e77ac3d086395f9b5186ae0333dbe3949b131b056f4ec52e69d4273f746a0445d119aedca1c8d07de5508b232c6c16b48f19d95197d915d31ab0 -EBUILD glibc-9999.ebuild 42487 BLAKE2B b1bd8cbe575183879f03471b29c0531f6c006da98a36bb14c73eabde308de0708ddd8870e71147502a2333841290bc909e3f6a1797809fe395d13a07967d98d0 SHA512 66e8e7c910d2662a4d0009b3cdaa1f2847aeb7a4936218b1444dc3d51d202dd6d406aa5c89bedeacc4bd45acc16086b3fcfe9f447a8d40d665c40663e77b347d +EBUILD glibc-2.19-r2.ebuild 38499 BLAKE2B 02cf44053b89e707c8199790acceb573522ba2ea902fda81c8fce5cf5059978bcffbdd3284632c9322e6d0ef2d72686b89857d4484e221bb1506c70df58093c4 SHA512 1d843696065c2e2103ad5cdc673140b20fe8542c8090d7d79d18664b3d278ff330ac3c3f0766a49b3db05a576d0724d02f7c77f9bf2d7db48e55375478be6feb +EBUILD glibc-2.24-r4.ebuild 6150 BLAKE2B 200792a0f1f94e3dcddea9861fdd29bd4f84e1ea3fe4383f8d129d8f93da4d4caa1e576fe3af9fb88b04938b911c68c19241efb43f03fbb06270ffbce88c6c6a SHA512 2feff5c5ef0ab2aa88529de5a7ab482d5028c927c737fc5dd98c131beabec0dcb73abddccc357f05a3771caa709b9ba605264c1bbd89b18953d7a7cfa473e59c +EBUILD glibc-2.25-r11.ebuild 6137 BLAKE2B 9f3b67d7b51c1ebab3e8d6f09d5606605dc8baeca3f33257d10049eb55fceadf6ca4c8f344c4bb679fe741304e769ce0b40d172705f097df52cd56ffc9054eb9 SHA512 38742092d28a3676b14a779688b950ddb5b929509d856b2825a88963daf1a08a193bdeff40298924c9fc73739484c44d983851006e4d7845e3b8fc7c3e2562b9 +EBUILD glibc-2.26-r7.ebuild 26709 BLAKE2B cd6bc9991db0b53b83eda28a56fe4709de70ccb3b98d16cc33381305bfd01740378489274275654c2329868d69ffcb7d3b706868a10fc497ac6084de7d7bcc67 SHA512 edb6d0a381ef9e4d088269872d7eb4592a11808fb9e3b9cb76e8925882caabf04326a277f79f5482e97ab86d8732d0e59135b8413cd5373e050f89cf3fa45801 +EBUILD glibc-2.27-r6.ebuild 42076 BLAKE2B 7764eae64cfdced1389f5440847361542dd48ad06b11af309983c59c743d9adfabad6a13d99b8a7bc93e63bc7510ddd7b2290d185aaa69edc6359440ed6bd7e6 SHA512 547faf5a9f8cf17e793c94daefc365eb952649d8d78659e5565cf058a2b711cc2a40a0a620a40b07303a2e3ed6a9da60f58e4e868a2d7cce27a9b917887af52c +EBUILD glibc-2.28-r6.ebuild 41846 BLAKE2B ab865b89519504b0d0ce267436e82612fbc5ecb908c4917c73ffbd58bceadd8150ad7f909a81a7b41861428c5603cafbdd7d3696508de7a11921005564ff6445 SHA512 dd5b66dd4773b5fcc066989477c5c6a345d37ff20aa2043ad9a7cad24ce5e7a72c8101e5d56e7bef7e628d3a9274f739c075cd6359fc381f563fde1ba6fcc178 +EBUILD glibc-2.29-r2.ebuild 43135 BLAKE2B 98d405683871c456d1bbdc675dc80e69a8addc6dbe6d3f05d3ff2552029dd9c9aedf95a710c95fd3f190e46b3485029c34cc146cfac64f870a5932634f04f62a SHA512 0ef4d0a55862fbee1bbabcb08c1b6dc39ab82099780a85948f8ad32ecab2bc56c9f214ec9775eeaf68e331f70657a55bf4b4f7c0a98c4a47546648f46ae4efdc +EBUILD glibc-2.29-r5.ebuild 43438 BLAKE2B ce4d419263f872007356ce764464d4834aba95e41c0decfe434231cf8363479a5f2fb443ff0dafe49f6051243f4f0c7cbaa6291332307751260b1e419093b2b7 SHA512 e451e81069bd66ba67249846734415f4fae460bdd010f8a22b1b1715373354af9da6c975922d5c9a0151a8b6dc1e8018dc07a2825893480d605b0b46b718d315 +EBUILD glibc-2.29-r6.ebuild 43605 BLAKE2B 39ff5aae3f506e16c5626343c3faeb2d9a8f3751061ba1360a24103b9f51e188af17adce7a758bbb14978e940b885807c3d6422a12e62e411bc2ce18e76e92d4 SHA512 47f326c019c95af673be31328848747d88ec3059109b53b7088bb8fb629709cac6a4baf63a74564ecdd5343c694ef452cb81dda47aed3e2067fedc79615fefe3 +EBUILD glibc-2.30-r1.ebuild 43727 BLAKE2B a7ed79e68e97e0161f5f78a9f7610490c4bb73d4db0180097636589fc50c019082984712e30f976f98a1055f7182920f304bdcb29cdf70ac79236e7dab571a5c SHA512 cb6ea08b9d9f741a8e2a4cc1df0e21ebefa4c68583fd43ba70b95e1b9f5d047cfee925669e633a6f088c0c9fd05866e57ce08c67f304b1489b40163f48242e1f +EBUILD glibc-2.30-r2.ebuild 44010 BLAKE2B a57916bee4472558780d12daf058d3cc5f1aca72d404cab4119a4d75cd44be428b26d944a61eddc29281b67dbd34f31c194e1c340b3faf4ba7fb7fd3c537f1ab SHA512 d148647b6003886b80e611a1aa7280b7a884f64a751917c12b0607be19a37e8be19d6ddb153b053f45d8633aceea1d819c09b3c2e2d471aaf41c318231d23e5f +EBUILD glibc-9999.ebuild 44011 BLAKE2B 1526c362e808c5eac1401513dfddb828b99e6cccda96934cc8c761b8deaf542c4c3a3d6b1a32adb0cd77763770a044f8c20f4f0f601b5920b0c9fe14a600c621 SHA512 8da8ed353b94f51d47629ba1e8768eb2b198ce55a9db48ee2cff765901349282bb445d60c7eb846d238099e4ea5458980d90012d5cf89f4aa7d6fa0b254f6efc MISC metadata.xml 1323 BLAKE2B 6a19ccbf9f068c6c3d3b945d3011dce3d7712dd74a2daeaa8244eef73fd86723b275ce018ec5557862278c23883fabfb27e91e0b88ff62c34fffdadd4b024411 SHA512 848adbf531103d69b8b0e7017c25de730daecccae220e337e475ba8dbcaa95c6d5e440330be56367974607050dfa1964026ed90bc699ab5f12fef35c88d67505 diff --git a/sys-libs/glibc/glibc-2.19-r2.ebuild b/sys-libs/glibc/glibc-2.19-r2.ebuild index 0fedbb8e9409..de97f1158877 100644 --- a/sys-libs/glibc/glibc-2.19-r2.ebuild +++ b/sys-libs/glibc/glibc-2.19-r2.ebuild @@ -59,6 +59,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then 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 disable stripping +# entirely. +RESTRICT=strip + # We need a new-enough binutils/gcc to match upstream baseline. # Also we need to make sure our binutils/gcc supports TLS. COMMON_DEPEND=" diff --git a/sys-libs/glibc/glibc-2.24-r4.ebuild b/sys-libs/glibc/glibc-2.24-r4.ebuild index b808611bd319..6e4b70cd46d0 100644 --- a/sys-libs/glibc/glibc-2.24-r4.ebuild +++ b/sys-libs/glibc/glibc-2.24-r4.ebuild @@ -52,6 +52,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then 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 disable stripping +# entirely. +RESTRICT=strip + is_crosscompile() { [[ ${CHOST} != ${CTARGET} ]] } diff --git a/sys-libs/glibc/glibc-2.25-r11.ebuild b/sys-libs/glibc/glibc-2.25-r11.ebuild index e2a0f9131bbc..0f544aa3101c 100644 --- a/sys-libs/glibc/glibc-2.25-r11.ebuild +++ b/sys-libs/glibc/glibc-2.25-r11.ebuild @@ -54,6 +54,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then 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 disable stripping +# entirely. +RESTRICT=strip + is_crosscompile() { [[ ${CHOST} != ${CTARGET} ]] } diff --git a/sys-libs/glibc/glibc-2.26-r7.ebuild b/sys-libs/glibc/glibc-2.26-r7.ebuild index 34d8fb8a7ac9..ebe70b6e3ea6 100644 --- a/sys-libs/glibc/glibc-2.26-r7.ebuild +++ b/sys-libs/glibc/glibc-2.26-r7.ebuild @@ -58,6 +58,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then 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 disable stripping +# entirely. +RESTRICT=strip + is_crosscompile() { [[ ${CHOST} != ${CTARGET} ]] } diff --git a/sys-libs/glibc/glibc-2.27-r6.ebuild b/sys-libs/glibc/glibc-2.27-r6.ebuild index f1409e36cf34..8815d7bc6233 100644 --- a/sys-libs/glibc/glibc-2.27-r6.ebuild +++ b/sys-libs/glibc/glibc-2.27-r6.ebuild @@ -58,6 +58,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then 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 disable stripping +# entirely. +RESTRICT=strip + # We need a new-enough binutils/gcc to match upstream baseline. # Also we need to make sure our binutils/gcc supports TLS. COMMON_DEPEND=" diff --git a/sys-libs/glibc/glibc-2.28-r6.ebuild b/sys-libs/glibc/glibc-2.28-r6.ebuild index aa318b7e0f1b..7412d5dfc5cf 100644 --- a/sys-libs/glibc/glibc-2.28-r6.ebuild +++ b/sys-libs/glibc/glibc-2.28-r6.ebuild @@ -58,6 +58,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then 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 disable stripping +# entirely. +RESTRICT=strip + # 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. diff --git a/sys-libs/glibc/glibc-2.29-r2.ebuild b/sys-libs/glibc/glibc-2.29-r2.ebuild index b80ddd008144..a09890ee70ad 100644 --- a/sys-libs/glibc/glibc-2.29-r2.ebuild +++ b/sys-libs/glibc/glibc-2.29-r2.ebuild @@ -60,6 +60,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then 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 disable stripping +# entirely. +RESTRICT=strip + # 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. diff --git a/sys-libs/glibc/glibc-2.29-r4.ebuild b/sys-libs/glibc/glibc-2.29-r4.ebuild deleted file mode 100644 index 7282d89d8eee..000000000000 --- a/sys-libs/glibc/glibc-2.29-r4.ebuild +++ /dev/null @@ -1,1454 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python3_{5,6,7} ) - -inherit python-any-r1 prefix eutils eapi7-ver toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ - multilib systemd multiprocessing - -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" - -if [[ ${PV} == 9999* ]]; then - EGIT_REPO_URI="https://sourceware.org/git/glibc.git" - inherit git-r3 -else - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" - SRC_URI="mirror://gnu/glibc/${P}.tar.xz" -fi - -RELEASE_VER=${PV} - -GCC_BOOTSTRAP_VER=20180511 - -# Gentoo patchset -PATCH_VER=5 - -SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.xz" -SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" - -IUSE="audit caps cet compile-locales doc gd headers-only +multiarch multilib nscd profile selinux +ssp suid 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 - -# 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. -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} - ${PYTHON_DEPS} - >=app-misc/pax-utils-0.1.10 - sys-devel/bison - !=net-dns/libidn2-2.0.5 ) -" -RDEPEND="${COMMON_DEPEND} - sys-apps/gentoo-functions - !sys-kernel/ps3-sources - !sys-libs/nss-db -" - -if [[ ${CATEGORY} == cross-* ]] ; then - DEPEND+=" !headers-only? ( - >=${CATEGORY}/binutils-2.24 - >=${CATEGORY}/gcc-6 - )" - [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" -else - DEPEND+=" - >=sys-devel/binutils-2.24 - >=sys-devel/gcc-6 - virtual/os-headers - " - RDEPEND+=" - >=net-dns/libidn2-2.0.5 - vanilla? ( !sys-libs/timezone-data ) - " - PDEPEND+=" !vanilla? ( sys-libs/timezone-data )" -fi - -# -# 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 ' | $(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 - - nonfatal emake -s glibc-test - 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' 2>/dev/null ; 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 - # Note: This test only matters when the x86 ABI is enabled, so we could - # optimize a bit and elide it. - # TODO: See cross-compile issues listed above for 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' 2>/dev/null ; 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" - fi - ;; - mips) - # The mips abi cannot support the GNU style hashes. #233233 - filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both - ;; - sparc) - # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. - filter-flags "-fcall-used-g7" - append-flags "-fcall-used-g6" - - # If the CHOST is the basic one (e.g. not sparcv9-xxx already), - # try to pick a better one so glibc can use cpu-specific .S files. - # We key off the CFLAGS to get a good value. Also need to handle - # version skew. - # We can't force users to set their CHOST to their exact machine - # as many of these are not recognized by config.sub/gcc and such :(. - # Note: If the mcpu values don't scale, we might try probing CPP defines. - # Note: Should we factor in -Wa,-AvXXX flags too ? Or -mvis/etc... ? - - local cpu - case ${CTARGET} in - sparc64-*) - case $(get-flag mcpu) in - niagara[234]) - if ver_test -ge 2.8 ; then - cpu="sparc64v2" - elif ver_test -ge 2.4 ; then - cpu="sparc64v" - elif ver_test -ge 2.2.3 ; then - cpu="sparc64b" - fi - ;; - niagara) - if ver_test -ge 2.4 ; then - cpu="sparc64v" - elif ver_test -ge 2.2.3 ; then - cpu="sparc64b" - fi - ;; - ultrasparc3) - cpu="sparc64b" - ;; - *) - # 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 - [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a" - ;; - esac - ;; - sparc-*) - case $(get-flag mcpu) in - niagara[234]) - if ver_test -ge 2.8 ; then - cpu="sparcv9v2" - elif ver_test -ge 2.4 ; then - cpu="sparcv9v" - elif ver_test -ge 2.2.3 ; then - cpu="sparcv9b" - else - cpu="sparcv9" - fi - ;; - niagara) - if ver_test -ge 2.4 ; then - cpu="sparcv9v" - elif ver_test -ge 2.2.3 ; then - cpu="sparcv9b" - else - cpu="sparcv9" - fi - ;; - ultrasparc3) - cpu="sparcv9b" - ;; - v9|ultrasparc) - cpu="sparcv9" - ;; - v8|supersparc|hypersparc|leon|leon3) - cpu="sparcv8" - ;; - 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} - - # 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 - strip-unsupported-flags - filter-flags -m32 -m64 '-mabi=*' - - # glibc aborts if rpath is set by LDFLAGS - filter-ldflags '-Wl,-rpath=*' - - # #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 - - # Lock glibc at -O2; we want to be conservative here. - # -fno-strict-aliasing is to work around #155906. - filter-flags '-O?' - append-flags -O2 -fno-strict-aliasing - - 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_ 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_OPT:-${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}" -} - -check_devpts() { - # Make sure devpts is mounted correctly for use w/out setuid pt_chown. - - # If merely building the binary package, then there's nothing to verify. - [[ ${MERGE_TYPE} == "buildonly" ]] && return - - # Only sanity check when installing the native glibc. - [[ ${ROOT} != "/" ]] && return - - # If they're opting in to the old suid code, then no need to check. - use suid && return - - if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then - eerror "In order to use glibc with USE=-suid, you must make sure that" - eerror "you have devpts mounted at /dev/pts with the gid=5 option." - eerror "Openrc should do this for you, so you should check /etc/fstab" - eerror "and make sure you do not have any invalid settings there." - die "mount & fix your /dev/pts settings" - fi -} - -# 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 \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() { - # 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." - [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." - fi - - if ! do_run_test '#include \n#include \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() 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 - - # Check for sanity of /etc/nsswitch.conf - if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then - local entry - for entry in passwd group shadow; do - if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then - eerror "Your ${EROOT}/etc/nsswitch.conf is out of date." - eerror "Please make sure you have 'files' entries for" - eerror "'passwd:', 'group:' and 'shadow:' databases." - eerror "For more details see:" - eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26" - die "nsswitch.conf has no 'files' provider in '${entry}'." - fi - done - 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 ; 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 && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz - - setup_env - - if [[ -n ${EGIT_REPO_URI} ]] ; then - git-r3_src_unpack - else - unpack ${P}.tar.xz - fi - - cd "${WORKDIR}" || die - unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz -} - -src_prepare() { - if ! use vanilla ; then - elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" - eapply "${WORKDIR}"/patches - einfo "Done." - 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}" -} - -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 ; 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}" - - echo - - local myconf=() - - case ${CTARGET} in - m68k*) - # setjmp() is not compatible with stack protection: - # https://sourceware.org/PR24202 - myconf+=( --enable-stack-protector=no ) - ;; - 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=$(usex ssp all 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=$(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_multiarch || echo --disable-multi-arch) - $(use_enable systemtap) - $(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=$(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 ; 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=$(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)" || die "make nptl for ${ABI} failed" -} - -src_compile() { - if just_headers ; then - return - fi - - foreach_abi do_src_compile -} - -glibc_src_test() { - cd "$(builddir nptl)" - emake 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) - - 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 - - locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ - --destdir "${root}" - - popd -} - -glibc_do_src_install() { - local builddir=$(builddir nptl) - cd "${builddir}" - - emake install_root="${D}$(build_eprefix)$(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 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) - - 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-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.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 - ppc64 /lib64/ld64.so.1 - # riscv - 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 - ) - ;; - 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 ! 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 - - # 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 - - # HACK: If we're building for riscv, we need to additionally make sure that - # we can find the locale archive afterwards - case ${CTARGET} in - riscv*) - if [[ ! -e ${ED}/usr/lib/locale ]] ; then - dosym ../$(get_libdir)/locale /usr/lib/locale - fi - ;; - *) ;; - esac - - 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 - 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 -} - -# 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 - - [[ ${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 - - 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 -} diff --git a/sys-libs/glibc/glibc-2.29-r5.ebuild b/sys-libs/glibc/glibc-2.29-r5.ebuild index 1c3f4a15dde7..5ef228c36885 100644 --- a/sys-libs/glibc/glibc-2.29-r5.ebuild +++ b/sys-libs/glibc/glibc-2.29-r5.ebuild @@ -60,6 +60,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then 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 disable stripping +# entirely. +RESTRICT=strip + # 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. diff --git a/sys-libs/glibc/glibc-2.29-r6.ebuild b/sys-libs/glibc/glibc-2.29-r6.ebuild new file mode 100644 index 000000000000..72a38553096f --- /dev/null +++ b/sys-libs/glibc/glibc-2.29-r6.ebuild @@ -0,0 +1,1479 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{5,6,7} ) + +inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ + multilib systemd multiprocessing + +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" + +if [[ ${PV} == 9999* ]]; then + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + inherit git-r3 +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER=20180511 + +# Gentoo patchset +PATCH_VER=7 + +SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" + +IUSE="audit caps cet compile-locales doc gd headers-only +multiarch multilib nscd profile selinux +ssp suid 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. +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-0.1.10 + sys-devel/bison + !' | $(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 + + nonfatal emake -s glibc-test + 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' 2>/dev/null ; 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 + # Note: This test only matters when the x86 ABI is enabled, so we could + # optimize a bit and elide it. + # TODO: See cross-compile issues listed above for 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' 2>/dev/null ; 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" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + # If the CHOST is the basic one (e.g. not sparcv9-xxx already), + # try to pick a better one so glibc can use cpu-specific .S files. + # We key off the CFLAGS to get a good value. Also need to handle + # version skew. + # We can't force users to set their CHOST to their exact machine + # as many of these are not recognized by config.sub/gcc and such :(. + # Note: If the mcpu values don't scale, we might try probing CPP defines. + # Note: Should we factor in -Wa,-AvXXX flags too ? Or -mvis/etc... ? + + local cpu + case ${CTARGET} in + sparc64-*) + case $(get-flag mcpu) in + niagara[234]) + if ver_test -ge 2.8 ; then + cpu="sparc64v2" + elif ver_test -ge 2.4 ; then + cpu="sparc64v" + elif ver_test -ge 2.2.3 ; then + cpu="sparc64b" + fi + ;; + niagara) + if ver_test -ge 2.4 ; then + cpu="sparc64v" + elif ver_test -ge 2.2.3 ; then + cpu="sparc64b" + fi + ;; + ultrasparc3) + cpu="sparc64b" + ;; + *) + # 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 + [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + niagara[234]) + if ver_test -ge 2.8 ; then + cpu="sparcv9v2" + elif ver_test -ge 2.4 ; then + cpu="sparcv9v" + elif ver_test -ge 2.2.3 ; then + cpu="sparcv9b" + else + cpu="sparcv9" + fi + ;; + niagara) + if ver_test -ge 2.4 ; then + cpu="sparcv9v" + elif ver_test -ge 2.2.3 ; then + cpu="sparcv9b" + else + cpu="sparcv9" + fi + ;; + ultrasparc3) + cpu="sparcv9b" + ;; + v9|ultrasparc) + cpu="sparcv9" + ;; + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + 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} + + # 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 + strip-unsupported-flags + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # #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 + + # Lock glibc at -O2; we want to be conservative here. + # -fno-strict-aliasing is to work around #155906. + filter-flags '-O?' + append-flags -O2 -fno-strict-aliasing + + 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_ 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_OPT:-${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}" +} + +check_devpts() { + # Make sure devpts is mounted correctly for use w/out setuid pt_chown. + + # If merely building the binary package, then there's nothing to verify. + [[ ${MERGE_TYPE} == "buildonly" ]] && return + + # Only sanity check when installing the native glibc. + [[ -n ${ROOT} ]] && return + + # If they're opting in to the old suid code, then no need to check. + use suid && return + + if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then + eerror "In order to use glibc with USE=-suid, you must make sure that" + eerror "you have devpts mounted at /dev/pts with the gid=5 option." + eerror "Openrc should do this for you, so you should check /etc/fstab" + eerror "and make sure you do not have any invalid settings there." + die "mount & fix your /dev/pts settings" + fi +} + +# 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 \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() { + # Make sure devpts is mounted correctly for use w/out setuid pt_chown + check_devpts + + # 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 \n#include \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() 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 + + # Check for sanity of /etc/nsswitch.conf + if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then + local entry + for entry in passwd group shadow; do + if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then + eerror "Your ${EROOT}/etc/nsswitch.conf is out of date." + eerror "Please make sure you have 'files' entries for" + eerror "'passwd:', 'group:' and 'shadow:' databases." + eerror "For more details see:" + eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26" + die "nsswitch.conf has no 'files' provider in '${entry}'." + fi + done + 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 ; 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 && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + setup_env + + if [[ -n ${EGIT_REPO_URI} ]] ; then + git-r3_src_unpack + else + unpack ${P}.tar.xz + fi + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz +} + +src_prepare() { + if ! use vanilla ; then + elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" + eapply "${WORKDIR}"/patches + einfo "Done." + 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}" +} + +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 ; 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}" + + echo + + local myconf=() + + case ${CTARGET} in + m68k*) + # setjmp() is not compatible with stack protection: + # https://sourceware.org/PR24202 + myconf+=( --enable-stack-protector=no ) + ;; + 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=$(usex ssp all 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=$(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_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(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=$(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 ; 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=$(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)" + emake 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 + + locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + --destdir "${root}" + + 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-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.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 + ppc64 /lib64/ld64.so.1 + # riscv + 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 + ) + ;; + 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 ! 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 + + # 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 + + # HACK: If we're building for riscv, we need to additionally make sure that + # we can find the locale archive afterwards + case ${CTARGET} in + riscv*) + if [[ ! -e ${ED}/usr/lib/locale ]] ; then + dosym ../$(get_libdir)/locale /usr/lib/locale + fi + ;; + *) ;; + esac + + 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 + 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 +} + +# 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 +} + +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 +} diff --git a/sys-libs/glibc/glibc-2.30-r1.ebuild b/sys-libs/glibc/glibc-2.30-r1.ebuild index b3da5c0345ed..958a2c87cde9 100644 --- a/sys-libs/glibc/glibc-2.30-r1.ebuild +++ b/sys-libs/glibc/glibc-2.30-r1.ebuild @@ -61,6 +61,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then 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 disable stripping +# entirely. +RESTRICT=strip + # 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. diff --git a/sys-libs/glibc/glibc-2.30-r2.ebuild b/sys-libs/glibc/glibc-2.30-r2.ebuild new file mode 100644 index 000000000000..238a82906316 --- /dev/null +++ b/sys-libs/glibc/glibc-2.30-r2.ebuild @@ -0,0 +1,1491 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{5,6,7} ) + +inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ + multilib systemd multiprocessing + +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" + +if [[ ${PV} == 9999* ]]; then + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + inherit git-r3 +else + #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" + KEYWORDS="" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" +fi + +RELEASE_VER=${PV} + +GCC_BOOTSTRAP_VER=20180511 + +# Gentoo patchset +PATCH_VER=3 + +SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" + +IUSE="audit caps cet compile-locales custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs suid 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. +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-0.1.10 + sys-devel/bison + !' | $(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 + + nonfatal emake -s glibc-test + 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' 2>/dev/null ; 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 + # Note: This test only matters when the x86 ABI is enabled, so we could + # optimize a bit and elide it. + # TODO: See cross-compile issues listed above for 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' 2>/dev/null ; 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" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + # If the CHOST is the basic one (e.g. not sparcv9-xxx already), + # try to pick a better one so glibc can use cpu-specific .S files. + # We key off the CFLAGS to get a good value. Also need to handle + # version skew. + # We can't force users to set their CHOST to their exact machine + # as many of these are not recognized by config.sub/gcc and such :(. + # Note: If the mcpu values don't scale, we might try probing CPP defines. + # Note: Should we factor in -Wa,-AvXXX flags too ? Or -mvis/etc... ? + + local cpu + case ${CTARGET} in + sparc64-*) + case $(get-flag mcpu) in + niagara[234]) + if ver_test -ge 2.8 ; then + cpu="sparc64v2" + elif ver_test -ge 2.4 ; then + cpu="sparc64v" + elif ver_test -ge 2.2.3 ; then + cpu="sparc64b" + fi + ;; + niagara) + if ver_test -ge 2.4 ; then + cpu="sparc64v" + elif ver_test -ge 2.2.3 ; then + cpu="sparc64b" + fi + ;; + ultrasparc3) + cpu="sparc64b" + ;; + *) + # 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 + [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + niagara[234]) + if ver_test -ge 2.8 ; then + cpu="sparcv9v2" + elif ver_test -ge 2.4 ; then + cpu="sparcv9v" + elif ver_test -ge 2.2.3 ; then + cpu="sparcv9b" + else + cpu="sparcv9" + fi + ;; + niagara) + if ver_test -ge 2.4 ; then + cpu="sparcv9v" + elif ver_test -ge 2.2.3 ; then + cpu="sparcv9b" + else + cpu="sparcv9" + fi + ;; + ultrasparc3) + cpu="sparcv9b" + ;; + v9|ultrasparc) + cpu="sparcv9" + ;; + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + 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=*' + + # #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_ 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_OPT:-${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}" +} + +check_devpts() { + # Make sure devpts is mounted correctly for use w/out setuid pt_chown. + + # If merely building the binary package, then there's nothing to verify. + [[ ${MERGE_TYPE} == "buildonly" ]] && return + + # Only sanity check when installing the native glibc. + [[ -n ${ROOT} ]] && return + + # If they're opting in to the old suid code, then no need to check. + use suid && return + + if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then + eerror "In order to use glibc with USE=-suid, you must make sure that" + eerror "you have devpts mounted at /dev/pts with the gid=5 option." + eerror "Openrc should do this for you, so you should check /etc/fstab" + eerror "and make sure you do not have any invalid settings there." + die "mount & fix your /dev/pts settings" + fi +} + +# 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 \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() { + # Make sure devpts is mounted correctly for use w/out setuid pt_chown + check_devpts + + # 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 \n#include \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() 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 + + # Check for sanity of /etc/nsswitch.conf + if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then + local entry + for entry in passwd group shadow; do + if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then + eerror "Your ${EROOT}/etc/nsswitch.conf is out of date." + eerror "Please make sure you have 'files' entries for" + eerror "'passwd:', 'group:' and 'shadow:' databases." + eerror "For more details see:" + eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26" + die "nsswitch.conf has no 'files' provider in '${entry}'." + fi + done + 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 ; 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 && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + setup_env + + if [[ -n ${EGIT_REPO_URI} ]] ; then + git-r3_src_unpack + else + unpack ${P}.tar.xz + fi + + cd "${WORKDIR}" || die + unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz +} + +src_prepare() { + if ! use vanilla ; then + elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" + eapply "${WORKDIR}"/patches + einfo "Done." + 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}" +} + +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 ; 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}" + + echo + + local myconf=() + + case ${CTARGET} in + m68k*) + # setjmp() is not compatible with stack protection: + # https://sourceware.org/PR24202 + myconf+=( --enable-stack-protector=no ) + ;; + 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=$(usex ssp all 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=$(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_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(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=$(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 ; 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=$(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)" + emake 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 + + locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ + --destdir "${root}" + + 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-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.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 + ppc64 /lib64/ld64.so.1 + # riscv + 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 + ) + ;; + 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 ! 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 + + # 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 + + # HACK: If we're building for riscv, we need to additionally make sure that + # we can find the locale archive afterwards + case ${CTARGET} in + riscv*) + if [[ ! -e ${ED}/usr/lib/locale ]] ; then + dosym ../$(get_libdir)/locale /usr/lib/locale + fi + ;; + *) ;; + esac + + 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 + 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 + elog "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 +} + +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 +} diff --git a/sys-libs/glibc/glibc-2.30.ebuild b/sys-libs/glibc/glibc-2.30.ebuild deleted file mode 100644 index 5a8933d5d964..000000000000 --- a/sys-libs/glibc/glibc-2.30.ebuild +++ /dev/null @@ -1,1462 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python3_{5,6,7} ) - -inherit python-any-r1 prefix eutils eapi7-ver toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ - multilib systemd multiprocessing - -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" - -if [[ ${PV} == 9999* ]]; then - EGIT_REPO_URI="https://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=20180511 - -# Gentoo patchset -PATCH_VER=1 - -SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.xz" -SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" - -IUSE="audit caps cet compile-locales custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs suid 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 - -# 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. -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} - ${PYTHON_DEPS} - >=app-misc/pax-utils-0.1.10 - sys-devel/bison - !=net-dns/libidn2-2.0.5 ) -" -RDEPEND="${COMMON_DEPEND} - sys-apps/gentoo-functions - !sys-kernel/ps3-sources - !sys-libs/nss-db -" - -if [[ ${CATEGORY} == cross-* ]] ; then - DEPEND+=" !headers-only? ( - >=${CATEGORY}/binutils-2.24 - >=${CATEGORY}/gcc-6 - )" - [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" -else - DEPEND+=" - >=sys-devel/binutils-2.24 - >=sys-devel/gcc-6 - virtual/os-headers - " - RDEPEND+=" - >=net-dns/libidn2-2.0.5 - vanilla? ( !sys-libs/timezone-data ) - " - PDEPEND+=" !vanilla? ( sys-libs/timezone-data )" -fi - -# -# 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 ' | $(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 - - nonfatal emake -s glibc-test - 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' 2>/dev/null ; 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 - # Note: This test only matters when the x86 ABI is enabled, so we could - # optimize a bit and elide it. - # TODO: See cross-compile issues listed above for 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' 2>/dev/null ; 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" - fi - ;; - mips) - # The mips abi cannot support the GNU style hashes. #233233 - filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both - ;; - sparc) - # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. - filter-flags "-fcall-used-g7" - append-flags "-fcall-used-g6" - - # If the CHOST is the basic one (e.g. not sparcv9-xxx already), - # try to pick a better one so glibc can use cpu-specific .S files. - # We key off the CFLAGS to get a good value. Also need to handle - # version skew. - # We can't force users to set their CHOST to their exact machine - # as many of these are not recognized by config.sub/gcc and such :(. - # Note: If the mcpu values don't scale, we might try probing CPP defines. - # Note: Should we factor in -Wa,-AvXXX flags too ? Or -mvis/etc... ? - - local cpu - case ${CTARGET} in - sparc64-*) - case $(get-flag mcpu) in - niagara[234]) - if ver_test -ge 2.8 ; then - cpu="sparc64v2" - elif ver_test -ge 2.4 ; then - cpu="sparc64v" - elif ver_test -ge 2.2.3 ; then - cpu="sparc64b" - fi - ;; - niagara) - if ver_test -ge 2.4 ; then - cpu="sparc64v" - elif ver_test -ge 2.2.3 ; then - cpu="sparc64b" - fi - ;; - ultrasparc3) - cpu="sparc64b" - ;; - *) - # 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 - [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a" - ;; - esac - ;; - sparc-*) - case $(get-flag mcpu) in - niagara[234]) - if ver_test -ge 2.8 ; then - cpu="sparcv9v2" - elif ver_test -ge 2.4 ; then - cpu="sparcv9v" - elif ver_test -ge 2.2.3 ; then - cpu="sparcv9b" - else - cpu="sparcv9" - fi - ;; - niagara) - if ver_test -ge 2.4 ; then - cpu="sparcv9v" - elif ver_test -ge 2.2.3 ; then - cpu="sparcv9b" - else - cpu="sparcv9" - fi - ;; - ultrasparc3) - cpu="sparcv9b" - ;; - v9|ultrasparc) - cpu="sparcv9" - ;; - v8|supersparc|hypersparc|leon|leon3) - cpu="sparcv8" - ;; - 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=*' - - # #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_ 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_OPT:-${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}" -} - -check_devpts() { - # Make sure devpts is mounted correctly for use w/out setuid pt_chown. - - # If merely building the binary package, then there's nothing to verify. - [[ ${MERGE_TYPE} == "buildonly" ]] && return - - # Only sanity check when installing the native glibc. - [[ ${ROOT} != "/" ]] && return - - # If they're opting in to the old suid code, then no need to check. - use suid && return - - if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then - eerror "In order to use glibc with USE=-suid, you must make sure that" - eerror "you have devpts mounted at /dev/pts with the gid=5 option." - eerror "Openrc should do this for you, so you should check /etc/fstab" - eerror "and make sure you do not have any invalid settings there." - die "mount & fix your /dev/pts settings" - fi -} - -# 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 \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() { - # 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." - [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." - fi - - if ! do_run_test '#include \n#include \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() 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 - - # Check for sanity of /etc/nsswitch.conf - if [[ -e ${EROOT}/etc/nsswitch.conf ]] ; then - local entry - for entry in passwd group shadow; do - if ! egrep -q "^[ \t]*${entry}:.*files" "${EROOT}"/etc/nsswitch.conf; then - eerror "Your ${EROOT}/etc/nsswitch.conf is out of date." - eerror "Please make sure you have 'files' entries for" - eerror "'passwd:', 'group:' and 'shadow:' databases." - eerror "For more details see:" - eerror " https://wiki.gentoo.org/wiki/Project:Toolchain/nsswitch.conf_in_glibc-2.26" - die "nsswitch.conf has no 'files' provider in '${entry}'." - fi - done - 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 ; 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 && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz - - setup_env - - if [[ -n ${EGIT_REPO_URI} ]] ; then - git-r3_src_unpack - else - unpack ${P}.tar.xz - fi - - cd "${WORKDIR}" || die - unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.xz -} - -src_prepare() { - if ! use vanilla ; then - elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER}" - eapply "${WORKDIR}"/patches - einfo "Done." - 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}" -} - -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 ; 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}" - - echo - - local myconf=() - - case ${CTARGET} in - m68k*) - # setjmp() is not compatible with stack protection: - # https://sourceware.org/PR24202 - myconf+=( --enable-stack-protector=no ) - ;; - 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=$(usex ssp all 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=$(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_multiarch || echo --disable-multi-arch) - $(use_enable systemtap) - $(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=$(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 ; 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=$(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)" || die "make nptl for ${ABI} failed" -} - -src_compile() { - if just_headers ; then - return - fi - - foreach_abi do_src_compile -} - -glibc_src_test() { - cd "$(builddir nptl)" - emake 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 - - locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ - --destdir "${root}" - - popd >/dev/null -} - -glibc_do_src_install() { - local builddir=$(builddir nptl) - cd "${builddir}" - - emake install_root="${D}$(build_eprefix)$(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 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) - - 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-.a ..." -> "GROUP ( /usr/lib64/glibc-/libm-.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 - ppc64 /lib64/ld64.so.1 - # riscv - 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 - ) - ;; - 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 ! 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 - - # 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 - - # HACK: If we're building for riscv, we need to additionally make sure that - # we can find the locale archive afterwards - case ${CTARGET} in - riscv*) - if [[ ! -e ${ED}/usr/lib/locale ]] ; then - dosym ../$(get_libdir)/locale /usr/lib/locale - fi - ;; - *) ;; - esac - - 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 - 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 - elog "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 - - [[ ${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 - 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 -} diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild index d529e346178e..4ff0c140c457 100644 --- a/sys-libs/glibc/glibc-9999.ebuild +++ b/sys-libs/glibc/glibc-9999.ebuild @@ -19,7 +19,7 @@ if [[ ${PV} == 9999* ]]; then EGIT_REPO_URI="https://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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" KEYWORDS="" SRC_URI="mirror://gnu/glibc/${P}.tar.xz" fi @@ -61,6 +61,26 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then 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. @@ -1181,6 +1201,13 @@ glibc_do_src_install() { # '#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: diff --git a/sys-libs/kpmcore/Manifest b/sys-libs/kpmcore/Manifest index a8babb84025c..5af032c5cf6e 100644 --- a/sys-libs/kpmcore/Manifest +++ b/sys-libs/kpmcore/Manifest @@ -1,5 +1,3 @@ -DIST kpmcore-4.0.0.tar.xz 417784 BLAKE2B deffb82b3ec5029ce845a398728b31b4da1b1b69377684a982b0d8067cfddc9ccb2ab2f4369faeb289b4aa54841940aae5a69051a30e4895b840c51393b0c487 SHA512 16f0a8ecae35c214272f28c49b5fff3d2d5e0959b9dceba392b9b6186d44e10d11fcf16ef0ad1da42f49f0c631ccb858d726a92d7c2f22125dae07fd4d2c5500 DIST kpmcore-4.0.1.tar.xz 416932 BLAKE2B db429a9a51baf2d3f83d36479c05ac28c1d742dfc9e0dda51486d17958c95751da6295fe9e915359717eebbab3877464284b871dd8ded5a87c01c590cf4eac85 SHA512 982ad77246f59ade74edba15effca6490ac9ac7bb6db7f6194bcdbfddfa735c9bc1b58020affccd945fcdfc96fce3488167f492d6a13dcd6d19c5692505303ac -EBUILD kpmcore-4.0.0.ebuild 844 BLAKE2B c00be8ec09e14d56485588e343733027536eb07c79fd5513e81a9da223c608423bfd59676d27a235698a17e12be1b043d3b48f9878f4dcfe01af24ad9c03c294 SHA512 633c53cee2cef545b816da77e712bad4ac2da3dfe251ac31203ed700ebc486aad3ae738fc71710cabb065da750adcafa3b6002e6580b184eb7afe5f1b2937138 -EBUILD kpmcore-4.0.1.ebuild 820 BLAKE2B 9ab00e632080f0e814687bdcd15b5ff05a56a3e2d29b61a23da34b1c117bbfa3536fff3590a0e8e2ce6d50517b8955f742b4039bdd78029005ba47db5e2b553d SHA512 979fd99c05cbcb12520789f303a066ec881a15484aed24c17f3fc4806d4566310b8b7921d42cedad5cff28c85b3420680b647b7f1797771c82b6561eeefcb54d +EBUILD kpmcore-4.0.1.ebuild 818 BLAKE2B a69f39d25310c15e0374b45f4fb3868e965785f03a79341a544f9d4d2e44225b1fd3c6c8a74d534bdfcf35c42718ae1a4a1ca76b4e2a7e3948319f329393f341 SHA512 3be74e0220747cf542abe5bc8633b6b533a92ccddd4ccde7d2db0db8bfa914ab1bf08977fec690442b59443b3a21b0a2e8a3168ab26baa0a6af0fbf598fd2c1b MISC metadata.xml 249 BLAKE2B ad415db89e5dee1627aa77f44ded9d4e1e5b8217d06c7ca25bbaa3fe92ce67c2b1090957c45a821b407d7927e5af798498aa6a5b903895ee1af8ee20a446c7f7 SHA512 76a5a340b13f0053ca3c5e94ed24380ea8d29b45ac8655419e22eaadb1e4a827c04d2e7e36b65145c4964e6526f656618fc6ac144e277ef53cb7373e6239e3c3 diff --git a/sys-libs/kpmcore/kpmcore-4.0.0.ebuild b/sys-libs/kpmcore/kpmcore-4.0.0.ebuild deleted file mode 100644 index 5d5088365384..000000000000 --- a/sys-libs/kpmcore/kpmcore-4.0.0.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -FRAMEWORKS_MINIMAL="5.56" -inherit kde5 - -if [[ ${KDE_BUILD_TYPE} = release ]]; then - SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" - KEYWORDS="amd64 ~arm ~arm64 x86" -fi - -DESCRIPTION="Library for managing partitions" -HOMEPAGE="https://kde.org/applications/system/org.kde.partitionmanager" -LICENSE="GPL-3" -SLOT="5/8" -IUSE="" - -BDEPEND="virtual/pkgconfig" -DEPEND=" - $(add_frameworks_dep kauth) - $(add_frameworks_dep kcoreaddons) - $(add_frameworks_dep ki18n) - $(add_frameworks_dep kwidgetsaddons) - $(add_qt_dep qtdbus) - $(add_qt_dep qtgui) - $(add_qt_dep qtwidgets) - || ( - app-crypt/qca[botan] - app-crypt/qca[ssl] - ) - >=sys-apps/util-linux-2.33.2 -" -RDEPEND="${DEPEND}" - -# bug 689468, tests need polkit etc. -RESTRICT+=" test" diff --git a/sys-libs/kpmcore/kpmcore-4.0.1.ebuild b/sys-libs/kpmcore/kpmcore-4.0.1.ebuild index 9e74614109c4..9adf61fb6b44 100644 --- a/sys-libs/kpmcore/kpmcore-4.0.1.ebuild +++ b/sys-libs/kpmcore/kpmcore-4.0.1.ebuild @@ -7,7 +7,7 @@ inherit kde5 if [[ ${KDE_BUILD_TYPE} = release ]]; then SRC_URI="mirror://kde/stable/${PN}/${PV}/src/${P}.tar.xz" - KEYWORDS="~amd64 ~arm ~arm64 ~x86" + KEYWORDS="amd64 ~arm ~arm64 x86" fi DESCRIPTION="Library for managing partitions" diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest index fbc2cca0a670..83ce7e973e97 100644 --- a/sys-libs/libcxx/Manifest +++ b/sys-libs/libcxx/Manifest @@ -3,10 +3,10 @@ DIST libcxx-6.0.1.src.tar.xz 1552328 BLAKE2B 65a6addd04e530c2a72e8cba207282b9e9f DIST libcxx-7.1.0.src.tar.xz 1638448 BLAKE2B eca192e03f839f4323e3c37beba2e6daaf935d4e784e0bc835a4d2c3ce0790f5539bdca0466feafd668d7c6675b11b7fe14d9adb680c46fd7b28b42a3b423219 SHA512 925ce5093445f84dc17d5b1610e4297ef3606b254b7350c50f88ba042fcca62125ffd97d21cb612707d5e9511267634ca1779619199f95ce819e5f5c0c2b55d5 DIST libcxx-8.0.1.src.tar.xz 1739524 BLAKE2B 6e641cb6bda0de12c8408d3ab33f627389ac014aa65b3391c870aa96ffd347784e6b70b953bd1ee8eba56554e0f78a723ab77b9dba5f85e6219e2b95ca50c160 SHA512 75749d08b2b343c6f5f9aefb04be63e42f6d12efc51101d3647ed6f70c7a6d050afb3ab2f3636eae78cb523f5844de67b960a7a3145ed89ab0c7015deb14921e DIST libcxx-9.0.0.src.tar.xz 1814388 BLAKE2B 59b8967706d1f85b1c0d2b9932bd637aae7118ae461e2b31e1d17c9a2ee2e02ea0ea8b344074a9fc4b430b5c742b8ad30c10a0c44e5290528fdecd7571352879 SHA512 cbaca724c4f3e3a270dfd53aac50cbb920190fe55486b164d52e73845819dd22afb10c23f5875da59d433fd5b96a0f153208746117309ac1267a38fa56f4818e -EBUILD libcxx-10.0.0.9999.ebuild 6803 BLAKE2B 21e8cbd81082a98caad8f9232bf654f94a77b75f68b8f0aa4afa9e757c72e40c6f78fd43e943ff0ddd3d2f51d553c58935110fafd863eeef99b864aee97cd6f5 SHA512 ffca4505e93a04d62295cc2d82c423c6bb4c855148f5f45d744149ff4cb06ba2b89d4e9c18d7ad18f618f87de8affa16a86549cadb3562de3f9fecebab8013a8 +EBUILD libcxx-10.0.0.9999.ebuild 6529 BLAKE2B 25b1b79a7dd2be15557ae27ea2c66697937a18aa8f8223eab8cd84ce41d46fd168463c279ecbcefb1b62a1596af7876bd17f9953c73e5d23ac6c86a30edb45db SHA512 ca3492679b80dbc7e746709166c7831f3e8bc7be0cc2b7f674b1a0186851a5f3a7975a066035293b12333e673df6948e1043c24a4c14b27a43df049bfaf697ad EBUILD libcxx-6.0.1.ebuild 6734 BLAKE2B 5871a241d06ab0a449a2a375d3dd89d1b79f7d0712954061df88da89e350612ac00f7e9252ca8e93e9373fe45a66f89730d304865f713a75c6f1ab43565054f1 SHA512 af9fb74c62ecf1a5b188752ddc9fe0bf6ab3443f25704b024c6544b150cd33bcc92492e172119685d3fec2032689a4382dab6bb9f3662f4412323c4f6537c552 EBUILD libcxx-7.1.0.ebuild 6734 BLAKE2B ccf745bc3f3ea12361f877637970090b3588febd096fff2118359afc1664a2c5eb7e55e90372a5f5dc711b7a12310fcbe9fd2fd7f047b9bce117b8c99c7da393 SHA512 cea3065bf397c3d1615ac3d6a92910bc84ae439597c4972fdcd4eb41ce0fb1dd34dbdbd1cdfb95c0f46fb8a217f31f5b23da4c358204b349d48e1d433a3d9735 EBUILD libcxx-8.0.1.ebuild 6773 BLAKE2B b1f95dfaa74faf6ec4299c7241330d5047c1eabc69351f2bbeea296c41a3671c87e99689cda85c65aa29c513eca148321806719f15229b283b0c82a5f9bd1c93 SHA512 0060d986d79514416681cab707ed8075a7f8c461146457724acfbd04e269836827b4adbf791b1afb3a4b8fec13d44678c459861b749ce4001fd5c4a65b97121c -EBUILD libcxx-9.0.0.ebuild 6805 BLAKE2B c1f695c9c64d6f73bb05719f0018cf1621a956c9c88ac4224a8793e75c9d6fa0555ac3ccc0454b5a708b2bc36ee9cce10cc7757f6706e1fbfa8f071139af603e SHA512 e8fa03cc96bf92f981c47b7fd857d8cc085688eb8d6e376ef43e91298e6818e7da6ae19c96c9aad7bd1f4edf2ac9ce50c649134468c9070decde05e4b86f919a -EBUILD libcxx-9.0.1.9999.ebuild 6828 BLAKE2B 4a4b10af19556d92f66c9c482fff2466ea0665dc8a0d94ab9a148fa7c4ed564d812f806efbfd70100dd5f88f5fe29e63569f0728acfad86fee66bb3f6065c1e6 SHA512 dc978bd17e4242e857e6186e2bb9f4d6fdee1fb0bd8fb760e46ae33b542b67f0c992805295b8e0908c1cf9a04c309295531807c21b9f27581d7156aeba4183ae +EBUILD libcxx-9.0.0.ebuild 6552 BLAKE2B bf5b5360f86e4673abaf6af0de2b111ba90b205538a8ad22ff1f97c0be1f4c1c145f9863b74a0a93513adfb3c7539a19f837cc6c5a1090c2e3db0b25ab8272d9 SHA512 344b64dbffa364b12f8f53fc76453d9566805f73b3322084aee7879b63e154a387c6d32a9205a81d7c828ee8c062c7bb10596e58f99ac0ee19392a76956033fe +EBUILD libcxx-9.0.1.9999.ebuild 6529 BLAKE2B 25b1b79a7dd2be15557ae27ea2c66697937a18aa8f8223eab8cd84ce41d46fd168463c279ecbcefb1b62a1596af7876bd17f9953c73e5d23ac6c86a30edb45db SHA512 ca3492679b80dbc7e746709166c7831f3e8bc7be0cc2b7f674b1a0186851a5f3a7975a066035293b12333e673df6948e1043c24a4c14b27a43df049bfaf697ad MISC metadata.xml 751 BLAKE2B cc513b45c7283d41728236781558b47c535885612a93bcae2a41be20531bab0e01c159e918670c91ce7b4addb0390d5996ea735fc5856b61af7cf28a9b6286a9 SHA512 3620f5415cc80bc99f16eaaf98a712f1288895bdf1e98898103d680304930db89c3b8b55ca3f4d20d4738fc3aa3e314b81c9989971b23d7f66e2137095a35d4d diff --git a/sys-libs/libcxx/libcxx-10.0.0.9999.ebuild b/sys-libs/libcxx/libcxx-10.0.0.9999.ebuild index 83d8eeaa8c40..f5f67053d776 100644 --- a/sys-libs/libcxx/libcxx-10.0.0.9999.ebuild +++ b/sys-libs/libcxx/libcxx-10.0.0.9999.ebuild @@ -3,21 +3,14 @@ EAPI=7 -# Ninja provides better scalability and cleaner verbose output, and is used -# throughout all LLVM projects. -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-multilib git-r3 llvm multiprocessing python-any-r1 \ +inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \ toolchain-funcs DESCRIPTION="New implementation of the C++ standard library, targeting C++11" HOMEPAGE="https://libcxx.llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/libcxx.git - https://github.com/llvm-mirror/libcxx.git" +LLVM_COMPONENTS=( libcxx ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" diff --git a/sys-libs/libcxx/libcxx-9.0.0.ebuild b/sys-libs/libcxx/libcxx-9.0.0.ebuild index a4e2b51d8abe..76ae63ba35ad 100644 --- a/sys-libs/libcxx/libcxx-9.0.0.ebuild +++ b/sys-libs/libcxx/libcxx-9.0.0.ebuild @@ -3,21 +3,14 @@ EAPI=7 -# Ninja provides better scalability and cleaner verbose output, and is used -# throughout all LLVM projects. -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-multilib llvm multiprocessing python-any-r1 \ +inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \ toolchain-funcs -MY_P=${P}.src DESCRIPTION="New implementation of the C++ standard library, targeting C++11" HOMEPAGE="https://libcxx.llvm.org/" -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz" -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( libcxx ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" diff --git a/sys-libs/libcxx/libcxx-9.0.1.9999.ebuild b/sys-libs/libcxx/libcxx-9.0.1.9999.ebuild index 5a84e2f5f998..f5f67053d776 100644 --- a/sys-libs/libcxx/libcxx-9.0.1.9999.ebuild +++ b/sys-libs/libcxx/libcxx-9.0.1.9999.ebuild @@ -3,22 +3,14 @@ EAPI=7 -# Ninja provides better scalability and cleaner verbose output, and is used -# throughout all LLVM projects. -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-multilib git-r3 llvm multiprocessing python-any-r1 \ +inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 \ toolchain-funcs DESCRIPTION="New implementation of the C++ standard library, targeting C++11" HOMEPAGE="https://libcxx.llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/libcxx.git - https://github.com/llvm-mirror/libcxx.git" -EGIT_BRANCH="release_90" +LLVM_COMPONENTS=( libcxx ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest index e04be32d42f6..0fa2d43fe006 100644 --- a/sys-libs/libcxxabi/Manifest +++ b/sys-libs/libcxxabi/Manifest @@ -6,10 +6,10 @@ DIST libcxxabi-6.0.1.src.tar.xz 528356 BLAKE2B b301b750b2928864d3fc51e66cf91aab6 DIST libcxxabi-7.1.0.src.tar.xz 535180 BLAKE2B aa5952e3ca80f7ce2a0a79f3eaf3852234e23a8445a2539374bedb188aba7d973763a6c0d7cc7700070d942555250f87c3c9efb504bb731985be033d47b79b44 SHA512 629ef641ab5aba28ea7171efbad806f1f0464eee2d04f8903014a4f82c03f2c6513defbbe5489b2c6fd624270fe8efbad97a40e56958f8f38a4f5516a16dd102 DIST libcxxabi-8.0.1.src.tar.xz 538356 BLAKE2B 52328c5890c9b9271877b953be30cc39be4758101e6b91ee45f06c81e960089523e80b83eb5c354336e4e0a140f7554640acf7b2d4fa619113f705108a314418 SHA512 577cfcb04ebb29ee84d35ed31aa8fecb28fc74b07ef7ff298f0fe2d440f823def73e092359c41d8d8600e6df18f55224ed89674d403c5ae56a7d7973487b8734 DIST libcxxabi-9.0.0.src.tar.xz 552088 BLAKE2B 1b8f2bab00437a223f613cbecd9171f1bc88d0ec2d6096776d0295333c0176ddbe13178d433bed2dc70821b905152fcd30b228ae1dbd3e8846f3b92e7630db7e SHA512 261f32f61814728ce61c830c80192a55e1ba03c50f49712e208052444ac3acc6d7efcbd7b76a505292f9233aad23b00180aca4e72326ae1244385b39f226e625 -EBUILD libcxxabi-10.0.0.9999.ebuild 3345 BLAKE2B 8b4b5f91395ee60cf13cc42445a3e2ceaa5a4a871537334ec4c22e9f09fedb76ea34e6a48a7da1565f28f7cb9468cbc130f3b9767778ddf69b7991f983cf3c72 SHA512 e4c09e3a7e3d3ba33c27da7bd9a55e46998f3699a26ce9fb5490d8268b010e7ce85fdbe9d74225e9d362a76c875f2a6ce72cb4f5af1f4ddc923128d0da342748 +EBUILD libcxxabi-10.0.0.9999.ebuild 2984 BLAKE2B 2d5e19d65c798004a761167c15008399bc02641abe5899178ae430a7c141867586ced56044873744ef681b259ecb4f220195b56335992b34ce3be21d62d5ebd8 SHA512 b647d0ff00030c45fc01f8194d6a01a8800b1f165deb9e336d541060b7fabc6ae2962aa923d1f79db886c6c2bb8e82a30113a3c5da550028aefe793da3a17b5e EBUILD libcxxabi-6.0.1.ebuild 3160 BLAKE2B f71f407049fde2c3310ffd6626e19398abef0d5d521b1e88ac7139dc45a44e8a8ef67bceddbbbc3e653bf8dd824cd1e429be4e4de4805384b27207b26a3d6299 SHA512 4ff855c703b50eb2165cc9b0942a5de556ea3fd07a9a56b468d72df113473d3ec249ed4887e7b353138dc218a767e299fec9dd43650e1794e39a4455c8f0f68d EBUILD libcxxabi-7.1.0.ebuild 3160 BLAKE2B 5b90f5ce5637b75316cc992dd50105c87e7e55c8bd608a5d0280556ca14e57b2be47d5a81bbef0be37c8ace675887bdd4e44029e8efb8cd4f7a69b7eb6eef488 SHA512 8a03888a55c60959802824e54c78bdc9b8e74501bdd8b5a47bbc619290e03e8815658e5f33f9fdc9befc66f9fc36ff5ac2d36008824e3800f76b299508e706e0 EBUILD libcxxabi-8.0.1.ebuild 3226 BLAKE2B 9804f1976cd7e605cf60a07e69c66f97795bebf66779fb69fe500cb6f4693e63d799fdb57991b2b65bde309e72e2e6055c3e88fd1ebf0be725982a253faf10b7 SHA512 42ccc6ccfc69c95dd465542d90a6a6bc0558703fcf2b5b1acb5c828728416cddbd5af925552b231c890af8c89533073a3f13d87da9c1401cf8904bb4dc5e72de -EBUILD libcxxabi-9.0.0.ebuild 3240 BLAKE2B a8dfb09b9bf64e1859253df979bc93d5e2e8bc18a42535eff27199b30cf96aa0df8058b71228eaf6ee3005851add1195c1b90215e7c39f0e36fb3b06237de49f SHA512 edc9a0fa432c26492f8c9739933f4d20aa9d95833b5abdfb260cb8583351d91e8aa1da96563a7e2b0b4e2033696a5700a07605bb90b999657fdfa17a85eb8f5f -EBUILD libcxxabi-9.0.1.9999.ebuild 3370 BLAKE2B c4801a06980d20f44eafbd27972f6e6bf2fa9cac94ada72adfb0b0cfe4d20b2ec00962b60515430b59e7e0f889a5d4f5e95031755a465805bbe4bd11156c1f55 SHA512 531f690ce002740d7dfb81f6922e606990120d65c24734f44960d7d8e15b647ffb0edb82d507e076c6fad89ebc86375d99c6515381cff3cc89fdc7942ab198aa +EBUILD libcxxabi-9.0.0.ebuild 3007 BLAKE2B 7aa0ad17a02b26f548f6a4cd6e39b2dbfa3c298f76b5ba0a708de4b130e265a25e2476c21fb30c9f427065fb259029dc53e4bf8d22a730a61f793870cc5d1038 SHA512 32411ec0cb1722f4e09787e22b08b40334fdad52f5da7ec6c918934269c211b76936fa7d5c664f572f874fe022c907e51dcbb9edf9a62f65e773e2828c2bc578 +EBUILD libcxxabi-9.0.1.9999.ebuild 2984 BLAKE2B 2d5e19d65c798004a761167c15008399bc02641abe5899178ae430a7c141867586ced56044873744ef681b259ecb4f220195b56335992b34ce3be21d62d5ebd8 SHA512 b647d0ff00030c45fc01f8194d6a01a8800b1f165deb9e336d541060b7fabc6ae2962aa923d1f79db886c6c2bb8e82a30113a3c5da550028aefe793da3a17b5e MISC metadata.xml 350 BLAKE2B 67b70b8d7292327882a845b76667ce24fee728cd84f27ed7e329bc7963631cba4c28bafce5e6a5fefb4ba1df5c7fd572b3b0d7a2b31ef649496f2f991b691bff SHA512 317dd7b59a711dd0461b5369f7e31ea196882b018e047e1dbae8077274d06cb68542c8762efb852cce0b8021bedea69c19aa0c124b9414a36cf1a9c00e0b9703 diff --git a/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild index edc18f6fea90..df108a4e0237 100644 --- a/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild +++ b/sys-libs/libcxxabi/libcxxabi-10.0.0.9999.ebuild @@ -3,18 +3,14 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-multilib git-r3 llvm multiprocessing python-any-r1 +inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="Low level support for a standard C++ library" HOMEPAGE="https://libcxxabi.llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/libcxxabi.git - https://github.com/llvm-mirror/libcxxabi.git" +# libcxx is needed uncondtionally for the headers +LLVM_COMPONENTS=( libcxx{abi,} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" @@ -48,17 +44,6 @@ pkg_setup() { use test && python-any-r1_pkg_setup } -src_unpack() { - # we need the headers - git-r3_fetch "https://git.llvm.org/git/libcxx.git - https://github.com/llvm-mirror/libcxx.git" - git-r3_fetch - - git-r3_checkout https://llvm.org/git/libcxx.git \ - "${WORKDIR}"/libcxx '' - git-r3_checkout -} - multilib_src_configure() { local libdir=$(get_libdir) local mycmakeargs=( diff --git a/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild b/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild index 61f520b98588..eb2960357792 100644 --- a/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild +++ b/sys-libs/libcxxabi/libcxxabi-9.0.0.ebuild @@ -3,21 +3,14 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-multilib llvm multiprocessing python-any-r1 - -MY_P=${P/_/}.src -LIBCXX_P=libcxx-${PV/_/}.src +inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="Low level support for a standard C++ library" HOMEPAGE="https://libcxxabi.llvm.org/" -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz - https://releases.llvm.org/${PV}/${LIBCXX_P}.tar.xz" -S=${WORKDIR}/${MY_P} +# libcxx is needed uncondtionally for the headers +LLVM_COMPONENTS=( libcxx{abi,} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" @@ -51,11 +44,6 @@ pkg_setup() { use test && python-any-r1_pkg_setup } -src_unpack() { - default - mv "${LIBCXX_P}" libcxx || die -} - multilib_src_configure() { local libdir=$(get_libdir) local mycmakeargs=( diff --git a/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild b/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild index 70fcb998c05d..df108a4e0237 100644 --- a/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild +++ b/sys-libs/libcxxabi/libcxxabi-9.0.1.9999.ebuild @@ -3,19 +3,14 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-multilib git-r3 llvm multiprocessing python-any-r1 +inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="Low level support for a standard C++ library" HOMEPAGE="https://libcxxabi.llvm.org/" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/libcxxabi.git - https://github.com/llvm-mirror/libcxxabi.git" -EGIT_BRANCH="release_90" +# libcxx is needed uncondtionally for the headers +LLVM_COMPONENTS=( libcxx{abi,} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" @@ -49,17 +44,6 @@ pkg_setup() { use test && python-any-r1_pkg_setup } -src_unpack() { - # we need the headers - git-r3_fetch "https://git.llvm.org/git/libcxx.git - https://github.com/llvm-mirror/libcxx.git" - git-r3_fetch - - git-r3_checkout https://llvm.org/git/libcxx.git \ - "${WORKDIR}"/libcxx '' - git-r3_checkout -} - multilib_src_configure() { local libdir=$(get_libdir) local mycmakeargs=( diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest index 0eb0f664c5ee..18868059cd4a 100644 --- a/sys-libs/libomp/Manifest +++ b/sys-libs/libomp/Manifest @@ -2,10 +2,10 @@ DIST openmp-6.0.1.src.tar.xz 2048320 BLAKE2B 08b3a7051c985903f78331f55a1c6e92839 DIST openmp-7.1.0.src.tar.xz 909320 BLAKE2B 7a5fd4374992b7c440ff27917c0af6a2ec64aaeb2fda645f75b5affd4981e3ceef7f15cba61c37934c5b35be543af315cc4bff2937545fbf5eaa6593f1aa8b83 SHA512 57f18beede401c1c39766e13a03b52083a0f7b437758069f66b73d6d1388dc51e48c34b0a7ecd3552244fd35e2db57388642588febef413c161f5c5411ab1e5d DIST openmp-8.0.1.src.tar.xz 933320 BLAKE2B 02a7bf70cd3a217845ef1c5a35e0d7dbfbb39069a9029d462c797b5ddf2240fd627dee55856146ca4bb81622a41f31ecd11e0ed66baf3b7d99447087271991b0 SHA512 9ded785c8129e7b3a70b54f07c4dde529456edcc94904ad77fc578cf7f096cfa3ff2279959d7f7f1db51571e11c53375f33b597c7f36ce6dc6b512c44ced8026 DIST openmp-9.0.0.src.tar.xz 939036 BLAKE2B 3eee75f05f65a294db6e65c29b8871bb2dd4e0ee753447d2356010ca1a114f3ad2dc54c2f39ad7ffcebd510d912e96f54a2884ecdc7f50864f909184c707e7a5 SHA512 0be0e95026db574ad75d4a9d2fe4234056d16dc4fe24760f3e9e39f3e10099c7eea4ff76d7236e5a570809111fa18fa017cb679391c16a995ba0c194eb9391d4 -EBUILD libomp-10.0.0.9999.ebuild 3155 BLAKE2B 69fed2b801866cb8025f1dcb450bfac5f4c7a8b70ae4454712581515ccedd8ea997cc89eec1201035e3817c53931d2cca97305ea1287980e38f509a02980502f SHA512 da65a9cdaae4969510462a3321bcdf29e8548bc00dd53e489509d5518842162897113f291f28b9a4bac511df4eb72eade4183d9ed9e7521ad14f611e7d979489 +EBUILD libomp-10.0.0.9999.ebuild 2989 BLAKE2B 6d8b584d8f2b533ddd2d42c82957aaf749df591c57bf518e2cd0bcb900acd5631097099f172d6a95c3b2f8714be7240f6f641df4c8a77675cd7a442746f3e498 SHA512 efd8c7cb3368590b5171c4ee0308bff23b1eac6160bddeadc9ccdff139628425c93d87a679cf51e1c4c46cdad857a7602e4b02b654486281fab4d8ec3a41a488 EBUILD libomp-6.0.1-r1.ebuild 3249 BLAKE2B c0128b595df288ca5d233d0de9f3dd1c6d60be6796530e3944d3cfe8b6aa983ba634714a0f1b8cdd5fd51a719c0547a34ab788c3fb2456d84b055d3b58c38f7b SHA512 c6f934694852f6c4ac474d04ab3b33204d5094c2a42f8935f6744e74041e2cfb6f9746b53dadadfeb1c5892efdf97c8d33865f72a9e4baa048984470a3efbcef EBUILD libomp-7.1.0.ebuild 3250 BLAKE2B c01271dec02e6315408cf8751580a870f0a8a08f8a7d7801efd6780049676742acc10a284ab21eff5d178570f59995cc0c388adf7d4cbafe5a07324c63de7402 SHA512 463b486bdb6fbd4b85d0935905e7b80d7c28a3279159a15182ecc364aa56eff268ba6e1dd4c4e38d90c3229b057dcbc6037419442e9aae137afd71e69816bd45 EBUILD libomp-8.0.1.ebuild 3280 BLAKE2B ad34cfd8d5043c0fa706e292f78c5458c659b26ce260c4a049a9e8ecc88f3c268d0b4849c269a41e95255c8ca72f8db0b1f57eb342a4af0980dd34bce77c3c69 SHA512 fbe46c483dcf27d5598058b6f6394811d1e2fd2ce73cb3c34bf6519d2de0ba274562cd4d1caaae3737b70a6188c36079547518ec3a47afadf69c4696d9ec5634 -EBUILD libomp-9.0.0.ebuild 3196 BLAKE2B 75685b504c261bd35e6f4fb949be3d1bdd7e4e07261c9c25a56ce545232c73125fab53d464aa4fdfb41e22136178fc045b589e34d458d6b40810891da823217f SHA512 ea159d7eee24eb8c44fd4e5bd359e129db6089120b92a3ae99892e98d4ae879c01defffe509de227c3dadef5c2f722c46cac3d2bc3e06292ef601ef431cdde9e -EBUILD libomp-9.0.1.9999.ebuild 3180 BLAKE2B be06f2136d959c7a4f119b2197d3fc3e5039b1f5a02decab3602c3dba659f9427cf7f778f66f4cb1db8e6c6f795b22a16a08671f7e79a82887a3697440399deb SHA512 fb9766b7223f5104d427b97804801c34f735ee94d7b2eee27ffb9e9f7a60aeb9f61fa77df698435c8fbc0661a7f038a4e81f5acc937f6e317d886d02017f03b1 +EBUILD libomp-9.0.0.ebuild 3043 BLAKE2B 576e5a7be336b136e9e1e9d94c84e7b58a044ca42202fe0354bdc8894787a361759e65f7210e8c62e7bd9d00191d1030561c3b0ccfb3e28595ba1f805bf1ac93 SHA512 8aa473a0d22da3ae055a534dfcc87509e8810ba98ad6deec0828fd38e3c3752af7982efd7a9c8cf5653becba1bc2ba911b230eadf93da01dbe97abc499261b2d +EBUILD libomp-9.0.1.9999.ebuild 2989 BLAKE2B 6d8b584d8f2b533ddd2d42c82957aaf749df591c57bf518e2cd0bcb900acd5631097099f172d6a95c3b2f8714be7240f6f641df4c8a77675cd7a442746f3e498 SHA512 efd8c7cb3368590b5171c4ee0308bff23b1eac6160bddeadc9ccdff139628425c93d87a679cf51e1c4c46cdad857a7602e4b02b654486281fab4d8ec3a41a488 MISC metadata.xml 825 BLAKE2B 07802144018f2f74b0927b53a346f99cbc7e36dbf501bb8dfc786f8d549c10eb688afafb1759f13d4d56d10f1bcae67dfa86cc2047cc39a9655a09a22e9a4260 SHA512 de43d5be94a5ea1cdfd3ae747d55b50d5d6ee577743f55d006d585d2d5acd5b3100845486ac415685f07361cd9985bae9347fff9c65417d198c49a61b4f6ba5e diff --git a/sys-libs/libomp/libomp-10.0.0.9999.ebuild b/sys-libs/libomp/libomp-10.0.0.9999.ebuild index 107506fa8c8a..5f49236cbe1a 100644 --- a/sys-libs/libomp/libomp-10.0.0.9999.ebuild +++ b/sys-libs/libomp/libomp-10.0.0.9999.ebuild @@ -3,18 +3,13 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-multilib git-r3 linux-info multiprocessing python-any-r1 +inherit cmake-multilib linux-info llvm.org multiprocessing python-any-r1 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" HOMEPAGE="https://openmp.llvm.org" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/openmp.git - https://github.com/llvm-mirror/openmp.git" +LLVM_COMPONENTS=( openmp ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" diff --git a/sys-libs/libomp/libomp-9.0.0.ebuild b/sys-libs/libomp/libomp-9.0.0.ebuild index f182d3947149..50704d497432 100644 --- a/sys-libs/libomp/libomp-9.0.0.ebuild +++ b/sys-libs/libomp/libomp-9.0.0.ebuild @@ -3,18 +3,13 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) +inherit cmake-multilib linux-info llvm.org multiprocessing python-any-r1 -inherit cmake-multilib linux-info multiprocessing python-any-r1 - -MY_P=openmp-${PV}.src DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" HOMEPAGE="https://openmp.llvm.org" -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz" -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( openmp ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" diff --git a/sys-libs/libomp/libomp-9.0.1.9999.ebuild b/sys-libs/libomp/libomp-9.0.1.9999.ebuild index 024defb5b3be..5f49236cbe1a 100644 --- a/sys-libs/libomp/libomp-9.0.1.9999.ebuild +++ b/sys-libs/libomp/libomp-9.0.1.9999.ebuild @@ -3,19 +3,13 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) - -inherit cmake-multilib git-r3 linux-info multiprocessing python-any-r1 +inherit cmake-multilib linux-info llvm.org multiprocessing python-any-r1 DESCRIPTION="OpenMP runtime library for LLVM/clang compiler" HOMEPAGE="https://openmp.llvm.org" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/openmp.git - https://github.com/llvm-mirror/openmp.git" -EGIT_BRANCH="release_90" +LLVM_COMPONENTS=( openmp ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" diff --git a/sys-libs/libstdc++-v3-bin/Manifest b/sys-libs/libstdc++-v3-bin/Manifest deleted file mode 100644 index 23ae5483fe71..000000000000 --- a/sys-libs/libstdc++-v3-bin/Manifest +++ /dev/null @@ -1,4 +0,0 @@ -DIST libstdc++-v3-bin-ia64-3.3.6.tbz2 325449 BLAKE2B e82faae559cb136f6c795363f6cdd5c2aa96dbd46f9a3dccccdb724d2a62f411c91041869bb891033d22df24cca11d9d88965f7ff4808cef320ba53093478ba1 SHA512 c20dba994af3d5e0a2c85c9599c7ccc0260a105330ff6337030928c81e8300fe3e84925fe815d3bf42d050402b69490f6762fbd8ff9225a4621fa8e693c7b63a -DIST libstdc++-v3-bin-ppc64-3.3.6.tbz2 301670 BLAKE2B d5d72be6b8e92714c566a9a2b376c7a42f2efc32243fe58ee41e6e46af24cbad260cc45f3f0b94fc77abcc120818c9cc4c11087ad5004caf8d98a90d946c2e01 SHA512 167d9863e6c54a6e85b2fd36f46f8c5269679c47f1ed50816718c502836bdefdc52949295a223b2870935bc1aca23a2c9fb967d51a02ba278d269b70cc82a8f6 -EBUILD libstdc++-v3-bin-3.3.6.ebuild 561 BLAKE2B 60c1f2b42159991bfa709313313a58e90379c844f7c354e40770fe53f66a722ba6c0ade8e0259863977e57a94e6487590b47f79998d7f1e5a3aa9419d0b79e17 SHA512 c23abbffec10bccae93b9779b412da5d781fda6207422963c5ba8aa56eac97547c26099ed17e943c08afceefb5d285be802f3626e52326ff306728a315caad59 -MISC metadata.xml 259 BLAKE2B 04ac80e5edbb7a409e8b0c9d856a3af1bcc59c70211fe4b10938eabce6f9f7fbf37ef80fdc3c53a86071d1d416a2159e8292d89b1ffe83213383137032df6f6e SHA512 ca71b1781806d20022c238e5b5d10f9154c78e0fa51f2603de34c48ecbe4cbc2c3190cf046526840546743644c691ee7fe51e31a4617b01bb7602dde803c1538 diff --git a/sys-libs/libstdc++-v3-bin/libstdc++-v3-bin-3.3.6.ebuild b/sys-libs/libstdc++-v3-bin/libstdc++-v3-bin-3.3.6.ebuild deleted file mode 100644 index 61c45ae44647..000000000000 --- a/sys-libs/libstdc++-v3-bin/libstdc++-v3-bin-3.3.6.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=0 - -DESCRIPTION="Compatibility package for running binaries linked against a - - - - ppc@gentoo.org - Gentoo Linux PowerPC Development - - diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest index e6973b840882..1514a1673399 100644 --- a/sys-libs/llvm-libunwind/Manifest +++ b/sys-libs/llvm-libunwind/Manifest @@ -10,10 +10,10 @@ DIST libunwind-6.0.1.src.tar.xz 77036 BLAKE2B b6c293285896c8ff1f64bb56eee5a88b10 DIST libunwind-7.1.0.src.tar.xz 79780 BLAKE2B 8f15dcf4a9c8cb45f17c72bf058eed13a6cd52842ee8630781c3104be77d9a868e241eafd34a31b23aeff18dc49743dd5a566ce4cb866a170f1d09899584e2dd SHA512 8ebfeb821013167e866986a2f9cc6459e43d82f73560a15ee7e0d604a974e1c656f824c9f7ccb47da4b4830ad9a99c663961bdf7642cd105e666b8a8fdf7d03c DIST libunwind-8.0.1.src.tar.xz 87188 BLAKE2B 26f4d8ffbc8eb316e4e623280d6fe493e4c5c29489b90633c8215fe91349de7f7f0cfbfe8991ace11656d3782e13c7208b4a4adc04691746b4140187fba40043 SHA512 c115582ca879e215b97d24e4aa80696796383e79856cf26e40b4ddd6b255d598f9fa9867b30f0fd1691be770779835ac1d4b9a5e4a71424b18499b79ea37d060 DIST libunwind-9.0.0.src.tar.xz 90372 BLAKE2B 2ac6dafa53e030dd63a7e0eb4b9ee2c665a5aa64b95324d04604efce7fce6f101fc3685723e39ae0a0819bd16c9e4e366d28dfedae6748423c74f79e6a8b38b5 SHA512 55b44439b76638a7c5ea25dd3713a3f6a2d54bcfb7bf34d3388753f0d25be2e843b5f05dc1c0052d7a9cd5a141c6818f4da42bc9174a16d89e819ea262ad5706 -EBUILD llvm-libunwind-10.0.0.9999.ebuild 3929 BLAKE2B a92ae89cd9516548251e40503e9cf1b31e99860d40b44f74a4ebd6edb4ad6ab7da88e958747182f256553e99e6fc9ba44babe8cad45dee8d545d078234c86110 SHA512 44eb3c311abf4fc94a622631a0377c8fd41c01a5eff5302b68936240cc44aae0bd2832a4c011fd7c1c94ad8e7f8b123ca89f549a72188ec8b99e2613a33151cb +EBUILD llvm-libunwind-10.0.0.9999.ebuild 3345 BLAKE2B c179ff24533af6c8f51bb8993b3a626f0a1ba3f1e4e3d69202a8ad8196747fe3e2f11b0f4d591e7999a4dd10dab3080ea0a35e22818e66fb5112131967f594ba SHA512 fae567cdf445f59a3956ce7639317c2eff9fccbcf88d4e2de5920082f8cd4321a85311f64f37875ceff18772a53f90ab9e5dc0fb6c4dc930a2214ec4588edb34 EBUILD llvm-libunwind-6.0.1.ebuild 3726 BLAKE2B eff574b04142b578a05b50aa9834a2b494361001e99a729c648cb34b72293d32703cc0d7d918e628a5746ba3d1e18efb063b198677ec7320e7564fce6ce137f4 SHA512 465c752552f5e28e9c995922c26fc9e4e3c13b7fa612c24a894a9580473924e0f90cd34a13f914af7a426e0c317f9c1104c2baf01bc202a4872a3a178ce1b3ce EBUILD llvm-libunwind-7.1.0.ebuild 3727 BLAKE2B 433bf5d3eebf17face5bf31030c5079ccb8cc99cf4a9e37fcfb9699b43e75702f3a6cd462c8cd8654666f76efb9f87960b171b5acf2b61b798fd7869f3bdd008 SHA512 5c5fc9dce356d1534089e724b898ef2f76cf8963fe4fa66bdba37255c609ca6f3e0dca3f50e746e6d8c2da9fc187975bf1f6345816f90dc3f65b02a81dfa1223 EBUILD llvm-libunwind-8.0.1.ebuild 3825 BLAKE2B 6b967ef98ef57ba33f91acd00c692a0856139ce86f743b41c4c863680256b7f74f690cd18fdc23202b784c41cf6bccebb812a69ceded3fe41285f17667ed3606 SHA512 db2d412d9238f0e4aa686088b9195c57170562ebcf69a226bdc28fbd56196b8f39b900e87d5b4daf78c8a3f93f0d84bc14d4f28b5ce1df9307b29dfda7b19751 -EBUILD llvm-libunwind-9.0.0.ebuild 3793 BLAKE2B c2ca1210f696425d0ec738627586257ffe02db1f5995926e84f1272310994bc83a477e840fe17df0aee9ff85e832d32166ef3e234b313f5590f86b213840c8df SHA512 970cd8f2674f48a98fc60ff3ccb27ec56e202bea0d8b64c8b0a4594b49691213cc1cb4ebe406c01d4d76559959721c86de8136315d0f181102f9878829391340 -EBUILD llvm-libunwind-9.0.1.9999.ebuild 3954 BLAKE2B 1972aae13ad8154f0d2962b5980731b50d63bc84cbd5ac8a0e38590a36a0a1b9ad426b13a7e9433a634d1260e3c9752d9eb1bdc2d06c8a89319be370cdbbcedd SHA512 31be0e16f14579a50a0c0b59786e17835243f206702c6cbaa054343fb35087f5ed382148529de78cb9718031be729c850da7d717d5994b51220f29897f45a5ca +EBUILD llvm-libunwind-9.0.0.ebuild 3368 BLAKE2B 496f8bd1e62d130af0b25d6e2166ea9b42cfd69d664d4aa3feff4d44a8d3654b6e7980c3d93cef310b9680268091af29ac3c04a0ef0d5627170dd051aa8fc3a2 SHA512 6efcc00c6a6752228c9474322f9d57bd5b5a2e92c5a02e10de91ba3c1604a7f51467590d34e286967a38b82d1d0995af415f17550a7dfe6bd9bc0b079a957cd8 +EBUILD llvm-libunwind-9.0.1.9999.ebuild 3345 BLAKE2B c179ff24533af6c8f51bb8993b3a626f0a1ba3f1e4e3d69202a8ad8196747fe3e2f11b0f4d591e7999a4dd10dab3080ea0a35e22818e66fb5112131967f594ba SHA512 fae567cdf445f59a3956ce7639317c2eff9fccbcf88d4e2de5920082f8cd4321a85311f64f37875ceff18772a53f90ab9e5dc0fb6c4dc930a2214ec4588edb34 MISC metadata.xml 302 BLAKE2B 1cdee7813ed9a3766b2eddccd14f9e0576ba5cc7f812d7af4f35c8c2e5991790f3800c6473c37da90d72804832fd9af969a2e3bf7aa625f0d3a32da1dbcefacf SHA512 3afaef82e6a495a81e221524ae7604dc170ef5c103333728674faf0417c45ba7996118c10466eaa24f8feef9ed8f0fc60d535a5195462317d61c61a531c8a285 diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-10.0.0.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-10.0.0.9999.ebuild index 4f882571235f..29ee78399316 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-10.0.0.9999.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-10.0.0.9999.ebuild @@ -3,17 +3,14 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-multilib git-r3 llvm multiprocessing python-any-r1 +inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="C++ runtime stack unwinder from LLVM" HOMEPAGE="https://github.com/llvm-mirror/libunwind" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/libunwind.git - https://github.com/llvm-mirror/libunwind.git" +LLVM_COMPONENTS=( libunwind ) +LLVM_TEST_COMPONENTS=( libcxx{,abi} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" @@ -40,24 +37,6 @@ pkg_setup() { use test && python-any-r1_pkg_setup } -src_unpack() { - if use test; then - git-r3_fetch "https://git.llvm.org/git/libcxx.git - https://github.com/llvm-mirror/libcxx.git" - git-r3_fetch "https://git.llvm.org/git/libcxxabi.git - https://github.com/llvm-mirror/libcxxabi.git" - fi - git-r3_fetch - - if use test; then - git-r3_checkout https://llvm.org/git/libcxx.git \ - "${WORKDIR}"/libcxx - git-r3_checkout https://llvm.org/git/libcxxabi.git \ - "${WORKDIR}"/libcxxabi - fi - git-r3_checkout -} - multilib_src_configure() { local libdir=$(get_libdir) @@ -80,7 +59,7 @@ multilib_src_configure() { mycmakeargs+=( -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}" - -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}"/libcxx + -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx" ) fi diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-9.0.0.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-9.0.0.ebuild index 68e91d4eeac9..373f7d8c03ae 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-9.0.0.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-9.0.0.ebuild @@ -3,23 +3,14 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-multilib llvm multiprocessing python-any-r1 - -MY_P=libunwind-${PV/_/}.src -LIBCXX_P=libcxx-${PV/_/}.src -LIBCXXABI_P=libcxxabi-${PV/_/}.src +inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="C++ runtime stack unwinder from LLVM" HOMEPAGE="https://github.com/llvm-mirror/libunwind" -SRC_URI="https://releases.llvm.org/${PV}/${MY_P}.tar.xz - test? ( - https://releases.llvm.org/${PV}/${LIBCXX_P}.tar.xz - https://releases.llvm.org/${PV}/${LIBCXXABI_P}.tar.xz )" -S=${WORKDIR}/${MY_P} +LLVM_COMPONENTS=( libunwind ) +LLVM_TEST_COMPONENTS=( libcxx{,abi} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" @@ -46,15 +37,6 @@ pkg_setup() { use test && python-any-r1_pkg_setup } -src_unpack() { - default - - if use test; then - mv "${LIBCXX_P}" libcxx || die - mv "${LIBCXXABI_P}" libcxxabi || die - fi -} - multilib_src_configure() { local libdir=$(get_libdir) @@ -77,7 +59,7 @@ multilib_src_configure() { mycmakeargs+=( -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}" - -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}"/libcxx + -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx" ) fi diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-9.0.1.9999.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-9.0.1.9999.ebuild index 1e3f2baa716b..29ee78399316 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-9.0.1.9999.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-9.0.1.9999.ebuild @@ -3,18 +3,14 @@ EAPI=7 -: ${CMAKE_MAKEFILE_GENERATOR:=ninja} -# (needed due to CMAKE_BUILD_TYPE != Gentoo) -CMAKE_MIN_VERSION=3.7.0-r1 PYTHON_COMPAT=( python{2_7,3_{5,6,7}} ) -inherit cmake-multilib git-r3 llvm multiprocessing python-any-r1 +inherit cmake-multilib llvm llvm.org multiprocessing python-any-r1 DESCRIPTION="C++ runtime stack unwinder from LLVM" HOMEPAGE="https://github.com/llvm-mirror/libunwind" -SRC_URI="" -EGIT_REPO_URI="https://git.llvm.org/git/libunwind.git - https://github.com/llvm-mirror/libunwind.git" -EGIT_BRANCH="release_90" +LLVM_COMPONENTS=( libunwind ) +LLVM_TEST_COMPONENTS=( libcxx{,abi} ) +llvm.org_set_globals LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" @@ -41,24 +37,6 @@ pkg_setup() { use test && python-any-r1_pkg_setup } -src_unpack() { - if use test; then - git-r3_fetch "https://git.llvm.org/git/libcxx.git - https://github.com/llvm-mirror/libcxx.git" - git-r3_fetch "https://git.llvm.org/git/libcxxabi.git - https://github.com/llvm-mirror/libcxxabi.git" - fi - git-r3_fetch - - if use test; then - git-r3_checkout https://llvm.org/git/libcxx.git \ - "${WORKDIR}"/libcxx - git-r3_checkout https://llvm.org/git/libcxxabi.git \ - "${WORKDIR}"/libcxxabi - fi - git-r3_checkout -} - multilib_src_configure() { local libdir=$(get_libdir) @@ -81,7 +59,7 @@ multilib_src_configure() { mycmakeargs+=( -DLLVM_EXTERNAL_LIT="${EPREFIX}/usr/bin/lit" -DLLVM_LIT_ARGS="-vv;-j;${jobs};--param=cxx_under_test=${clang_path}" - -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}"/libcxx + -DLIBUNWIND_LIBCXX_PATH="${WORKDIR}/libcxx" ) fi diff --git a/sys-libs/musl-nscd/Manifest b/sys-libs/musl-nscd/Manifest index 7cdcb94830c1..6587aa16dab6 100644 --- a/sys-libs/musl-nscd/Manifest +++ b/sys-libs/musl-nscd/Manifest @@ -1,5 +1,7 @@ AUX nscd.initd 1415 BLAKE2B 4f9ef4c36addc71bb42ba1d8e1fa8657efd4b8d52ac69f8c1baad13a9f9251c225f4d45cd35ab4838a45ae25b146af765ab2f99eafd68475cc5cd25129e5011c SHA512 e0d5c6d7ea19043518755518adea00e9155902ad6c4095ecc653582f6c0b9f056eb64dd32814f799ae2ff0d51b8709166360a13a14126de015706d30b84af6ab AUX nscd.service 337 BLAKE2B 6b163465dd8db024652921892dc913da8dfc0984eec7ffce621229e48fa99dcedc3b5944844529190122c81f4884b6a6fe7836d37d2d812f34059c530856dec1 SHA512 2001100f3b054843c69b6fd2d38852c7c824282aa8998c25a3c0352db993705429d25c70d8ce6cb3579f836b7089644c520acac423ebd69cb1b36e94a77c5bea AUX nscd.tmpfilesd 111 BLAKE2B 4abb7220564e248fc7eeeced41077f186f42594facbfac9a4c0ff36209baac529c219ad6ead8d8aa53ab2b092002f1006a4479459b9e9a7c5a0294cb7d822100 SHA512 53b80b331e1a85d8ee16eb2ce547a7249e944926c3d1cdd4a47a5301a5c842ffc7ec1e3dc0a731542a8facf8261c1c57121802d01741aa89898a3476c09da340 -EBUILD musl-nscd-9999.ebuild 664 BLAKE2B ca11ffbc8dc8a5870fa95ed0a298408f1841f25564ea9f4f001acca10bdbd9f68a1854f101b4416e9828427a583784aca5b5b35f32d2136790c5b43405faeefd SHA512 a30eeab05e0cfe0427a59b40740b819cf236005f0cbbbca3e25990124d30040d141cc681e15947a47c6695e8ed8f9932a7ab72566cb6fd4d359ea941fcb0daf8 +DIST musl-nscd-1.0.2.tar.gz 44912 BLAKE2B 8a496c941232ba617b8468351cbbb780b1decc2c162210f939abb3baa430a5f5a79e21fcd3aadac2cbe62820452fc18001edc7ebc13cae7a6ab768353c45235f SHA512 45cd73f1e0eee7b32c3dcdfa96c0a11379f6208389b87fee97016af0ecb19e9e7d2a2f10e0df6e5ed8a6ad4bbbef70c01cd31ac3631fb1bcce6e69bf48843a3d +EBUILD musl-nscd-1.0.2.ebuild 925 BLAKE2B 4aac4a2b0403ea230752843bea7f91d7d31ee14f13e294aff2ea92171d6706cf2acffa07de6308d07541c8931e624824b0810c49a39d075ce067a2511625c70c SHA512 15831aefdeba51adb75c3b8e5db2a8b7bcdbabb55311723d47776dab16d0a26458fc74db9e79d81accc8eb6f4bc3affbb6189cee01e9d86df6a98c3e6d8b184c +EBUILD musl-nscd-9999.ebuild 925 BLAKE2B 4aac4a2b0403ea230752843bea7f91d7d31ee14f13e294aff2ea92171d6706cf2acffa07de6308d07541c8931e624824b0810c49a39d075ce067a2511625c70c SHA512 15831aefdeba51adb75c3b8e5db2a8b7bcdbabb55311723d47776dab16d0a26458fc74db9e79d81accc8eb6f4bc3affbb6189cee01e9d86df6a98c3e6d8b184c MISC metadata.xml 408 BLAKE2B 579dfe2bda31eb1fc83e098f2b3675ef14b9c62b62ed5cfc01989b22f8925a2fbb029bafcb29d12574faf39abd5611adf699e98266cb01e25324baf3adeb4e62 SHA512 e96f5818d7882c06ec6788eb7ee5caa504773d130cdc20d3f314c1787e655879490c8559b0366561ff5d209cfa9f31a10fc3f9985c522a78947870c2c8b5122f diff --git a/sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild b/sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild new file mode 100644 index 000000000000..b47444961d2f --- /dev/null +++ b/sys-libs/musl-nscd/musl-nscd-1.0.2.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit systemd + +DESCRIPTION="musl-nscd is an implementation of the NSCD protocol for the musl libc" +HOMEPAGE="https://github.com/pikhq/musl-nscd" + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/pikhq/musl-nscd" + EGIT_BRANCH=master +else + SRC_URI="https://github.com/pikhq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +LICENSE="MIT" +SLOT="0" +IUSE="minimal" + +src_prepare() { + eapply_user + + sed -i '/LDFLAGS_AUTO=-s/d' configure || die 'Cannot patch configure file' +} + +src_install() { + if use minimal; then + emake DESTDIR="${D}" install-headers + else + emake DESTDIR="${D}" install + + newinitd "${FILESDIR}"/nscd.initd nscd + systemd_dounit "${FILESDIR}"/nscd.service + systemd_newtmpfilesd "${FILESDIR}"/nscd.tmpfilesd nscd.conf + + dodoc README + fi +} diff --git a/sys-libs/musl-nscd/musl-nscd-9999.ebuild b/sys-libs/musl-nscd/musl-nscd-9999.ebuild index cdee80a89452..b47444961d2f 100644 --- a/sys-libs/musl-nscd/musl-nscd-9999.ebuild +++ b/sys-libs/musl-nscd/musl-nscd-9999.ebuild @@ -1,19 +1,32 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 -inherit git-r3 systemd +inherit systemd DESCRIPTION="musl-nscd is an implementation of the NSCD protocol for the musl libc" HOMEPAGE="https://github.com/pikhq/musl-nscd" -EGIT_REPO_URI="https://github.com/pikhq/musl-nscd" -EGIT_BRANCH=master + +if [[ ${PV} == "9999" ]] ; then + inherit git-r3 + EGIT_REPO_URI="https://github.com/pikhq/musl-nscd" + EGIT_BRANCH=master +else + SRC_URI="https://github.com/pikhq/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi LICENSE="MIT" SLOT="0" IUSE="minimal" +src_prepare() { + eapply_user + + sed -i '/LDFLAGS_AUTO=-s/d' configure || die 'Cannot patch configure file' +} + src_install() { if use minimal; then emake DESTDIR="${D}" install-headers diff --git a/sys-libs/musl/Manifest b/sys-libs/musl/Manifest index efc0ce06e987..b7bd5be5f545 100644 --- a/sys-libs/musl/Manifest +++ b/sys-libs/musl/Manifest @@ -5,7 +5,9 @@ DIST getent.c 9438 BLAKE2B dc20353583c10a001bd8fe8474f32b70254dc56da186d1cdbaf40 DIST iconv.c 2577 BLAKE2B 070ca87b30c90ab98c27d5faf7a2fcb64ff7c67ca212ee6072165b2146979c551f714954dbd465462a171837c59b6ea027e0206458a2df0f977e45f01be3ce48 SHA512 9d42d66fb1facce2b85dad919be5be819ee290bd26ca2db00982b2f8e055a0196290a008711cbe2b18ec9eee8d2270e3b3a4692c5a1b807013baa5c2b70a2bbf DIST musl-1.1.22.tar.gz 987296 BLAKE2B 0326751e1d1bd5b909938159e709daa1ca0b2e51a3f3dc1fc80caa3e7fc0e9fe0fa64d6dfe7d870057fa8e97100a3a89bfe4449fd4c04fe3af17d0f105dfb9cd SHA512 08a40d722672504427238e71c9e52a723c6a14735abe9581d6d4bb3f86662d5d51a3f32a6aed6420c1f9680e22a3a554a9b87ae342635be971e2db49cc9fdb87 DIST musl-1.1.23.tar.gz 1013779 BLAKE2B 0251604697f6e243d173c6a72d0a24ddbbce298f8e3a53d9d3a18d7f5ebf19f4e85584a494639c2470530b61c3189150bfaed3376e31acf4e1b2daa1c30860dc SHA512 a2278de9903852b08352d3e734a39d4616caa602496997ba843e8fea0e1c481761776745faf04536a149d1c4af416b68df681b6fbc9ae2de8794e18c2e853b09 +DIST musl-1.1.24.tar.gz 1024988 BLAKE2B 5fa26746eed0f2334b740adf94a8400568d56d9b2276bf1fbac828f9b707b4e215d3c16af9ea048b9d771f1d0a58ada3bc6e1bf0ba8f5fa693f5042fc6af30df SHA512 8987f1e194ea616f34f4f21fe9def28fb7f81d7060e38619206c6349f79db3bbb76bae8b711f5f9b8ed038799c9aea1a4cbec69e0bc4131e246203e133149e77 EBUILD musl-1.1.22.ebuild 3240 BLAKE2B 756ce888342f6b9f7501873af701bad4e4b429fcd11a9713e168da63da641d0fbef39a25d002a88f6d988a6a1b0e79e24cf042acd56a1903b95905cd811ecda6 SHA512 c7b779730e7c5b56618d0a53cd70e02e4f3e9f443c91bb59237fbf72dea1f6d7fa2e480312114b98db012ab4e716d0ef1481019788389edfc21b56c1245e28ac EBUILD musl-1.1.23.ebuild 3242 BLAKE2B 2d7c121e43f3f3dcc39daa3a27049ffadce81db16b055c5807c7a7ea7e62cae844145d2f4a737b92ce5c5601a3b494726a842105b983a050a2dfa09763885a76 SHA512 a0b7e420307c6350a7ffc1f026bf41de5c8692c7791b7c7941902ebb6f4427a2b0ce039acb983ffd8b0c8ae7df76ea2d224ead0b8f931fea41f566a3204d6750 +EBUILD musl-1.1.24.ebuild 3245 BLAKE2B 96b025385b2f8cdbc66a91bbe4bcabdb6daab5fc6dff29f4f78b10f0d02daa2c4f4ff9546f55b67fba4552c3fdfd3ee6deaa21dd2b4f52b95a114070cee587aa SHA512 8a789f0d2988be8567647258a45989b708c9d50f0fdae020160931af140c6566f68551ff4ec423beaf9a9043490888c2a99b80cfd826a98d46553609b7994de8 EBUILD musl-9999.ebuild 3245 BLAKE2B 96b025385b2f8cdbc66a91bbe4bcabdb6daab5fc6dff29f4f78b10f0d02daa2c4f4ff9546f55b67fba4552c3fdfd3ee6deaa21dd2b4f52b95a114070cee587aa SHA512 8a789f0d2988be8567647258a45989b708c9d50f0fdae020160931af140c6566f68551ff4ec423beaf9a9043490888c2a99b80cfd826a98d46553609b7994de8 MISC metadata.xml 453 BLAKE2B d7b2840a6b0bb2ede2124f22bde34a9f77ac258792a9fbf9d9e3f552a85d6ee539a98c8704729efb75dec627db62b33759fc0cfdfd01614abbc4960a163c5019 SHA512 5d8bebce119ed34a6a6b8cb07b3ce056db5efc91db80709fc8031c955b16e29965f3741f75e9afbe9f428bbac1e39e7c30278cd63f04479e3a1493b006195e0a diff --git a/sys-libs/musl/musl-1.1.24.ebuild b/sys-libs/musl/musl-1.1.24.ebuild new file mode 100644 index 000000000000..0827b9d412bf --- /dev/null +++ b/sys-libs/musl/musl-1.1.24.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit eutils flag-o-matic multilib toolchain-funcs +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://git.musl-libc.org/musl" + inherit git-r3 + SRC_URI=" + https://dev.gentoo.org/~blueness/musl-misc/getconf.c + https://dev.gentoo.org/~blueness/musl-misc/getent.c + https://dev.gentoo.org/~blueness/musl-misc/iconv.c" + KEYWORDS="" +else + SRC_URI="http://www.musl-libc.org/releases/${P}.tar.gz + https://dev.gentoo.org/~blueness/musl-misc/getconf.c + https://dev.gentoo.org/~blueness/musl-misc/getent.c + https://dev.gentoo.org/~blueness/musl-misc/iconv.c" + KEYWORDS="-* ~amd64 ~arm ~arm64 ~mips ~ppc ~x86" +fi + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +DESCRIPTION="Light, fast and simple C library focused on standards-conformance and safety" +HOMEPAGE="http://www.musl-libc.org/" +LICENSE="MIT LGPL-2 GPL-2" +SLOT="0" +IUSE="headers-only" + +QA_SONAME="/usr/lib/libc.so" +QA_DT_NEEDED="/usr/lib/libc.so" + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} + +just_headers() { + use headers-only && is_crosscompile +} + +pkg_setup() { + if [ ${CTARGET} == ${CHOST} ] ; then + case ${CHOST} in + *-musl*) ;; + *) die "Use sys-devel/crossdev to build a musl toolchain" ;; + esac + fi + + # fix for #667126, copied from glibc ebuild + # make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi +} + +src_configure() { + tc-getCC ${CTARGET} + just_headers && export CC=true + + local sysroot + is_crosscompile && sysroot=/usr/${CTARGET} + ./configure \ + --target=${CTARGET} \ + --prefix=${sysroot}/usr \ + --syslibdir=${sysroot}/lib \ + --disable-gcc-wrapper || die +} + +src_compile() { + emake obj/include/bits/alltypes.h + just_headers && return 0 + + emake + if [[ ${CATEGORY} != cross-* ]] ; then + $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getconf.c -o "${T}"/getconf || die + $(tc-getCC) ${CFLAGS} "${DISTDIR}"/getent.c -o "${T}"/getent || die + $(tc-getCC) ${CFLAGS} "${DISTDIR}"/iconv.c -o "${T}"/iconv || die + fi +} + +src_install() { + local target="install" + just_headers && target="install-headers" + emake DESTDIR="${D}" ${target} + just_headers && return 0 + + # musl provides ldd via a sym link to its ld.so + local sysroot + is_crosscompile && sysroot=/usr/${CTARGET} + local ldso=$(basename "${D}"${sysroot}/lib/ld-musl-*) + dosym ${sysroot}/lib/${ldso} ${sysroot}/usr/bin/ldd + + if [[ ${CATEGORY} != cross-* ]] ; then + local arch=$("${D}"usr/lib/libc.so 2>&1 | sed -n '1s/^musl libc (\(.*\))$/\1/p') + [[ -e "${D}"/lib/ld-musl-${arch}.so.1 ]] || die + cp "${FILESDIR}"/ldconfig.in "${T}" || die + sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die + into / + dosbin "${T}"/ldconfig + into /usr + dobin "${T}"/getconf + dobin "${T}"/getent + dobin "${T}"/iconv + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die + doenvd "${T}"/00musl || die + fi +} + +pkg_postinst() { + is_crosscompile && return 0 + + [ "${ROOT}" != "/" ] && return 0 + + ldconfig || die + # reload init ... + /sbin/telinit U 2>/dev/null +} diff --git a/sys-libs/newlib/Manifest b/sys-libs/newlib/Manifest index d43499d3230e..ac367ce75cf6 100644 --- a/sys-libs/newlib/Manifest +++ b/sys-libs/newlib/Manifest @@ -6,6 +6,7 @@ DIST newlib-2.2.0.tar.gz 16521910 BLAKE2B 530290c8f219774885e3c408889b7f58bbeefe DIST newlib-2.3.0.20160104.tar.gz 17674117 BLAKE2B abdfd902e502da32862d8151bf11bd778548cc930bcd2e0e546f5b23c075d6448f3f85e7b4388d64fbf255a5f3b893ace6e13405115a7dc0e3ac5c8846722429 SHA512 d83ce298b1b72eabf92e4ec14af3afdf3122e34aff5e320295a398df077235a78aa87148895b441a4f7de3047815e7ce13ea06a06135dd86b69a200236514293 DIST newlib-2.4.0.tar.gz 17574364 BLAKE2B d97be2fe2fe93629230a2b0b1dbf23b2062fab54921e658bae9438fb42a1af975d763f2643352b5dbc3027faffa76ff97170aed9f5d6fb33ae4c6d947f1b608b SHA512 c60665e793dce2368a5baf23560beb50f641e1831854d702d1d7629fb6e9200cf814527f29796792a3d2dff81afee4255723df99ceb0732f99dd9580a17d2ac0 DIST newlib-2.5.0.tar.gz 17912392 BLAKE2B bc89491758d59f3529c72308e963c5b3e39044d6d586ef3814cc19cf55aee33948656c544df7dfcbe3915105e7373f53d7b2baf96b9b8147e3af780c1d08e670 SHA512 4c99e8dfcb4a7ad0769b9e173ff06628d82e4993ef87d3adf9d6b5578626b14de81b4b3c5f0673ddbb49dc9f3d3628f9f8d4432dcded91f5cd3d27b7d44343cd +DIST newlib-3.1.0.tar.gz 17958952 BLAKE2B 3a84ae81fc07e442a4ed3da7a78e7ede34cc7e24b5d1c66a12624ed808e5f85f134751fcea0e4ce9eb39df287a582821f751a8610a088c149895b5e38eb06989 SHA512 efc4c3ab7153387780d141386bca5d3e20c9d25ae3e6b87cf94c8df9d301ce5926dacdff9bd33aeb9781559d933c3d0ae77f4e5b46120d90792f75dbfde702c7 EBUILD newlib-2.0.0.ebuild 1548 BLAKE2B 5ada6e1c520dc24259411de2cdc772fec78dda6d236ded8606195b9cac5b9224c317d79a959c7f866bffb76f7b201785f532418b94ccaedb66270eb0ff7339b9 SHA512 088ba22e37489af8607b6443fe205eb38ba169e42890d2b2b07e2c551726c20fddf96e682c2678613e762a18a99ab0a19635eb1526df566e312c269790b6f0df EBUILD newlib-2.1.0.ebuild 1643 BLAKE2B ef0b8e3f5d02317b3baf60c278ccf9f86e7092a295ce022215605d890be0e91fafdf91c71f35420d892e6b5842bbe7def02e2d2f8675dd7e728bdb8a63ea2cfe SHA512 33d38543359ee921ad764baded7830f26414fc6b7032084c3b991d87a79a6d07496ca093219fd2e637d4de5c19dcdc4e0c2c739809b43d3fe8e91174dff7f352 EBUILD newlib-2.2.0.20150423.ebuild 1760 BLAKE2B 3b08f9790d34ec9c928e1abe4befa5e273f96d95dc6702e4df733d6d4654d44161cea48c3abdfe0836119411fc5e4fcef8645c98d5de12390b1ced739053576b SHA512 6ca9287a28ef3374c2d6d2887251ca58682dcda6785365cf66baa177038eb0d4553d906c267b2ec3ec84bf74b0beea2fab21ae5c4b6c9f6352000703f70d912f @@ -13,5 +14,6 @@ EBUILD newlib-2.2.0.ebuild 1778 BLAKE2B 1b2808f9adf45af3f55ea1d7d52d1e129424d01d EBUILD newlib-2.3.0.20160104.ebuild 1762 BLAKE2B 59b4544ef0f48831064e427dd9e2fdb29dfed749c2a87ac3f8b7e1c88d7e2e1a6cc4f137648d9d3d82fb2089a85f572149467e4ebca6f1c8ce86c84b9b88d0b9 SHA512 d0f28b3298942ac6a182b953f19f61ee6fcef13fd62a74e23d2c65cac06c33a06c84801a32e760b541b53c7bf467dbce664c7904ec89d9359ebecd937035c841 EBUILD newlib-2.4.0.ebuild 1955 BLAKE2B 76bfb9237a4171f26e3e0756864e9c432a7f8856e61f712ac581874b41e11d1024f86fb15666d2f4254918fb87d65d3c4f124d05a01b42273a4f00f2c541fdc5 SHA512 53e7012a782b3004e1636beb759c5dc1872ab52c68bd7fb42b1ebd1c810bb57e2fd67492bed4edc5595fd2bcc9c473b516612cea93f6d98cb39dcce43b75fd54 EBUILD newlib-2.5.0.ebuild 4040 BLAKE2B 89d2eea47609958ae3a6fe32f527ed7cdff94b430f40fe4bdd12714e72dfcdce4dcc59d8e2a8971d54d0a880d227ac557741f374c30d53e84e59b73ee8fe72fd SHA512 e9c40057893176881fe811d84eb6e1ff5bb82c02cbf3bc1d4cfbb346a1960dacdce183d9e5c10df1cf23daa2bfd01d72712b811f4a1719436a4109a9e904df51 -EBUILD newlib-9999.ebuild 4040 BLAKE2B 89d2eea47609958ae3a6fe32f527ed7cdff94b430f40fe4bdd12714e72dfcdce4dcc59d8e2a8971d54d0a880d227ac557741f374c30d53e84e59b73ee8fe72fd SHA512 e9c40057893176881fe811d84eb6e1ff5bb82c02cbf3bc1d4cfbb346a1960dacdce183d9e5c10df1cf23daa2bfd01d72712b811f4a1719436a4109a9e904df51 +EBUILD newlib-3.1.0.ebuild 4225 BLAKE2B e644e98f0599a178a10e692958e5fb086127b011caaa6c9c57503506d83074b795cd388088d5b3cc769e7e2bf590203ebe5eede525fc6f5fcb6d64c0be2c6b45 SHA512 f897ce7ecdcb3fd5cd09dffd285ad1e22730702483e87179c4137aa8f4142962800ec0e793b43fd278b2a89c325d227966fb30e2e20f7b55a709ebfb245c35ef +EBUILD newlib-9999.ebuild 4225 BLAKE2B e644e98f0599a178a10e692958e5fb086127b011caaa6c9c57503506d83074b795cd388088d5b3cc769e7e2bf590203ebe5eede525fc6f5fcb6d64c0be2c6b45 SHA512 f897ce7ecdcb3fd5cd09dffd285ad1e22730702483e87179c4137aa8f4142962800ec0e793b43fd278b2a89c325d227966fb30e2e20f7b55a709ebfb245c35ef MISC metadata.xml 413 BLAKE2B 03320244c40182ff9d503fd1d9c7c3847209eeb91081e7d4a3285ed43eba6a42e0f361f6b7601966df420dde2d4e93ca458816198c2f9ebaec82790359ce868b SHA512 37e46d117243b93e189177ada64acedc0d798dfe4859f29a7ef70b22fe44e6364a3445e345def7e48264cb2bf3047ac78637759bc04d9ed3d7ea339432adf7e4 diff --git a/sys-libs/newlib/newlib-3.1.0.ebuild b/sys-libs/newlib/newlib-3.1.0.ebuild new file mode 100644 index 000000000000..52ef720a87f4 --- /dev/null +++ b/sys-libs/newlib/newlib-3.1.0.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic toolchain-funcs + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://sourceware.org/git/newlib-cygwin.git" + inherit git-r3 +else + SRC_URI="ftp://sourceware.org/pub/newlib/${P}.tar.gz" + KEYWORDS="-* ~arm ~hppa ~m68k ~mips ~ppc ~ppc64 ~sh ~sparc ~x86" +fi + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CTARGET} == ${CHOST} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +DESCRIPTION="Newlib is a C library intended for use on embedded systems" +HOMEPAGE="https://sourceware.org/newlib/" + +LICENSE="NEWLIB LIBGLOSS GPL-2" +SLOT="0" +IUSE="nls threads unicode headers-only nano" +RESTRICT="strip" + +NEWLIBBUILD="${WORKDIR}/build" +NEWLIBNANOBUILD="${WORKDIR}/build.nano" +NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install" + +# Adding -U_FORTIFY_SOURCE to conter the effect of Gentoo's +# auto-addition of _FORTIFY_SOURCE at gcc site: bug #656018#c4 +# Currently newlib can't be built itself when _FORTIFY_SOURCE +# is set. +CFLAGS_FULL="-ffunction-sections -fdata-sections -U_FORTIFY_SOURCE" +CFLAGS_NANO="-Os -ffunction-sections -fdata-sections -U_FORTIFY_SOURCE" + +pkg_setup() { + # Reject newlib-on-glibc type installs + if [[ ${CTARGET} == ${CHOST} ]] ; then + case ${CHOST} in + *-newlib|*-elf) ;; + *) die "Use sys-devel/crossdev to build a newlib toolchain" ;; + esac + fi +} + +src_configure() { + # we should fix this ... + unset LDFLAGS + CHOST=${CTARGET} strip-unsupported-flags + CCASFLAGS_ORIG="${CCASFLAGS}" + CFLAGS_ORIG="${CFLAGS}" + + local myconf=( + # Disable legacy syscall stub code in newlib. These have been + # moved to libgloss for a long time now, so the code in newlib + # itself just gets in the way. + --disable-newlib-supplied-syscalls + ) + [[ ${CTARGET} == "spu" ]] \ + && myconf+=( --disable-newlib-multithread ) \ + || myconf+=( $(use_enable threads newlib-multithread) ) + + mkdir -p "${NEWLIBBUILD}" + cd "${NEWLIBBUILD}" + + export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}" + export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}" + ECONF_SOURCE=${S} \ + econf \ + $(use_enable unicode newlib-mb) \ + $(use_enable nls) \ + "${myconf[@]}" + + # Build newlib-nano beside newlib (original) + # Based on https://tracker.debian.org/media/packages/n/newlib/rules-2.1.0%2Bgit20140818.1a8323b-2 + if use nano ; then + mkdir -p "${NEWLIBNANOBUILD}" || die + cd "${NEWLIBNANOBUILD}" || die + export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}" + export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}" + ECONF_SOURCE=${S} \ + econf \ + $(use_enable unicode newlib-mb) \ + $(use_enable nls) \ + --enable-newlib-reent-small \ + --disable-newlib-fvwrite-in-streamio \ + --disable-newlib-fseek-optimization \ + --disable-newlib-wide-orient \ + --enable-newlib-nano-malloc \ + --disable-newlib-unbuf-stream-opt \ + --enable-lite-exit \ + --enable-newlib-global-atexit \ + --enable-newlib-nano-formatted-io \ + ${myconf} + fi +} + +src_compile() { + export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_FULL}" + export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_FULL}" + emake -C "${NEWLIBBUILD}" + + if use nano ; then + export "CFLAGS_FOR_TARGET=${CFLAGS_ORIG} ${CFLAGS_NANO}" + export "CCASFLAGS=${CCASFLAGS_ORIG} ${CFLAGS_NANO}" + emake -C "${NEWLIBNANOBUILD}" + fi +} + +src_install() { + cd "${NEWLIBBUILD}" || die + emake -j1 DESTDIR="${D}" install + + if use nano ; then + cd "${NEWLIBNANOBUILD}" || die + emake -j1 DESTDIR="${NEWLIBNANOTMPINSTALL}" install + # Rename nano lib* files to lib*_nano and move to the real ${D} + local nanolibfiles="" + nanolibfiles=$(find "${NEWLIBNANOTMPINSTALL}" -regex ".*/lib\(c\|g\|rdimon\)\.a" -print) + for f in ${nanolibfiles}; do + local l="${f##${NEWLIBNANOTMPINSTALL}}" + mv -v "${f}" "${D}/${l%%\.a}_nano.a" || die + done + + # Move newlib-nano's version of newlib.h to newlib-nano/newlib.h + mkdir -p "${D}/usr/${CTARGET}/include/newlib-nano" || die + mv "${NEWLIBNANOTMPINSTALL}/usr/${CTARGET}/include/newlib.h" \ + "${D}/usr/${CTARGET}/include/newlib-nano/newlib.h" || die + fi + + # minor hack to keep things clean + rm -rf "${D}"/usr/share/info || die + rm -rf "${D}"/usr/info || die +} diff --git a/sys-libs/newlib/newlib-9999.ebuild b/sys-libs/newlib/newlib-9999.ebuild index 6575c24051a7..52ef720a87f4 100644 --- a/sys-libs/newlib/newlib-9999.ebuild +++ b/sys-libs/newlib/newlib-9999.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2018 Gentoo Authors +# Copyright 1999-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI="6" +EAPI="7" inherit flag-o-matic toolchain-funcs @@ -10,9 +10,7 @@ if [[ ${PV} == "9999" ]] ; then inherit git-r3 else SRC_URI="ftp://sourceware.org/pub/newlib/${P}.tar.gz" - if [[ ${PV} != *.201[5-9]???? ]] ; then - KEYWORDS="-* ~arm ~hppa ~m68k ~mips ~ppc ~ppc64 ~sh ~sparc ~x86" - fi + KEYWORDS="-* ~arm ~hppa ~m68k ~mips ~ppc ~ppc64 ~sh ~sparc ~x86" fi export CBUILD=${CBUILD:-${CHOST}} @@ -35,8 +33,12 @@ NEWLIBBUILD="${WORKDIR}/build" NEWLIBNANOBUILD="${WORKDIR}/build.nano" NEWLIBNANOTMPINSTALL="${WORKDIR}/nano_tmp_install" -CFLAGS_FULL="-ffunction-sections -fdata-sections" -CFLAGS_NANO="-Os -ffunction-sections -fdata-sections" +# Adding -U_FORTIFY_SOURCE to conter the effect of Gentoo's +# auto-addition of _FORTIFY_SOURCE at gcc site: bug #656018#c4 +# Currently newlib can't be built itself when _FORTIFY_SOURCE +# is set. +CFLAGS_FULL="-ffunction-sections -fdata-sections -U_FORTIFY_SOURCE" +CFLAGS_NANO="-Os -ffunction-sections -fdata-sections -U_FORTIFY_SOURCE" pkg_setup() { # Reject newlib-on-glibc type installs diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest index 6f40cecaaf81..ea700212ee67 100644 --- a/sys-libs/readline/Manifest +++ b/sys-libs/readline/Manifest @@ -24,7 +24,8 @@ DIST readline70-004 1501 BLAKE2B cebce69a21bee3a4d6a908de09f371d65eab6af51a8dc0f DIST readline70-005 1641 BLAKE2B f720508f698b113c6328018f7e6e8775c7c79afc464047405a5c3dae017d611535017dfc2759c11483bb536fab1e9bf72c7a9d3c769b7aea3bd2cee9686bd522 SHA512 eeb27f4f9195cb905d5891f26480d58f59c885dde3457f7a30ff57760ac772e2333ee8aeae979214949f3b52030285b10db013e307ee7311abab677a4427e878 DIST readline80-001 927 BLAKE2B 95e3ac33ff4adb65813274864c17781056a8ea065f9a76571b4a6bcb2ebab090c3a021fa2b621832c11b5995e48a8a26dd6e3a8f5864a8e8b520bfcf85d7c4ab SHA512 a148cda6ac97935d51ede1bbacf847d7d2cba8861cf3941d32e3da2f45f16dcc05b20845b63d4264692520db8329e1236cf2bc4fd8ccbe6e40921bbbdeb2cb1c EBUILD readline-6.3_p8-r3.ebuild 4368 BLAKE2B b9308a93bbedafd88a53d72b7011c2e0c57c8ba3be64cc19769ccd72ee22bf32e314def9607477d3e1749064245b6e32311c35efeeb20f715fcf2b67e38328c2 SHA512 adca104b265358729e3e736bbb5c1261c3f63b76e8d32db1b460060d9481f4bf7ee3d2d0d662659fc8b1a841bfb80bfb1b4394f4885160070a570031ef270f8a -EBUILD readline-7.0_p5.ebuild 4821 BLAKE2B ec04ad644d658e46329030b2b970c9b6b69b41d81fe24c90902170976f65dc276cd0fdde91a24ec3e811c6259af9481835c693ef1d7120c85d2091b08f98a26d SHA512 b64a43ce5eafa885a6b8665735241c85b75d5d9523cc62e60b73e4dba7bfee8be655a41f9bdf0eff99c7e57c761de26f9ac860126c901af673fe0af93803c78d +EBUILD readline-7.0_p5-r1.ebuild 4859 BLAKE2B d35369cacab95a988b8d5168ccdfc45e3a66b08483e6a0359b89adab78d5a3e90f3d893c544c3e36c3462b0cc3b0fa40620ca1a6f56f52f8d0169e49d71fda97 SHA512 861600127c9c1015182d70e264787079fa2d3e583bc5bd9b2b8ce6e0369e08172d03bf6daa1776d276ee275605c45b246b5f4f9460dbcacd5817c8200a9a5bec EBUILD readline-8.0.ebuild 4790 BLAKE2B 42833b30980fc6593bf4d21a74866467f23c5814c7eed4f26cfbe16343f78c99ae2b4c340e2f8b893a8ba728e6f677ffda22e451eca6bc539a0ac8113a6a5f79 SHA512 f8763e2bb3900626e4392bf0afb8672778f105bcaad146b61a78cab36f6b4a5fcf14b019a202c514b73f64353af0b42ac320c81fc9ca12881c034f82daec7ec6 +EBUILD readline-8.0_p1-r1.ebuild 4856 BLAKE2B e2196b310a064d321278860c53eccfefedfec9411c11f632281496b9dff318a01e18156d7539bb35dc6366a2f025ca4211aba2cd8b8b70b8e05566c2d7188f6b SHA512 8d8709911c6fb4387097ec6d37334cb59b669a4eaa7ff0b4e0c171ca351e24f3008eabc44ba81a9214251412ee624668bee33b9396af3e818d3113ef25efe4ab EBUILD readline-8.0_p1.ebuild 4818 BLAKE2B 9088e7a27a355c2ee20e5ce491196b806df4480597a949c2a3191f306845abda51669aac2e9bfecd44fcd62a914f66c1ea789393ed6bf62bd1e2a66afab8181a SHA512 d414288e8c571712d311c874c1150ba1271bc48e574f3768eca30e4d8a99548b83d840a8e6356782d80d8bdec9de15ec39cbf93aa35c4ceaba1d53a03f767c58 MISC metadata.xml 472 BLAKE2B 8d3717ac6980105677b10449a1aabca9f9347066f73802241b904101172690bb789b8071f3670dd91ad2af0223c7bc5fb4ed594dc8af3aff20b17bdd681f7630 SHA512 f19a6f0d6aed18903778adc5ad45fdae39c4388e4f09e7cb8a110b798e8cc7ab1739ff813a227ad08ef1166309e1ead57c200b7fe42499a06db97af9f4bce173 diff --git a/sys-libs/readline/readline-7.0_p5-r1.ebuild b/sys-libs/readline/readline-7.0_p5-r1.ebuild new file mode 100644 index 000000000000..0facdfe5f115 --- /dev/null +++ b/sys-libs/readline/readline-7.0_p5-r1.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit flag-o-matic multilib-minimal toolchain-funcs usr-ldscript + +# Official patches +# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/ +PLEVEL="${PV##*_p}" +MY_PV="${PV/_p*}" +MY_PV="${MY_PV/_/-}" +MY_P="${PN}-${MY_PV}" +[[ ${PV} != *_p* ]] && PLEVEL=0 +patches() { + [[ ${PLEVEL} -eq 0 ]] && return 1 + local opt=$1 + eval set -- {1..${PLEVEL}} + set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") + if [[ ${opt} == -s ]] ; then + echo "${@/#/${DISTDIR}/}" + else + local u + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do + printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" + done + fi +} + +DESCRIPTION="Another cute console display library" +HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html" + +case ${PV} in + *_alpha*|*_beta*|*_rc*) + SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" + ;; + *) + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" + ;; +esac + +LICENSE="GPL-3" +SLOT="0/7" # subslot matches SONAME major +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-linux ~x86-linux" +IUSE="static-libs +unicode utils" + +RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,unicode?,${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +S=${WORKDIR}/${MY_P} + +PATCHES=( + "${FILESDIR}"/${PN}-5.0-no_rpath.patch + "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 + "${FILESDIR}"/${PN}-7.0-headers.patch + "${FILESDIR}"/${PN}-7.0-missing-echo-proto.patch + "${FILESDIR}"/${PN}-7.0-mingw.patch +) + +# Needed because we don't want the patches being unpacked +# (which emits annoying and useless error messages) +src_unpack() { + unpack ${MY_P}.tar.gz +} + +src_prepare() { + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) + default + + # Force ncurses linking. #71420 + # Use pkg-config to get the right values. #457558 + local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs) + sed -i \ + -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \ + support/shobj-conf || die + sed -i \ + -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \ + examples/rlfe/configure || die + + # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated + # objformat for years, so we don't want to rely on that. + sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die + + ln -s ../.. examples/rlfe/readline || die # for local readline headers +} + +src_configure() { + # fix implicit decls with widechar funcs + append-cppflags -D_GNU_SOURCE + # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html + append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free + + # Make sure configure picks a better ar than `ar`. #484866 + export ac_cv_prog_AR=$(tc-getAR) + + # Force the test since we used sed above to force it. + export bash_cv_termcap_lib=ncurses + + # Control cross-compiling cases when we know the right answer. + # In cases where the C library doesn't support wide characters, readline + # itself won't work correctly, so forcing the answer below should be OK. + if tc-is-cross-compiler ; then + use kernel_Winnt || export bash_cv_func_sigsetjmp='present' + export bash_cv_func_ctype_nonascii='yes' + export bash_cv_wcwidth_broken='no' #503312 + fi + + # This is for rlfe, but we need to make sure LDFLAGS doesn't change + # so we can re-use the config cache file between the two. + append-ldflags -L. + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myeconfargs=( + --cache-file="${BUILD_DIR}"/config.cache + --with-curses + $(use_enable static-libs static) + ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then + # code is full of AC_TRY_RUN() + mkdir -p examples/rlfe || die + cd examples/rlfe || die + ECONF_SOURCE="${S}"/examples/rlfe \ + econf --cache-file="${BUILD_DIR}"/config.cache + fi +} + +multilib_src_compile() { + emake + + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then + # code is full of AC_TRY_RUN() + cd examples/rlfe || die + local l + for l in readline history ; do + ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die + ln -s ../../lib${l}.a lib${l}.a || die + done + emake + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi ; then + gen_usr_ldscript -a readline history #4411 + + if use utils && ! tc-is-cross-compiler; then + dobin examples/rlfe/rlfe + fi + fi +} + +multilib_src_install_all() { + HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs + dodoc USAGE + docinto ps + dodoc doc/*.ps +} +pkg_preinst() { + # bug #29865 + # Reappeared in #595324 with paludis so keeping this for now... + preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6} +} + +pkg_postinst() { + preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5,6} +} diff --git a/sys-libs/readline/readline-7.0_p5.ebuild b/sys-libs/readline/readline-7.0_p5.ebuild deleted file mode 100644 index 04e6ade437a4..000000000000 --- a/sys-libs/readline/readline-7.0_p5.ebuild +++ /dev/null @@ -1,174 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -inherit flag-o-matic multilib-minimal toolchain-funcs usr-ldscript - -# Official patches -# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/ -PLEVEL="${PV##*_p}" -MY_PV="${PV/_p*}" -MY_PV="${MY_PV/_/-}" -MY_P="${PN}-${MY_PV}" -[[ ${PV} != *_p* ]] && PLEVEL=0 -patches() { - [[ ${PLEVEL} -eq 0 ]] && return 1 - local opt=$1 - eval set -- {1..${PLEVEL}} - set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") - if [[ ${opt} == -s ]] ; then - echo "${@/#/${DISTDIR}/}" - else - local u - for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do - printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" - done - fi -} - -DESCRIPTION="Another cute console display library" -HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html" - -case ${PV} in - *_alpha*|*_beta*|*_rc*) - SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" - ;; - *) - SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" - ;; -esac - -LICENSE="GPL-3" -SLOT="0/7" # subslot matches SONAME major -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-linux ~x86-linux" -IUSE="static-libs utils" - -RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,${MULTILIB_USEDEP}]" -DEPEND="${RDEPEND} - virtual/pkgconfig" - -S=${WORKDIR}/${MY_P} - -PATCHES=( - "${FILESDIR}"/${PN}-5.0-no_rpath.patch - "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 - "${FILESDIR}"/${PN}-7.0-headers.patch - "${FILESDIR}"/${PN}-7.0-missing-echo-proto.patch - "${FILESDIR}"/${PN}-7.0-mingw.patch -) - -# Needed because we don't want the patches being unpacked -# (which emits annoying and useless error messages) -src_unpack() { - unpack ${MY_P}.tar.gz -} - -src_prepare() { - [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) - default - - # Force ncurses linking. #71420 - # Use pkg-config to get the right values. #457558 - local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses --libs) - sed -i \ - -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \ - support/shobj-conf || die - sed -i \ - -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \ - examples/rlfe/configure || die - - # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated - # objformat for years, so we don't want to rely on that. - sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die - - ln -s ../.. examples/rlfe/readline || die # for local readline headers -} - -src_configure() { - # fix implicit decls with widechar funcs - append-cppflags -D_GNU_SOURCE - # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html - append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free - - # Make sure configure picks a better ar than `ar`. #484866 - export ac_cv_prog_AR=$(tc-getAR) - - # Force the test since we used sed above to force it. - export bash_cv_termcap_lib=ncurses - - # Control cross-compiling cases when we know the right answer. - # In cases where the C library doesn't support wide characters, readline - # itself won't work correctly, so forcing the answer below should be OK. - if tc-is-cross-compiler ; then - use kernel_Winnt || export bash_cv_func_sigsetjmp='present' - export bash_cv_func_ctype_nonascii='yes' - export bash_cv_wcwidth_broken='no' #503312 - fi - - # This is for rlfe, but we need to make sure LDFLAGS doesn't change - # so we can re-use the config cache file between the two. - append-ldflags -L. - - multilib-minimal_src_configure -} - -multilib_src_configure() { - local myeconfargs=( - --cache-file="${BUILD_DIR}"/config.cache - --with-curses - $(use_enable static-libs static) - ) - ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" - - if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then - # code is full of AC_TRY_RUN() - mkdir -p examples/rlfe || die - cd examples/rlfe || die - ECONF_SOURCE="${S}"/examples/rlfe \ - econf --cache-file="${BUILD_DIR}"/config.cache - fi -} - -multilib_src_compile() { - emake - - if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then - # code is full of AC_TRY_RUN() - cd examples/rlfe || die - local l - for l in readline history ; do - ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die - ln -s ../../lib${l}.a lib${l}.a || die - done - emake - fi -} - -multilib_src_install() { - default - - if multilib_is_native_abi ; then - gen_usr_ldscript -a readline history #4411 - - if use utils && ! tc-is-cross-compiler; then - dobin examples/rlfe/rlfe - fi - fi -} - -multilib_src_install_all() { - HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs - dodoc USAGE - docinto ps - dodoc doc/*.ps -} -pkg_preinst() { - # bug #29865 - # Reappeared in #595324 with paludis so keeping this for now... - preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6} -} - -pkg_postinst() { - preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5,6} -} diff --git a/sys-libs/readline/readline-8.0_p1-r1.ebuild b/sys-libs/readline/readline-8.0_p1-r1.ebuild new file mode 100644 index 000000000000..6b36ff730e5f --- /dev/null +++ b/sys-libs/readline/readline-8.0_p1-r1.ebuild @@ -0,0 +1,175 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit flag-o-matic multilib-minimal preserve-libs toolchain-funcs usr-ldscript + +# Official patches +# See ftp://ftp.cwru.edu/pub/bash/readline-7.0-patches/ +PLEVEL="${PV##*_p}" +MY_PV="${PV/_p*}" +MY_PV="${MY_PV/_/-}" +MY_P="${PN}-${MY_PV}" +[[ ${PV} != *_p* ]] && PLEVEL=0 +patches() { + [[ ${PLEVEL} -eq 0 ]] && return 1 + local opt=$1 + eval set -- {1..${PLEVEL}} + set -- $(printf "${PN}${MY_PV/\.}-%03d " "$@") + if [[ ${opt} == -s ]] ; then + echo "${@/#/${DISTDIR}/}" + else + local u + for u in ftp://ftp.cwru.edu/pub/bash mirror://gnu/${PN} ; do + printf "${u}/${PN}-${MY_PV}-patches/%s " "$@" + done + fi +} + +DESCRIPTION="Another cute console display library" +HOMEPAGE="https://tiswww.case.edu/php/chet/readline/rltop.html" + +case ${PV} in + *_alpha*|*_beta*|*_rc*) + SRC_URI+=" ftp://ftp.cwru.edu/pub/bash/${MY_P}.tar.gz" + ;; + *) + SRC_URI="mirror://gnu/${PN}/${MY_P}.tar.gz $(patches)" + ;; +esac + +LICENSE="GPL-3" +SLOT="0/8" # subslot matches SONAME major +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="static-libs +unicode utils" + +RDEPEND=">=sys-libs/ncurses-5.9-r3:0=[static-libs?,unicode?,${MULTILIB_USEDEP}]" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig +" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-5.0-no_rpath.patch + "${FILESDIR}"/${PN}-6.2-rlfe-tgoto.patch #385091 + "${FILESDIR}"/${PN}-7.0-headers.patch + "${FILESDIR}"/${PN}-8.0-headers.patch +) + +# Needed because we don't want the patches being unpacked +# (which emits annoying and useless error messages) +src_unpack() { + unpack ${MY_P}.tar.gz +} + +src_prepare() { + [[ ${PLEVEL} -gt 0 ]] && eapply -p0 $(patches -s) + default + + # Force ncurses linking. #71420 + # Use pkg-config to get the right values. #457558 + local ncurses_libs=$($(tc-getPKG_CONFIG) ncurses$(usex unicode w '') --libs) + sed -i \ + -e "/^SHLIB_LIBS=/s:=.*:='${ncurses_libs}':" \ + support/shobj-conf || die + sed -i \ + -e "/^[[:space:]]*LIBS=.-lncurses/s:-lncurses:${ncurses_libs}:" \ + examples/rlfe/configure || die + + # fix building under Gentoo/FreeBSD; upstream FreeBSD deprecated + # objformat for years, so we don't want to rely on that. + sed -i -e '/objformat/s:if .*; then:if true; then:' support/shobj-conf || die + + ln -s ../.. examples/rlfe/readline || die # for local readline headers +} + +src_configure() { + # fix implicit decls with widechar funcs + append-cppflags -D_GNU_SOURCE + # https://lists.gnu.org/archive/html/bug-readline/2010-07/msg00013.html + append-cppflags -Dxrealloc=_rl_realloc -Dxmalloc=_rl_malloc -Dxfree=_rl_free + + # Make sure configure picks a better ar than `ar`. #484866 + export ac_cv_prog_AR=$(tc-getAR) + + # Force the test since we used sed above to force it. + export bash_cv_termcap_lib=ncurses + + # Control cross-compiling cases when we know the right answer. + # In cases where the C library doesn't support wide characters, readline + # itself won't work correctly, so forcing the answer below should be OK. + if tc-is-cross-compiler ; then + use kernel_Winnt || export bash_cv_func_sigsetjmp='present' + export bash_cv_func_ctype_nonascii='yes' + export bash_cv_wcwidth_broken='no' #503312 + fi + + # This is for rlfe, but we need to make sure LDFLAGS doesn't change + # so we can re-use the config cache file between the two. + append-ldflags -L. + + multilib-minimal_src_configure +} + +multilib_src_configure() { + local myeconfargs=( + --cache-file="${BUILD_DIR}"/config.cache + --with-curses + $(use_enable static-libs static) + ) + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" + + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then + # code is full of AC_TRY_RUN() + mkdir -p examples/rlfe || die + cd examples/rlfe || die + ECONF_SOURCE="${S}"/examples/rlfe \ + econf --cache-file="${BUILD_DIR}"/config.cache + fi +} + +multilib_src_compile() { + emake + + if use utils && multilib_is_native_abi && ! tc-is-cross-compiler ; then + # code is full of AC_TRY_RUN() + cd examples/rlfe || die + local l + for l in readline history ; do + ln -s ../../shlib/lib${l}$(get_libname)* lib${l}$(get_libname) || die + ln -s ../../lib${l}.a lib${l}.a || die + done + emake + fi +} + +multilib_src_install() { + default + + if multilib_is_native_abi ; then + gen_usr_ldscript -a readline history #4411 + + if use utils && ! tc-is-cross-compiler; then + dobin examples/rlfe/rlfe + fi + fi +} + +multilib_src_install_all() { + HTML_DOCS="doc/history.html doc/readline.html doc/rluserman.html" einstalldocs + dodoc USAGE + docinto ps + dodoc doc/*.ps +} +pkg_preinst() { + # bug #29865 + # Reappeared in #595324 with paludis so keeping this for now... + preserve_old_lib /$(get_libdir)/lib{history,readline}.so.{4,5,6,7} +} + +pkg_postinst() { + preserve_old_lib_notify /$(get_libdir)/lib{history,readline}.so.{4,5,6,7} +} diff --git a/sys-libs/tevent/Manifest b/sys-libs/tevent/Manifest index 1df78d2b8274..0ffad6687612 100644 --- a/sys-libs/tevent/Manifest +++ b/sys-libs/tevent/Manifest @@ -1,11 +1,11 @@ DIST tevent-0.10.0.tar.gz 794845 BLAKE2B 20ed607050b2d558a6ed1cc3b5c7993b711c06bc1eaab6f703db7677b61231d631d49cf82b7a687ae39a4999f4922df4feaecea3b43832983aede0414f316ed1 SHA512 1b55560f2355d98779087046e72528ef30cfbcaf86fc4ad443f405798badc0fc089c8c9ca1e30f90f88f503298c6b39ad968afb0cb088e6035de94d03b8e341f -DIST tevent-0.9.28.tar.gz 581522 BLAKE2B 95db3ed16b91673ee99fbf30d3c40dfceda080f428feb6b7bbebb0bfc4edc53a183affc8056d25fb05d11a37325b2854949ea5e2dcb170ad7c81e7a7bce62e11 SHA512 328d586a5891796a731e6f0d02e1a731d3541a977c16abca355359cd7f60bbdbb0baaad49c05eb42c3a44f97e57a775605974d22d46ca6c26f283c8ca1b5a909 +DIST tevent-0.10.1.tar.gz 804125 BLAKE2B bc124bbf509c0cbf148142ca26312fd74c3bae43792d772b9c21198951ade6740ebac7ca280b0e6aef39fdd4b362f3ac58bfe1610d30119cfff62de6dcd530c5 SHA512 204295672618b8d720743f1d388f9a2d591805c8ef36cdb7e9ae3aa824bc288dab64b336e6a5f5babe6214a993b1ad3d0faa9d8ec2b30a9b927b3ea68bc5fd52 DIST tevent-0.9.31.tar.gz 587784 BLAKE2B 0e562600ae8ba4dae194b1a28a020f5618b1566f65cf2b2f158cd44e6cb30c422086bd2ebfd65a03bc4d4b13de4ca833ff04ab1368255eb2181c148de3487214 SHA512 048e37a7f5d3b8e948215fdb909c9b6e94b915c9d4978a8e18c73c9d27d5b1f179c10d19ec90325f8250e7c177c28231ad116a2975caaa43312c383e75517258 DIST tevent-0.9.37.tar.gz 603859 BLAKE2B 2210416b09c3f83cf68a9f686d1d582891cd22b4547eb0e5237288dca6a0b94619769060c541e0cfc3ccce79246b1140875109934e009015b8e04a31a94d6792 SHA512 5d4833403e1c2f2749f00a389e4757261a4f22cd3a67c906001b36a8b622cc68a38e86d4eb475848a2121ebba054a7e7dac7f486d9f2906a401c3cc97fb447f4 DIST tevent-0.9.38.tar.gz 794856 BLAKE2B 1198de5e68cec39bac3931aa5c26ee26aa5fd713d9cbc72bd90d5dd9c787d617d17c57d8393a845800168452cd8092d38ddc480d3bbe176dfe364d6c9a211094 SHA512 f475a7b7c261368bd641992c8f657c081bbbe783535ff435a7b68f7749d0e5873d57d05cf6ce80a28ccc9f11033022d28e9ae357b03854109c2c279a003d2035 DIST tevent-0.9.39.tar.gz 795796 BLAKE2B a352d2730f4d480f18559ac01b82354914ebf3ced0438bc6813e8cddc8e2ac1a5bcd867a00441cf243753daa299b6e61ad6328d5e3f7370483f01d468d7e2621 SHA512 72f48493aa3ef2efb78fa4e8cbeca8a66871e6835b51307ce08864ed0a778ccfd5f62d6768099f06680915375ee78c3b889514e247bcfe797889f16388c321b0 EBUILD tevent-0.10.0.ebuild 1636 BLAKE2B 5eed3cacd8e082cb98cf8452f245d291c2977f341e9b4d0b0b149610bca5e9337a19dcb833104a2ce6aaef2755f95d667e6d9b3670c76a96a57c52a07062c96b SHA512 f40fe584cdd01e0ab5bef4a5a076501e5d5cf146a72e69a170aed48314c665a151ff6dc672b39fa86ca9f3b7c8a43ad288fa64cfdcb34fc27fcabda07a5dcd02 -EBUILD tevent-0.9.28.ebuild 1329 BLAKE2B c2318f7711e86a8aab8a4f535c7aff9d5c6d16c8716ac7010a830ec8f8765961832011eca0ca024da272201c90fdac9c618d08b16a037ce4a7693d2406f2e2a2 SHA512 f752b9ca75bb34dfa1a50d29e11e91bf4b022116c8f97e4b82c2830a26b0fe253f7fe51461302d42c22b511a2f78108bd5190c45811ffa19e0691087bb07f744 +EBUILD tevent-0.10.1.ebuild 1644 BLAKE2B d0de8b8684349f619323d32f5c0f8a2ef8c57c869a6c9f23486c143781923e1de90b7013628fea8f46ea8a4fdf1eacb98873a7653c1cceeae7920f96cbee356c SHA512 cff02dd77fd705d62f3c71684f73add8dad5185883b53104e7d80247047ada06a20fd9b2a78aff4ab54641c15d938c66acf070eb358c84f2262e4b35b986ddb8 EBUILD tevent-0.9.31-r1.ebuild 1408 BLAKE2B 078ae3d6da81680ecca2917150e204b0cb7714105325716cc8dedea420f9ab8d294840e9c7a589094782e459ae8d81c7004798eb4af7dbc4867ab4c51443f2c3 SHA512 af5e9cce3d24ed7c0849854e83beae321475a2a1cd0ab19816fe6dabd5257241a24714245b4a8f7460b94064cb63a0a3d5c54b5677921289864c522a036da1e4 EBUILD tevent-0.9.37.ebuild 1609 BLAKE2B 4e4068500bdceb6bea30f0a33bc3e70659798886dfdd78b92a011192fce34b8aea4b7c96bb18a080a8e44a773fb7241dbcd49c9ae460986c2c68e8d638807f85 SHA512 24f3374305dc70e31070bc3c8da181f1c96a0323f7baee96768372609b33e48eb27b16093bb58670743fdff280afae6e3841aa8840c8dc4e0dc48928d2b4bcfa EBUILD tevent-0.9.38.ebuild 1638 BLAKE2B d4140ad5ba3d525364fb3a137d427081ce88a81e59f0972b6836a48834fdafcb4b546fc4cd4367410bda8546c5b2be6a221be78e47d67bcc8ee119724599ff7f SHA512 9792166c117b0f1ee166598c34ffa2718b750f300f6dc06ae0309588b020570c5155cf2f317d7ea51e2cf4af524808bffa25b5fc7d54a79142a6fee77ca86434 diff --git a/sys-libs/tevent/tevent-0.10.1.ebuild b/sys-libs/tevent/tevent-0.10.1.ebuild new file mode 100644 index 000000000000..231bc3b04548 --- /dev/null +++ b/sys-libs/tevent/tevent-0.10.1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +PYTHON_COMPAT=( python3_{5,6,7} ) +PYTHON_REQ_USE="threads(+)" + +inherit waf-utils multilib-minimal python-single-r1 + +DESCRIPTION="Samba tevent library" +HOMEPAGE="https://tevent.samba.org/" +SRC_URI="https://www.samba.org/ftp/tevent/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~x86-linux" +IUSE="elibc_glibc python" + +RDEPEND="!elibc_FreeBSD? ( dev-libs/libbsd[${MULTILIB_USEDEP}] ) + >=sys-libs/talloc-2.2.0[${MULTILIB_USEDEP}] + python? ( ${PYTHON_DEPS} )" + +DEPEND="${RDEPEND} + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] + elibc_glibc? ( + net-libs/libtirpc[${MULTILIB_USEDEP}] + || ( + net-libs/rpcsvc-proto + "${c}.c" - if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then - LDLIBS+=" -lintl" - fi - fi -} - -_emake() { - emake \ - REDO=$(usex leaps-timezone posix_right posix_only) \ - TZDATA_TEXT= \ - TOPDIR="${EPREFIX}" \ - ZICDIR='$(TOPDIR)/usr/bin' \ - "$@" -} - -src_compile() { - _emake \ - AR="$(tc-getAR)" \ - cc="$(tc-getCC)" \ - RANLIB="$(tc-getRANLIB)" \ - CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" \ - LDLIBS="${LDLIBS}" - if tc-is-cross-compiler ; then - _emake -C "${S}"-native \ - AR="$(tc-getBUILD_AR)" \ - cc="$(tc-getBUILD_CC)" \ - RANLIB="$(tc-getBUILD_RANLIB)" \ - CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \ - LDFLAGS="${BUILD_LDFLAGS}" \ - LDLIBS="${LDLIBS}" \ - zic - fi -} - -src_test() { - # VALIDATE_ENV is used for extended/web based tests. Punt on them. - emake -j1 check VALIDATE_ENV=true -} - -src_install() { - local zic="" - tc-is-cross-compiler && zic="zic=${S}-native/zic" - _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit" - rm -rf "${D}/nukeit" "${ED}/etc" || die - - insinto /usr/share/zoneinfo - doins "${S}"/leap-seconds.list - - # Delete man pages installed by man-pages package. - rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die - dodoc CONTRIBUTING README NEWS *.html -} - -get_TIMEZONE() { - local tz src="${EROOT}etc/timezone" - if [[ -e ${src} ]] ; then - tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") - else - tz="FOOKABLOIE" - fi - [[ -z ${tz} ]] && return 1 || echo "${tz}" -} - -pkg_preinst() { - local tz=$(get_TIMEZONE) - if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then - eerror "The right & posix subdirs are no longer installed as subdirs -- they have been" - eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the" - eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not" - eerror "be using right/xxx for the system timezone as it breaks programs." - die "Please fix your timezone setting" - fi - - # Trim the symlink by hand to avoid portage's automatic protection checks. - rm -f "${EROOT}"/usr/share/zoneinfo/posix - - if has_version "<=${CATEGORY}/${PN}-2015c" ; then - elog "Support for accessing posix/ and right/ directly has been dropped to match" - elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx." - elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post" - elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html" - fi -} - -configure_tz_data() { - # make sure the /etc/localtime file does not get stale #127899 - local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime" - - # If it's a symlink, assume the user knows what they're doing and - # they're managing it themselves. #511474 - if [[ -L ${etc_lt} ]] ; then - einfo "Assuming your ${etc_lt} symlink is what you want; skipping update." - return 0 - fi - - if ! tz=$(get_TIMEZONE) ; then - einfo "Assuming your empty ${etc_lt} file is what you want; skipping update." - return 0 - fi - if [[ ${tz} == "FOOKABLOIE" ]] ; then - elog "You do not have TIMEZONE set in ${src}." - - if [[ ! -e ${etc_lt} ]] ; then - cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}" - elog "Setting ${etc_lt} to Factory." - else - elog "Skipping auto-update of ${etc_lt}." - fi - return 0 - fi - - if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then - elog "You have an invalid TIMEZONE setting in ${src}" - elog "Your ${etc_lt} has been reset to Factory; enjoy!" - tz="Factory" - fi - einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}" - cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}" -} - -pkg_config() { - configure_tz_data -} - -pkg_postinst() { - configure_tz_data -} diff --git a/sys-libs/timezone-data/timezone-data-2019a.ebuild b/sys-libs/timezone-data/timezone-data-2019a.ebuild deleted file mode 100644 index 5833d2e70930..000000000000 --- a/sys-libs/timezone-data/timezone-data-2019a.ebuild +++ /dev/null @@ -1,178 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit toolchain-funcs flag-o-matic - -code_ver=${PV} -data_ver=${PV} -DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)" -HOMEPAGE="https://www.iana.org/time-zones" -SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz - https://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz" - -LICENSE="BSD public-domain" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" -IUSE="nls leaps-timezone elibc_FreeBSD" - -DEPEND="nls? ( virtual/libintl )" -RDEPEND="${DEPEND} - !sys-libs/glibc[vanilla(+)]" - -S=${WORKDIR} - -src_prepare() { - default - - # check_web contacts validator.w3.org - sed -i -e 's/check_tables check_web/check_tables/g' \ - Makefile || die "Failed to disable check_web" - - tc-is-cross-compiler && cp -pR "${S}" "${S}"-native -} - -src_configure() { - tc-export CC - - append-lfs-flags #471102 - - if use elibc_FreeBSD || use elibc_Darwin ; then - append-cppflags -DSTD_INSPIRED #138251 - fi - - append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"' - LDLIBS="" - if use nls ; then - # See if an external libintl is available. #154181 #578424 - local c="${T}/test" - echo 'main(){}' > "${c}.c" - if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then - LDLIBS+=" -lintl" - fi - fi -} - -_emake() { - emake \ - REDO=$(usex leaps-timezone posix_right posix_only) \ - TZDATA_TEXT= \ - TOPDIR="${EPREFIX}" \ - ZICDIR='$(TOPDIR)/usr/bin' \ - "$@" -} - -src_compile() { - _emake \ - AR="$(tc-getAR)" \ - cc="$(tc-getCC)" \ - RANLIB="$(tc-getRANLIB)" \ - CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" \ - LDLIBS="${LDLIBS}" - if tc-is-cross-compiler ; then - _emake -C "${S}"-native \ - AR="$(tc-getBUILD_AR)" \ - cc="$(tc-getBUILD_CC)" \ - RANLIB="$(tc-getBUILD_RANLIB)" \ - CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \ - LDFLAGS="${BUILD_LDFLAGS}" \ - LDLIBS="${LDLIBS}" \ - zic - fi -} - -src_test() { - # VALIDATE_ENV is used for extended/web based tests. Punt on them. - emake -j1 check VALIDATE_ENV=true -} - -src_install() { - local zic="" - tc-is-cross-compiler && zic="zic=${S}-native/zic" - _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit" - rm -rf "${D}/nukeit" "${ED}/etc" || die - - insinto /usr/share/zoneinfo - doins "${S}"/leap-seconds.list - - # Delete man pages installed by man-pages package. - rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die - dodoc CONTRIBUTING README NEWS *.html -} - -get_TIMEZONE() { - local tz src="${EROOT}etc/timezone" - if [[ -e ${src} ]] ; then - tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") - else - tz="FOOKABLOIE" - fi - [[ -z ${tz} ]] && return 1 || echo "${tz}" -} - -pkg_preinst() { - local tz=$(get_TIMEZONE) - if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then - eerror "The right & posix subdirs are no longer installed as subdirs -- they have been" - eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the" - eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not" - eerror "be using right/xxx for the system timezone as it breaks programs." - die "Please fix your timezone setting" - fi - - # Trim the symlink by hand to avoid portage's automatic protection checks. - rm -f "${EROOT}"/usr/share/zoneinfo/posix - - if has_version "<=${CATEGORY}/${PN}-2015c" ; then - elog "Support for accessing posix/ and right/ directly has been dropped to match" - elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx." - elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post" - elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html" - fi -} - -configure_tz_data() { - # make sure the /etc/localtime file does not get stale #127899 - local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime" - - # If it's a symlink, assume the user knows what they're doing and - # they're managing it themselves. #511474 - if [[ -L ${etc_lt} ]] ; then - einfo "Assuming your ${etc_lt} symlink is what you want; skipping update." - return 0 - fi - - if ! tz=$(get_TIMEZONE) ; then - einfo "Assuming your empty ${etc_lt} file is what you want; skipping update." - return 0 - fi - if [[ ${tz} == "FOOKABLOIE" ]] ; then - elog "You do not have TIMEZONE set in ${src}." - - if [[ ! -e ${etc_lt} ]] ; then - cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}" - elog "Setting ${etc_lt} to Factory." - else - elog "Skipping auto-update of ${etc_lt}." - fi - return 0 - fi - - if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then - elog "You have an invalid TIMEZONE setting in ${src}" - elog "Your ${etc_lt} has been reset to Factory; enjoy!" - tz="Factory" - fi - einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}" - cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}" -} - -pkg_config() { - configure_tz_data -} - -pkg_postinst() { - configure_tz_data -} diff --git a/sys-libs/timezone-data/timezone-data-2019b-r1.ebuild b/sys-libs/timezone-data/timezone-data-2019b-r1.ebuild deleted file mode 100644 index b108efea881f..000000000000 --- a/sys-libs/timezone-data/timezone-data-2019b-r1.ebuild +++ /dev/null @@ -1,178 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="7" - -inherit toolchain-funcs flag-o-matic - -code_ver=${PV} -data_ver=${PV} -DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)" -HOMEPAGE="https://www.iana.org/time-zones" -SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz - https://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz" - -LICENSE="BSD public-domain" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" -IUSE="nls leaps-timezone elibc_FreeBSD" - -DEPEND="nls? ( virtual/libintl )" -RDEPEND="${DEPEND} - !sys-libs/glibc[vanilla(+)]" - -S=${WORKDIR} - -src_prepare() { - default - - # check_web contacts validator.w3.org - sed -i -e 's/check_tables check_web/check_tables/g' \ - Makefile || die "Failed to disable check_web" - - tc-is-cross-compiler && cp -pR "${S}" "${S}"-native -} - -src_configure() { - tc-export CC - - append-lfs-flags #471102 - - if use elibc_FreeBSD || use elibc_Darwin ; then - append-cppflags -DSTD_INSPIRED #138251 - fi - - append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"' - LDLIBS="" - if use nls ; then - # See if an external libintl is available. #154181 #578424 - local c="${T}/test" - echo 'main(){}' > "${c}.c" - if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then - LDLIBS+=" -lintl" - fi - fi -} - -_emake() { - emake \ - REDO=$(usex leaps-timezone posix_right posix_only) \ - TZDATA_TEXT= \ - TOPDIR="${EPREFIX}" \ - ZICDIR='$(TOPDIR)/usr/bin' \ - "$@" -} - -src_compile() { - _emake \ - AR="$(tc-getAR)" \ - cc="$(tc-getCC)" \ - RANLIB="$(tc-getRANLIB)" \ - CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \ - LDFLAGS="${LDFLAGS}" \ - LDLIBS="${LDLIBS}" - if tc-is-cross-compiler ; then - _emake -C "${S}"-native \ - AR="$(tc-getBUILD_AR)" \ - cc="$(tc-getBUILD_CC)" \ - RANLIB="$(tc-getBUILD_RANLIB)" \ - CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \ - LDFLAGS="${BUILD_LDFLAGS}" \ - LDLIBS="${LDLIBS}" \ - zic - fi -} - -src_test() { - # VALIDATE_ENV is used for extended/web based tests. Punt on them. - emake -j1 check VALIDATE_ENV=true -} - -src_install() { - local zic="" - tc-is-cross-compiler && zic="zic=${S}-native/zic" - _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit" - rm -rf "${D}/nukeit" "${ED}/etc" || die - - insinto /usr/share/zoneinfo - doins "${S}"/leap-seconds.list - - # Delete man pages installed by man-pages package. - rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die - dodoc CONTRIBUTING README NEWS *.html -} - -get_TIMEZONE() { - local tz src="${EROOT}/etc/timezone" - if [[ -e ${src} ]] ; then - tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") - else - tz="FOOKABLOIE" - fi - [[ -z ${tz} ]] && return 1 || echo "${tz}" -} - -pkg_preinst() { - local tz=$(get_TIMEZONE) - if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then - eerror "The right & posix subdirs are no longer installed as subdirs -- they have been" - eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the" - eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not" - eerror "be using right/xxx for the system timezone as it breaks programs." - die "Please fix your timezone setting" - fi - - # Trim the symlink by hand to avoid portage's automatic protection checks. - rm -f "${EROOT}"/usr/share/zoneinfo/posix - - if has_version "<=${CATEGORY}/${PN}-2015c" ; then - elog "Support for accessing posix/ and right/ directly has been dropped to match" - elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx." - elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post" - elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html" - fi -} - -configure_tz_data() { - # make sure the /etc/localtime file does not get stale #127899 - local tz src="${EROOT}/etc/timezone" etc_lt="${EROOT}/etc/localtime" - - # If it's a symlink, assume the user knows what they're doing and - # they're managing it themselves. #511474 - if [[ -L "${etc_lt}" ]] ; then - einfo "Assuming your ${etc_lt} symlink is what you want; skipping update." - return 0 - fi - - if ! tz=$(get_TIMEZONE) ; then - einfo "Assuming your empty ${etc_lt} file is what you want; skipping update." - return 0 - fi - if [[ "${tz}" == "FOOKABLOIE" ]] ; then - elog "You do not have TIMEZONE set in ${src}." - - if [[ ! -e "${etc_lt}" ]] ; then - cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}" - elog "Setting ${etc_lt} to Factory." - else - elog "Skipping auto-update of ${etc_lt}." - fi - return 0 - fi - - if [[ ! -e "${EROOT}/usr/share/zoneinfo/${tz}" ]] ; then - elog "You have an invalid TIMEZONE setting in ${src}" - elog "Your ${etc_lt} has been reset to Factory; enjoy!" - tz="Factory" - fi - einfo "Updating ${etc_lt} with ${EROOT}/usr/share/zoneinfo/${tz}" - cp -f "${EROOT}/usr/share/zoneinfo/${tz}" "${etc_lt}" -} - -pkg_config() { - configure_tz_data -} - -pkg_postinst() { - configure_tz_data -} diff --git a/sys-libs/timezone-data/timezone-data-2019b-r2.ebuild b/sys-libs/timezone-data/timezone-data-2019b-r2.ebuild index e1f454ccb948..7d7b49503a9c 100644 --- a/sys-libs/timezone-data/timezone-data-2019b-r2.ebuild +++ b/sys-libs/timezone-data/timezone-data-2019b-r2.ebuild @@ -14,7 +14,7 @@ SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.t LICENSE="BSD public-domain" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" IUSE="nls leaps-timezone elibc_FreeBSD" DEPEND="nls? ( virtual/libintl )" diff --git a/sys-libs/timezone-data/timezone-data-2019c.ebuild b/sys-libs/timezone-data/timezone-data-2019c.ebuild new file mode 100644 index 000000000000..7d7b49503a9c --- /dev/null +++ b/sys-libs/timezone-data/timezone-data-2019c.ebuild @@ -0,0 +1,178 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit toolchain-funcs flag-o-matic + +code_ver=${PV} +data_ver=${PV} +DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)" +HOMEPAGE="https://www.iana.org/time-zones" +SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz + https://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz" + +LICENSE="BSD public-domain" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 ~riscv s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" +IUSE="nls leaps-timezone elibc_FreeBSD" + +DEPEND="nls? ( virtual/libintl )" +RDEPEND="${DEPEND} + !sys-libs/glibc[vanilla(+)]" + +S=${WORKDIR} + +src_prepare() { + default + + # check_web contacts validator.w3.org + sed -i -e 's/check_tables check_web/check_tables/g' \ + Makefile || die "Failed to disable check_web" + + tc-is-cross-compiler && cp -pR "${S}" "${S}"-native +} + +src_configure() { + tc-export CC + + append-lfs-flags #471102 + + if use elibc_FreeBSD || use elibc_Darwin ; then + append-cppflags -DSTD_INSPIRED #138251 + fi + + append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"' + LDLIBS="" + if use nls ; then + # See if an external libintl is available. #154181 #578424 + local c="${T}/test" + echo 'main(){}' > "${c}.c" + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then + LDLIBS+=" -lintl" + fi + fi +} + +_emake() { + emake \ + REDO=$(usex leaps-timezone posix_right posix_only) \ + TZDATA_TEXT= \ + TOPDIR="${EPREFIX}" \ + ZICDIR='$(TOPDIR)/usr/bin' \ + "$@" +} + +src_compile() { + _emake \ + AR="$(tc-getAR)" \ + cc="$(tc-getCC)" \ + RANLIB="$(tc-getRANLIB)" \ + CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \ + LDFLAGS="${LDFLAGS}" \ + LDLIBS="${LDLIBS}" + if tc-is-cross-compiler ; then + _emake -C "${S}"-native \ + AR="$(tc-getBUILD_AR)" \ + cc="$(tc-getBUILD_CC)" \ + RANLIB="$(tc-getBUILD_RANLIB)" \ + CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \ + LDFLAGS="${BUILD_LDFLAGS}" \ + LDLIBS="${LDLIBS}" \ + zic + fi +} + +src_test() { + # VALIDATE_ENV is used for extended/web based tests. Punt on them. + emake check VALIDATE_ENV=true +} + +src_install() { + local zic="" + tc-is-cross-compiler && zic="zic=${S}-native/zic" + _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit" + rm -rf "${D}/nukeit" "${ED}/etc" || die + + insinto /usr/share/zoneinfo + doins "${S}"/leap-seconds.list + + # Delete man pages installed by man-pages package. + rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die + dodoc CONTRIBUTING README NEWS *.html +} + +get_TIMEZONE() { + local tz src="${EROOT}/etc/timezone" + if [[ -e ${src} ]] ; then + tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") + else + tz="FOOKABLOIE" + fi + [[ -z ${tz} ]] && return 1 || echo "${tz}" +} + +pkg_preinst() { + local tz=$(get_TIMEZONE) + if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then + eerror "The right & posix subdirs are no longer installed as subdirs -- they have been" + eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the" + eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not" + eerror "be using right/xxx for the system timezone as it breaks programs." + die "Please fix your timezone setting" + fi + + # Trim the symlink by hand to avoid portage's automatic protection checks. + rm -f "${EROOT}"/usr/share/zoneinfo/posix + + if has_version "<=${CATEGORY}/${PN}-2015c" ; then + elog "Support for accessing posix/ and right/ directly has been dropped to match" + elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx." + elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post" + elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html" + fi +} + +configure_tz_data() { + # make sure the /etc/localtime file does not get stale #127899 + local tz src="${EROOT}/etc/timezone" etc_lt="${EROOT}/etc/localtime" + + # If it's a symlink, assume the user knows what they're doing and + # they're managing it themselves. #511474 + if [[ -L "${etc_lt}" ]] ; then + einfo "Assuming your ${etc_lt} symlink is what you want; skipping update." + return 0 + fi + + if ! tz=$(get_TIMEZONE) ; then + einfo "Assuming your empty ${etc_lt} file is what you want; skipping update." + return 0 + fi + if [[ "${tz}" == "FOOKABLOIE" ]] ; then + elog "You do not have TIMEZONE set in ${src}." + + if [[ ! -e "${etc_lt}" ]] ; then + cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}" + elog "Setting ${etc_lt} to Factory." + else + elog "Skipping auto-update of ${etc_lt}." + fi + return 0 + fi + + if [[ ! -e "${EROOT}/usr/share/zoneinfo/${tz}" ]] ; then + elog "You have an invalid TIMEZONE setting in ${src}" + elog "Your ${etc_lt} has been reset to Factory; enjoy!" + tz="Factory" + fi + einfo "Updating ${etc_lt} with ${EROOT}/usr/share/zoneinfo/${tz}" + cp -f "${EROOT}/usr/share/zoneinfo/${tz}" "${etc_lt}" +} + +pkg_config() { + configure_tz_data +} + +pkg_postinst() { + configure_tz_data +} diff --git a/sys-libs/uclibc-ng/Manifest b/sys-libs/uclibc-ng/Manifest index e6b6d34b2b2b..b3cfe4932d33 100644 --- a/sys-libs/uclibc-ng/Manifest +++ b/sys-libs/uclibc-ng/Manifest @@ -1,10 +1,8 @@ AUX uclibc-compat-r1.patch 814 BLAKE2B 75fe9c5321171f3e378200e1c4d11792b3ea047fb4e62460cfd03db1fc761a7e711565ba97afd507a5996d3adbe83e08152a28464310098599867bcc642c1c53 SHA512 35eedbf33282285ae362a6e1b71f91a19ded8b18792f706b3d7e9c68221a61db238d84772a793cf086001272eda1b227043b90e8ef31c27796ffe837ccad11d0 AUX uclibc-ng-1.0.30-fix-ld.so.cache.patch 1515 BLAKE2B 20f317c623cf66f8351915636d5f01bee669db9ec83824ac5b95792c82c60e3c9ce8926cec48a0d93482b6d8ef8f42dce4e8338807bba2a88ac7654615ab50b2 SHA512 96a4b8621b17e93d4d7c019244b0e4854f8c496b43db617f238a087f7db1380b7968d7143fa6516b014fa20c113e6d59686a605914bb29be1680132ee6f0fc84 -DIST uClibc-ng-1.0.26.tar.bz2 2285709 BLAKE2B 6276f1d080f0c90b5a0ce4a4fc3556070852ad157b9c0a15305108b2f46a2d0f5371dde12ac0a8f05cad7db942cceb8057b5ef351e100a52609f2ebdc6b19634 SHA512 48c37ab2000af13848ef007ce89f226bded5188f37839c11371bab48497670d30d39fda2a031c6aff95f429a4abadc431ddd77c0e023810a341e2c2d2645f71b -DIST uClibc-ng-1.0.30.tar.bz2 2302796 BLAKE2B 21888dfe5a68f83b7ba56bb557ecc5aa19fd75cedc82f2ed48073f47655888719feb27943e0309f8101a24fd2fd9165af31d5679f21c00b12f27ebfccf354bac SHA512 ddd1d91dcfdf7be8471afecf13196563ad348c41e2fa8b63ae50b83f103cf8ed8d9f003b51a54a58db2935b84692b7c011a4779582f30610ede44cb583aae742 DIST uClibc-ng-1.0.31.tar.bz2 2351728 BLAKE2B e2cad8500fdafdd98db11cbc756f3277845fedf545598c9861b1d1ef51b3a24744afe635d6894929eb537891323b0627577c2a5e5dbe1ff0ae588c5aa53a1219 SHA512 489e5f5e8952ebfad1d8a5528a04420d9d2e58fa5092029ccdae91d81dfcf8b3e00092453432da94c76fc18cab542192040bfb271e367fa42ca4926f4b45c372 -EBUILD uclibc-ng-1.0.26.ebuild 10566 BLAKE2B e4eed2c8c9ddfd1f179ac728382eaa4ab588f7117b6dc5337384dcaad58d2decce86c33ad21c02f87547979a35a374497492c3ff2740812788cc2eefc6c24583 SHA512 80db8406a40e370aeb73ab25dbe2b2bb5d5c3d32353eb37fd8f50a00e81bae42ed4ad0fd0aabfef2c519e8e588f8e44b51c69ab9c6c4b0990816b211e45f227d -EBUILD uclibc-ng-1.0.30-r1.ebuild 10401 BLAKE2B 0cf25aca41d018074ab302257bae0cdb8365663919a19b1965b015e5c16002a5b31117cc85cb48db5278e149f456bc92dbaf4085250a3d632fbb0a5d82f8c3a9 SHA512 ca9df3d760beb48446d066f30467fe0885703fd62df30be50f7660d77b9a8143da30ba18feff4dc6f06380f6e1e5c57bfd8d8e2a35f07adfbfa0d638a7e1993e +DIST uClibc-ng-1.0.32.tar.bz2 2352471 BLAKE2B 887b67f7f03fc8610d8236a18f90584720a78bfc3a036cd6616453bea6e31140f5fd1dfd1d207cc5100854bf3e0c5cc1ca38fe6c31cf97b631892767ae23ec27 SHA512 1de5d4e99b94eeeada4233c53a95ea1b9e704ce1d4aa19ca9b17535c0328b2372ed93d24591c6ea5bfbc0b950aa575c18dcf6950fb04342924bb2b5f9ee235e8 EBUILD uclibc-ng-1.0.31.ebuild 10319 BLAKE2B f06b14a05e153bb1572bf6b408f93901cf58c44e4dbbbb98dc86ddc9d21f9f190932e996f89238db713214eeac07ec6cf63a153c7f0df56716349345b24479bd SHA512 fb4f76a5621e6ec1b0844e9e443efc26bfea75c3c60b4f3cc1fd2333e7b3e8dd5f3f00480741431aee98c489254f5111d2d9498d9c60f2c405f5eb3a2000e76e +EBUILD uclibc-ng-1.0.32.ebuild 10339 BLAKE2B b8a3be57d16d1e6e591364bc109c6ffd72a17c7399faeb23a660fb8e59a610ad7a6e3ba12e23474d5e8a8164ee30364e6530a26a953ef2186ef977751683ae0d SHA512 746608cba2e02e105286b96cfcac46e36b2726bbb087cfa08802caea9bde74db72d231854ea7d6398520083ea0a2319c97ff80f580feca8e60ad0e3c9cabc1e5 EBUILD uclibc-ng-9999.ebuild 10339 BLAKE2B 57a5c4ad7b5d6aee65872bde3af3712826ae910631b44606454e66de69dca49aa7339746929e1bbcb0cc67de1bb72fc0e4c8e8042e85be27464d3b7f61ee838e SHA512 db0ca38f425b956ce02b9a43202f19d8ec3ea16c303ddc31b7982f7617005cade3406af666506a320332a9fc5c4e2d07b1bbdefa836a78d8684b7231e1b30565 -MISC metadata.xml 876 BLAKE2B 218d9d733d3e7a5e29f514e4ac5e46e2a208b76f705d4825b3abe86594e262ec9722bc62df25bd848ef99fa2256d119627d9c9391e66df46f526b60e702f4eab SHA512 b7f00ea703e46028b1be735f0b713a0494f2a8459df0fb8be8c7b35b163cddb399df8a2c18b5f7864e6c4736822914bce40cdcabe44a0172ab1b2abb2474275b +MISC metadata.xml 790 BLAKE2B b48396e1f8dca79f2b9e452982007573959e89ab8467e2c0d65863a0c00dee140f9a7a5a4f02c916da76018dacdcd9993434c30ba0a511888248f83a9c063e7f SHA512 a8e955511974be64f2360c16a883eec4b9450eebb393bee5f97b50e233275de1cce62e2ef3b9945174a9dca19a7f30aaab6e90c5c28f283c378709eb3fab3ac4 diff --git a/sys-libs/uclibc-ng/metadata.xml b/sys-libs/uclibc-ng/metadata.xml index 12420ae8d3b1..a06e85b43685 100644 --- a/sys-libs/uclibc-ng/metadata.xml +++ b/sys-libs/uclibc-ng/metadata.xml @@ -15,7 +15,6 @@ also work perfectly with uClibc-ng. - Enable sun nis/rpc support (you should use libtirpc though) Explicitly add sym links for libdl.so.0, libm.so.0, and friends for backward compatibility with sys-libs/uclibc-ng-1.0.17 and earlier diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.26.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.26.ebuild deleted file mode 100644 index 572b3800cec8..000000000000 --- a/sys-libs/uclibc-ng/uclibc-ng-1.0.26.ebuild +++ /dev/null @@ -1,411 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit flag-o-matic multilib savedconfig toolchain-funcs versionator - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng" - inherit git-r3 - MY_P=uclibc-ng-${PV} -else - MY_P=uClibc-ng-${PV} -fi - -DESCRIPTION="C library for developing embedded Linux systems" -HOMEPAGE="https://uclibc-ng.org/" -if [[ ${PV} != "9999" ]] ; then - PATCH_VER="" - SRC_URI="https://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2" - KEYWORDS="-* amd64 arm ~mips ~ppc x86" -fi - -LICENSE="LGPL-2" -SLOT="0" -IUSE="debug hardened iconv ipv6 rpc symlink-compat headers-only" -# tests fail due to unusual makefile -RESTRICT="strip test" - -# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage -# will delete the ld.so sym link prematurely and break the system. So we -# will hard block and give manual migration instructions. -# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using -# the breakout library. The disadvantage here is that we have to sprinkle -# LDFAGS=-liconv on build systems that need to link against libiconv. -RDEPEND=" - !!sys-libs/uclibc - iconv? ( dev-libs/libiconv )" - -S=${WORKDIR}/${MY_P} - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CHOST} == ${CTARGET} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} - -alt_build_kprefix() { - if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then - echo /usr/include - else - echo /usr/${CTARGET}/usr/include - fi -} - -just_headers() { - use headers-only && is_crosscompile -} - -uclibc_endian() { - # XXX: this wont work for a toolchain which is bi-endian, but we - # dont have any such thing at the moment, so not a big deal - touch "${T}"/endian.s - $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o - case $(file "${T}"/endian.o) in - *" MSB "*) echo "BIG";; - *" LSB "*) echo "LITTLE";; - *) echo "NFC";; - esac - rm -f "${T}"/endian.{s,o} -} - -kconfig_q_opt() { - local flag=$1; shift - case ${flag} in - y|n) ;; - *) flag=$(usex ${flag} y n) ;; - esac - - local var="defs_${flag}" - eval "${var}+=( $* )" -} - -get_opt() { - ( - unset ${1} - . ${2:-"${S}"/.config} - echo ${!1} - ) -} - -make_oldconfig() { - yes "" 2>/dev/null | emake -s oldconfig >/dev/null -} - -make_config() { - restore_config .config - if [ -f .config ]; then - make_oldconfig - return 0 - else - ewarn "Could not locate user configfile, so we will save a default one" - fi - - emake ARCH=$1 defconfig >/dev/null - - local defs_{y,n} - - # These are forced off - defs_n=( - DOASSERTS - DODEBUG_PT - HAS_NO_THREADS - PROPOLICE_BLOCK_ABRT - SSP_QUICK_CANARY - SUPPORT_LD_DEBUG_EARLY - UCLIBC_HAS_CTYPE_UNSAFE - UCLIBC_HAS_LOCALE - UCLIBC_HAS_SSP_COMPAT - ) - - # These are forced on - defs_y=( - COMPAT_ATEXIT - DO_C99_MATH - DO_XSI_MATH - FORCE_SHAREABLE_TEXT_SEGMENTS - LDSO_GNU_HASH_SUPPORT - LDSO_PRELINK_SUPPORT - LDSO_PRELOAD_FILE_SUPPORT - LDSO_RUNPATH_OF_EXECUTABLE - LDSO_STANDALONE_SUPPORT - MALLOC_GLIBC_COMPAT - PROPOLICE_BLOCK_SEGV - PTHREADS_DEBUG_SUPPORT - UCLIBC_HAS_ARC4RANDOM - UCLIBC_HAS_BACKTRACE - UCLIBC_HAS_BSD_RES_CLOSE - UCLIBC_HAS_CONTEXT_FUNCS - UCLIBC_HAS_CTYPE_CHECKED - UCLIBC_HAS_EXTRA_COMPAT_RES_STATE - UCLIBC_HAS_FENV - UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE - UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE - UCLIBC_HAS_FOPEN_LARGEFILE_MODE - UCLIBC_HAS_FTS - UCLIBC_HAS_FTW - UCLIBC_HAS_GETPT - UCLIBC_HAS_GLIBC_CUSTOM_PRINTF - UCLIBC_HAS_GLIBC_CUSTOM_STREAMS - UCLIBC_HAS_GNU_GLOB - UCLIBC_HAS_HEXADECIMAL_FLOATS - UCLIBC_HAS_LIBNSL_STUB - UCLIBC_HAS_LIBRESOLV_STUB - UCLIBC_HAS_LIBUTIL - UCLIBC_HAS_NFTW - UCLIBC_HAS_OBSOLETE_BSD_SIGNAL - UCLIBC_HAS_OBSTACK - UCLIBC_HAS_PRINTF_M_SPEC - UCLIBC_HAS_PROGRAM_INVOCATION_NAME - UCLIBC_HAS_RESOLVER_SUPPORT - UCLIBC_HAS_SHA256_CRYPT_IMPL - UCLIBC_HAS_SHA512_CRYPT_IMPL - UCLIBC_HAS_SSP - UCLIBC_HAS_STUBS - UCLIBC_HAS_SYS_ERRLIST - UCLIBC_HAS_SYS_SIGLIST - UCLIBC_HAS_THREADS_NATIVE - UCLIBC_HAS_TZ_FILE_READ_MANY - UCLIBC_HAS_UTMP - UCLIBC_HAS_UTMPX - UCLIBC_HAS_WCHAR - UCLIBC_HAS_WORDEXP - UCLIBC_NTP_LEGACY - UCLIBC_SUPPORT_AI_ADDRCONFIG - UCLIBC_SUSV2_LEGACY - UCLIBC_SUSV3_LEGACY - UCLIBC_SUSV3_LEGACY_MACROS - UCLIBC_SUSV4_LEGACY - UCLIBC_USE_NETLINK - ) - - sed -i -e '/ARCH_.*_ENDIAN/d' .config - kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN" - - kconfig_q_opt debug DODEBUG - kconfig_q_opt debug SUPPORT_LD_DEBUG - kconfig_q_opt debug UCLIBC_HAS_PROFILING - - kconfig_q_opt ipv6 UCLIBC_HAS_IPV6 - - kconfig_q_opt rpc UCLIBC_HAS_RPC - kconfig_q_opt rpc UCLIBC_HAS_FULL_RPC - kconfig_q_opt rpc UCLIBC_HAS_REENTRANT_RPC - - kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK - kconfig_q_opt hardened UCLIBC_BUILD_NOW - kconfig_q_opt hardened UCLIBC_BUILD_PIE - kconfig_q_opt hardened UCLIBC_BUILD_RELRO - kconfig_q_opt hardened UCLIBC_BUILD_SSP - - local count def - for count in 1 2 ; do - # Run twice as some config opts depend on others being enabled first. - for def in ${defs_y[@]} ; do - sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config - done - for def in ${defs_n[@]} ; do - sed -i -e "s|${def}=y|# ${def} is not set|g" .config - done - make_oldconfig - done - - einfo "Enabled options:" - for def in ${defs_y[@]} ; do - einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}") - done - einfo "Disabled options:" - for def in ${defs_n[@]} ; do - einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}") - done - - # setup build and run paths - sed -i \ - -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \ - -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \ - -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \ - -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \ - -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \ - -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \ - .config || die - - make_oldconfig -} - -pkg_setup() { - # Make sure our CHOST is a uclibc toolchain for native compiling - if [[ ${CHOST} == ${CTARGET} ]]; then - case ${CHOST} in - *-uclinux*|*-uclibc*) ;; - *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;; - esac - fi - - # uClibc-ng doesn't carry old Linux threads, and since we force - # threading our only choice is NPTL which requires i486 and later. - [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)." -} - -src_prepare() { - local version subversion extraversion - - # uclibc-ng tries to create a two sym link with ld.so, - # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-.so - # where MAJOR_VERSION != 0 indicates the ABI verison. - # We want to get rid of this and just have ABI = 0. - eapply "${FILESDIR}"/uclibc-compat-r1.patch - - # We need to change the major.minor.sublevel of uclibc-ng. - # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking. - # If we really want the ABI bump, we'll have to hack the gcc - # spec file and change the '*link:' rule. - version=( $(get_version_components) ) - if [[ -z ${version[1]} ]]; then - subversion=0 - extraversion=0 - else - subversion=${version[1]} - if [[ -z ${version[2]} ]]; then - extraversion=0 - else - extraversion=.${version[2]} - fi - fi - - sed -i \ - -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \ - -e "/^MINOR_VERSION/s|:=.*|:= ${version[0]}|" \ - -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \ - -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \ - Rules.mak || die - - eapply_user -} - -src_configure() { - # Map our toolchain arch name to the name expected by uClibc-ng. - local target=$(tc-arch) - case ${target} in - amd64) target="x86_64";; - arm) target="arm";; - mips) target="mips";; - ppc) target="powerpc";; - x86) target="i386";; - esac - - # Do arch specific configuration by changing the defaults in - # extra/Configs/Config.. If these are not overridden - # by an save .config, they will be selected by default. - - # For i386, i486, i586 and i686 - local cpu - if [[ ${target} == "i386" ]]; then - [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86" - sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \ - extra/Configs/Config.i386 || die - fi - - # For arm - if [[ ${target} == "arm" ]]; then - sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm - fi - - # We set HOSTCC to the proper tuple rather than just 'gcc' - sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak - - make_config ${target} - - einfo - einfo "Runtime Prefix: /" - einfo "Devel Prefix: /usr" - einfo "Kernel Prefix: $(alt_build_kprefix)" - einfo "CBUILD: ${CBUILD}" - einfo "CHOST: ${CHOST}" - einfo "CTARGET: ${CTARGET}" - einfo "ABI: ${ABI}" - einfo "ENDIAN: $(uclibc_endian)" - einfo -} - -src_compile() { - emake headers - just_headers && return 0 - - emake - if is_crosscompile ; then - emake -C utils hostutils - else - emake utils - fi -} - -src_test() { - is_crosscompile && return 0 - - # assert test fails on pax/grsec enabled kernels - # normal vfork test fails in sandbox (both glibc/uclibc) - emake UCLIBC_ONLY=1 check -} - -src_install() { - local sysroot=${D} - is_crosscompile && sysroot+="/usr/${CTARGET}" - - local target="install" - just_headers && target="install_headers" - emake DESTDIR="${sysroot}" ${target} - - save_config .config - - # remove files coming from kernel-headers - rm -rf "${sysroot}"/usr/include/{linux,asm*} - - # 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 - if is_crosscompile ; then - dosym usr/include /usr/${CTARGET}/sys-include - if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then - newbin utils/ldconfig.host ${CTARGET}-ldconfig - newbin utils/ldd.host ${CTARGET}-ldd - fi - return 0 - fi - - if use symlink-compat; then - dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0 - fi - - emake DESTDIR="${D}" install_utils - dobin extra/scripts/getent - dodoc README docs/*.txt -} - -pkg_postinst() { - is_crosscompile && return 0 - - if [ ! -e "${ROOT}"/etc/TZ ] ; then - ewarn "Please remember to set your timezone in /etc/TZ" - mkdir -p "${ROOT}"/etc - echo "UTC" > "${ROOT}"/etc/TZ - fi - [ "${ROOT}" != "/" ] && return 0 - # update cache before reloading init - ldconfig - # reload init ... - /sbin/telinit U 2>/dev/null -} diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.30-r1.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.30-r1.ebuild deleted file mode 100644 index c7b7bac0f3ee..000000000000 --- a/sys-libs/uclibc-ng/uclibc-ng-1.0.30-r1.ebuild +++ /dev/null @@ -1,405 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit flag-o-matic multilib savedconfig toolchain-funcs versionator - -if [[ ${PV} == "9999" ]] ; then - EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng" - inherit git-r3 - MY_P=uclibc-ng-${PV} -else - MY_P=uClibc-ng-${PV} -fi - -DESCRIPTION="C library for developing embedded Linux systems" -HOMEPAGE="https://uclibc-ng.org/" -if [[ ${PV} != "9999" ]] ; then - PATCH_VER="" - SRC_URI="https://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2" - KEYWORDS="-* amd64 arm ~mips ppc x86" -fi - -LICENSE="LGPL-2" -SLOT="0" -IUSE="debug hardened iconv ipv6 symlink-compat headers-only" -# tests fail due to unusual makefile -RESTRICT="strip test" - -# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage -# will delete the ld.so sym link prematurely and break the system. So we -# will hard block and give manual migration instructions. -# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using -# the breakout library. The disadvantage here is that we have to sprinkle -# LDFAGS=-liconv on build systems that need to link against libiconv. -RDEPEND=" - !!sys-libs/uclibc - iconv? ( dev-libs/libiconv )" - -S=${WORKDIR}/${MY_P} - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CHOST} == ${CTARGET} ]] ; then - if [[ ${CATEGORY} == cross-* ]] ; then - export CTARGET=${CATEGORY#cross-} - fi -fi - -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} - -alt_build_kprefix() { - if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then - echo /usr/include - else - echo /usr/${CTARGET}/usr/include - fi -} - -just_headers() { - use headers-only && is_crosscompile -} - -uclibc_endian() { - # XXX: this wont work for a toolchain which is bi-endian, but we - # dont have any such thing at the moment, so not a big deal - touch "${T}"/endian.s - $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o - case $(file "${T}"/endian.o) in - *" MSB "*) echo "BIG";; - *" LSB "*) echo "LITTLE";; - *) echo "NFC";; - esac - rm -f "${T}"/endian.{s,o} -} - -kconfig_q_opt() { - local flag=$1; shift - case ${flag} in - y|n) ;; - *) flag=$(usex ${flag} y n) ;; - esac - - local var="defs_${flag}" - eval "${var}+=( $* )" -} - -get_opt() { - ( - unset ${1} - . ${2:-"${S}"/.config} - echo ${!1} - ) -} - -make_oldconfig() { - yes "" 2>/dev/null | emake -s oldconfig >/dev/null -} - -make_config() { - restore_config .config - if [ -f .config ]; then - make_oldconfig - return 0 - else - ewarn "Could not locate user configfile, so we will save a default one" - fi - - emake ARCH=$1 defconfig >/dev/null - - local defs_{y,n} - - # These are forced off - defs_n=( - DOASSERTS - DODEBUG_PT - HAS_NO_THREADS - PROPOLICE_BLOCK_ABRT - SSP_QUICK_CANARY - SUPPORT_LD_DEBUG_EARLY - UCLIBC_HAS_CTYPE_UNSAFE - UCLIBC_HAS_LOCALE - LDSO_SAFE_RUNPATH - ) - - # These are forced on - defs_y=( - DO_C99_MATH - DO_XSI_MATH - FORCE_SHAREABLE_TEXT_SEGMENTS - LDSO_GNU_HASH_SUPPORT - LDSO_PRELOAD_FILE_SUPPORT - LDSO_RUNPATH - LDSO_RUNPATH_OF_EXECUTABLE - LDSO_STANDALONE_SUPPORT - PROPOLICE_BLOCK_SEGV - PTHREADS_DEBUG_SUPPORT - UCLIBC_HAS_ARC4RANDOM - UCLIBC_HAS_BACKTRACE - UCLIBC_HAS_BSD_RES_CLOSE - UCLIBC_HAS_CONTEXT_FUNCS - UCLIBC_HAS_CTYPE_CHECKED - UCLIBC_HAS_EXTRA_COMPAT_RES_STATE - UCLIBC_HAS_FENV - UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE - UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE - UCLIBC_HAS_FOPEN_LARGEFILE_MODE - UCLIBC_HAS_FTS - UCLIBC_HAS_FTW - UCLIBC_HAS_GETPT - UCLIBC_HAS_GLIBC_CUSTOM_PRINTF - UCLIBC_HAS_GLIBC_CUSTOM_STREAMS - UCLIBC_HAS_GNU_GLOB - UCLIBC_HAS_HEXADECIMAL_FLOATS - UCLIBC_HAS_LIBUTIL - UCLIBC_HAS_NFTW - UCLIBC_HAS_OBSOLETE_BSD_SIGNAL - UCLIBC_HAS_PRINTF_M_SPEC - UCLIBC_HAS_PROGRAM_INVOCATION_NAME - UCLIBC_HAS_RESOLVER_SUPPORT - UCLIBC_HAS_SHA256_CRYPT_IMPL - UCLIBC_HAS_SHA512_CRYPT_IMPL - UCLIBC_HAS_SSP - UCLIBC_HAS_STUBS - UCLIBC_HAS_SYS_ERRLIST - UCLIBC_HAS_SYS_SIGLIST - UCLIBC_HAS_THREADS_NATIVE - UCLIBC_HAS_TZ_FILE_READ_MANY - UCLIBC_HAS_UTMP - UCLIBC_HAS_UTMPX - UCLIBC_HAS_WCHAR - UCLIBC_HAS_WORDEXP - UCLIBC_NTP_LEGACY - UCLIBC_SUPPORT_AI_ADDRCONFIG - UCLIBC_SUSV2_LEGACY - UCLIBC_SUSV3_LEGACY - UCLIBC_SUSV3_LEGACY_MACROS - UCLIBC_SUSV4_LEGACY - UCLIBC_USE_NETLINK - ) - - sed -i -e '/ARCH_.*_ENDIAN/d' .config - kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN" - - kconfig_q_opt debug DODEBUG - kconfig_q_opt debug SUPPORT_LD_DEBUG - kconfig_q_opt debug UCLIBC_HAS_PROFILING - - kconfig_q_opt ipv6 UCLIBC_HAS_IPV6 - - kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK - kconfig_q_opt hardened UCLIBC_BUILD_NOW - kconfig_q_opt hardened UCLIBC_BUILD_PIE - kconfig_q_opt hardened UCLIBC_BUILD_RELRO - kconfig_q_opt hardened UCLIBC_BUILD_SSP - - local count def - for count in 1 2 ; do - # Run twice as some config opts depend on others being enabled first. - for def in ${defs_y[@]} ; do - sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config - done - for def in ${defs_n[@]} ; do - sed -i -e "s|${def}=y|# ${def} is not set|g" .config - done - make_oldconfig - done - - einfo "Enabled options:" - for def in ${defs_y[@]} ; do - einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}") - done - einfo "Disabled options:" - for def in ${defs_n[@]} ; do - einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}") - done - - # setup build and run paths - sed -i \ - -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \ - -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \ - -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \ - -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \ - -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \ - -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \ - .config || die - - make_oldconfig -} - -pkg_setup() { - # Make sure our CHOST is a uclibc toolchain for native compiling - if [[ ${CHOST} == ${CTARGET} ]]; then - case ${CHOST} in - *-uclinux*|*-uclibc*) ;; - *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;; - esac - fi - - # uClibc-ng doesn't carry old Linux threads, and since we force - # threading our only choice is NPTL which requires i486 and later. - [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)." -} - -src_prepare() { - local version subversion extraversion - - # uclibc-ng tries to create a two sym link with ld.so, - # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-.so - # where MAJOR_VERSION != 0 indicates the ABI verison. - # We want to get rid of this and just have ABI = 0. - eapply "${FILESDIR}"/uclibc-compat-r1.patch - - # Critical fix for ld.so.cache - eapply "${FILESDIR}"/${P}-fix-ld.so.cache.patch - - # We need to change the major.minor.sublevel of uclibc-ng. - # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking. - # If we really want the ABI bump, we'll have to hack the gcc - # spec file and change the '*link:' rule. - version=( $(get_version_components) ) - if [[ -z ${version[1]} ]]; then - subversion=0 - extraversion=0 - else - subversion=${version[1]} - if [[ -z ${version[2]} ]]; then - extraversion=0 - else - extraversion=.${version[2]} - fi - fi - - sed -i \ - -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \ - -e "/^MINOR_VERSION/s|:=.*|:= ${version[0]}|" \ - -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \ - -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \ - Rules.mak || die - - eapply_user -} - -src_configure() { - # Map our toolchain arch name to the name expected by uClibc-ng. - local target=$(tc-arch) - case ${target} in - amd64) target="x86_64";; - arm) target="arm";; - mips) target="mips";; - ppc) target="powerpc";; - x86) target="i386";; - esac - - # Do arch specific configuration by changing the defaults in - # extra/Configs/Config.. If these are not overridden - # by an save .config, they will be selected by default. - - # For i386, i486, i586 and i686 - local cpu - if [[ ${target} == "i386" ]]; then - [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86" - sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \ - extra/Configs/Config.i386 || die - fi - - # For arm - if [[ ${target} == "arm" ]]; then - sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm - fi - - # We set HOSTCC to the proper tuple rather than just 'gcc' - sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak - - make_config ${target} - - einfo - einfo "Runtime Prefix: /" - einfo "Devel Prefix: /usr" - einfo "Kernel Prefix: $(alt_build_kprefix)" - einfo "CBUILD: ${CBUILD}" - einfo "CHOST: ${CHOST}" - einfo "CTARGET: ${CTARGET}" - einfo "ABI: ${ABI}" - einfo "ENDIAN: $(uclibc_endian)" - einfo -} - -src_compile() { - emake headers - just_headers && return 0 - - emake - if is_crosscompile ; then - emake -C utils hostutils - else - emake utils - fi -} - -src_test() { - is_crosscompile && return 0 - - # assert test fails on pax/grsec enabled kernels - # normal vfork test fails in sandbox (both glibc/uclibc) - emake UCLIBC_ONLY=1 check -} - -src_install() { - local sysroot=${D} - is_crosscompile && sysroot+="/usr/${CTARGET}" - - local target="install" - just_headers && target="install_headers" - emake DESTDIR="${sysroot}" ${target} - - save_config .config - - # remove files coming from kernel-headers - rm -rf "${sysroot}"/usr/include/{linux,asm*} - - # 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 - if is_crosscompile ; then - dosym usr/include /usr/${CTARGET}/sys-include - if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then - newbin utils/ldconfig.host ${CTARGET}-ldconfig - newbin utils/ldd.host ${CTARGET}-ldd - fi - return 0 - fi - - if use symlink-compat; then - dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0 - dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0 - fi - - emake DESTDIR="${D}" install_utils - dobin extra/scripts/getent - dodoc README docs/*.txt -} - -pkg_postinst() { - is_crosscompile && return 0 - - if [ ! -e "${ROOT}"/etc/TZ ] ; then - ewarn "Please remember to set your timezone in /etc/TZ" - mkdir -p "${ROOT}"/etc - echo "UTC" > "${ROOT}"/etc/TZ - fi - [ "${ROOT}" != "/" ] && return 0 - # update cache before reloading init - ldconfig - # reload init ... - /sbin/telinit U 2>/dev/null -} diff --git a/sys-libs/uclibc-ng/uclibc-ng-1.0.32.ebuild b/sys-libs/uclibc-ng/uclibc-ng-1.0.32.ebuild new file mode 100644 index 000000000000..b534fa8966ed --- /dev/null +++ b/sys-libs/uclibc-ng/uclibc-ng-1.0.32.ebuild @@ -0,0 +1,404 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="7" + +inherit flag-o-matic multilib savedconfig toolchain-funcs + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="git://uclibc-ng.org/git/uclibc-ng" + inherit git-r3 + MY_P=uclibc-ng-${PV} +else + MY_P=uClibc-ng-${PV} +fi + +DESCRIPTION="C library for developing embedded Linux systems" +HOMEPAGE="https://uclibc-ng.org/" +if [[ ${PV} != "9999" ]] ; then + PATCH_VER="" + SRC_URI="https://downloads.uclibc-ng.org/releases/${PV}/${MY_P}.tar.bz2" + KEYWORDS="-* ~amd64 ~arm ~mips ~ppc ~x86" +fi + +LICENSE="LGPL-2" +SLOT="0" +IUSE="debug hardened iconv ipv6 symlink-compat headers-only" +# tests fail due to unusual makefile +RESTRICT="strip test" + +# 1) We can't upgrade from uclibc to uclibc-ng via a soft blocker since portage +# will delete the ld.so sym link prematurely and break the system. So we +# will hard block and give manual migration instructions. +# 2) Currently uclibc and uclibc-ng's iconv are in bad shape. We've been using +# the breakout library. The disadvantage here is that we have to sprinkle +# LDFAGS=-liconv on build systems that need to link against libiconv. +RDEPEND=" + !!sys-libs/uclibc + iconv? ( dev-libs/libiconv )" + +S=${WORKDIR}/${MY_P} + +export CBUILD=${CBUILD:-${CHOST}} +export CTARGET=${CTARGET:-${CHOST}} +if [[ ${CHOST} == ${CTARGET} ]] ; then + if [[ ${CATEGORY} == cross-* ]] ; then + export CTARGET=${CATEGORY#cross-} + fi +fi + +is_crosscompile() { + [[ ${CHOST} != ${CTARGET} ]] +} + +alt_build_kprefix() { + if [[ ${CBUILD} == ${CHOST} && ${CHOST} == ${CTARGET} ]] ; then + echo /usr/include + else + echo /usr/${CTARGET}/usr/include + fi +} + +just_headers() { + use headers-only && is_crosscompile +} + +uclibc_endian() { + # XXX: this wont work for a toolchain which is bi-endian, but we + # dont have any such thing at the moment, so not a big deal + touch "${T}"/endian.s + $(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o + case $(file "${T}"/endian.o) in + *" MSB "*) echo "BIG";; + *" LSB "*) echo "LITTLE";; + *) echo "NFC";; + esac + rm -f "${T}"/endian.{s,o} +} + +kconfig_q_opt() { + local flag=$1; shift + case ${flag} in + y|n) ;; + *) flag=$(usex ${flag} y n) ;; + esac + + local var="defs_${flag}" + eval "${var}+=( $* )" +} + +get_opt() { + ( + unset ${1} + . ${2:-"${S}"/.config} + echo ${!1} + ) +} + +make_oldconfig() { + yes "" 2>/dev/null | emake -s oldconfig >/dev/null +} + +make_config() { + restore_config .config + if [ -f .config ]; then + make_oldconfig + return 0 + else + ewarn "Could not locate user configfile, so we will save a default one" + fi + + emake ARCH=$1 defconfig >/dev/null + + local defs_{y,n} + + # These are forced off + defs_n=( + DOASSERTS + DODEBUG_PT + HAS_NO_THREADS + PROPOLICE_BLOCK_ABRT + SSP_QUICK_CANARY + SUPPORT_LD_DEBUG_EARLY + UCLIBC_HAS_CTYPE_UNSAFE + UCLIBC_HAS_LOCALE + LDSO_SAFE_RUNPATH + ) + + # These are forced on + defs_y=( + DO_C99_MATH + DO_XSI_MATH + FORCE_SHAREABLE_TEXT_SEGMENTS + LDSO_GNU_HASH_SUPPORT + LDSO_PRELOAD_FILE_SUPPORT + LDSO_RUNPATH + LDSO_RUNPATH_OF_EXECUTABLE + LDSO_STANDALONE_SUPPORT + PROPOLICE_BLOCK_SEGV + PTHREADS_DEBUG_SUPPORT + UCLIBC_HAS_ARC4RANDOM + UCLIBC_HAS_BACKTRACE + UCLIBC_HAS_BSD_RES_CLOSE + UCLIBC_HAS_CONTEXT_FUNCS + UCLIBC_HAS_CTYPE_CHECKED + UCLIBC_HAS_EXTRA_COMPAT_RES_STATE + UCLIBC_HAS_FENV + UCLIBC_HAS_FOPEN_CLOSEEXEC_MODE + UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE + UCLIBC_HAS_FOPEN_LARGEFILE_MODE + UCLIBC_HAS_FTS + UCLIBC_HAS_FTW + UCLIBC_HAS_GETPT + UCLIBC_HAS_GLIBC_CUSTOM_PRINTF + UCLIBC_HAS_GLIBC_CUSTOM_STREAMS + UCLIBC_HAS_GNU_GLOB + UCLIBC_HAS_HEXADECIMAL_FLOATS + UCLIBC_HAS_LIBUTIL + UCLIBC_HAS_NFTW + UCLIBC_HAS_OBSOLETE_BSD_SIGNAL + UCLIBC_HAS_PRINTF_M_SPEC + UCLIBC_HAS_PROGRAM_INVOCATION_NAME + UCLIBC_HAS_RESOLVER_SUPPORT + UCLIBC_HAS_SHA256_CRYPT_IMPL + UCLIBC_HAS_SHA512_CRYPT_IMPL + UCLIBC_HAS_SSP + UCLIBC_HAS_STUBS + UCLIBC_HAS_SYS_ERRLIST + UCLIBC_HAS_SYS_SIGLIST + UCLIBC_HAS_THREADS_NATIVE + UCLIBC_HAS_TZ_FILE_READ_MANY + UCLIBC_HAS_UTMP + UCLIBC_HAS_UTMPX + UCLIBC_HAS_WCHAR + UCLIBC_HAS_WORDEXP + UCLIBC_NTP_LEGACY + UCLIBC_SUPPORT_AI_ADDRCONFIG + UCLIBC_SUSV2_LEGACY + UCLIBC_SUSV3_LEGACY + UCLIBC_SUSV3_LEGACY_MACROS + UCLIBC_SUSV4_LEGACY + UCLIBC_USE_NETLINK + ) + + sed -i -e '/ARCH_.*_ENDIAN/d' .config + kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN" + + kconfig_q_opt debug DODEBUG + kconfig_q_opt debug SUPPORT_LD_DEBUG + kconfig_q_opt debug UCLIBC_HAS_PROFILING + + kconfig_q_opt ipv6 UCLIBC_HAS_IPV6 + + kconfig_q_opt hardened UCLIBC_BUILD_NOEXECSTACK + kconfig_q_opt hardened UCLIBC_BUILD_NOW + kconfig_q_opt hardened UCLIBC_BUILD_PIE + kconfig_q_opt hardened UCLIBC_BUILD_RELRO + kconfig_q_opt hardened UCLIBC_BUILD_SSP + + local count def + for count in 1 2 ; do + # Run twice as some config opts depend on others being enabled first. + for def in ${defs_y[@]} ; do + sed -i -e "s|.*\<${def}\>.*set|${def}=y|g" .config + done + for def in ${defs_n[@]} ; do + sed -i -e "s|${def}=y|# ${def} is not set|g" .config + done + make_oldconfig + done + + einfo "Enabled options:" + for def in ${defs_y[@]} ; do + einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}") + done + einfo "Disabled options:" + for def in ${defs_n[@]} ; do + einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}") + done + + # setup build and run paths + sed -i \ + -e "/^CROSS_COMPILER_PREFIX/s|=.*|=\"${CTARGET}-\"|" \ + -e "/^KERNEL_HEADERS/s|=.*|=\"$(alt_build_kprefix)\"|" \ + -e "/^SHARED_LIB_LOADER_PREFIX/s|=.*|=\"/$(get_libdir)\"|" \ + -e "/^DEVEL_PREFIX/s|=.*|=\"/usr\"|" \ + -e "/^RUNTIME_PREFIX/s|=.*|=\"/\"|" \ + -e "/^UCLIBC_EXTRA_CFLAGS/s|=.*|=\"${UCLIBC_EXTRA_CFLAGS}\"|" \ + .config || die + + make_oldconfig +} + +pkg_setup() { + # Make sure our CHOST is a uclibc toolchain for native compiling + if [[ ${CHOST} == ${CTARGET} ]]; then + case ${CHOST} in + *-uclinux*|*-uclibc*) ;; + *) die "Use sys-devel/crossdev to build a uclibc toolchain" ;; + esac + fi + + # uClibc-ng doesn't carry old Linux threads, and since we force + # threading our only choice is NPTL which requires i486 and later. + [[ ${CTARGET} == i386* ]] && die "i386 can't support Native Posix Threads (NPTL)." +} + +src_prepare() { + local version subversion extraversion + + # uclibc-ng tries to create a two sym link with ld.so, + # ld-uClibc.so.{0,MAJOR_VERSION} -> ld-uClibc-.so + # where MAJOR_VERSION != 0 indicates the ABI verison. + # We want to get rid of this and just have ABI = 0. + eapply "${FILESDIR}"/uclibc-compat-r1.patch + + # We need to change the major.minor.sublevel of uclibc-ng. + # Upstream sets MAJOR_VERSION = 1 which breaks runtime linking. + # If we really want the ABI bump, we'll have to hack the gcc + # spec file and change the '*link:' rule. + version_0=$(ver_cut 1) + version_1=$(ver_cut 2) + version_2=$(ver_cut 3) + if [[ -z ${version_1} ]]; then + subversion=0 + extraversion=0 + else + subversion=${version_1} + if [[ -z ${version_2} ]]; then + extraversion=0 + else + extraversion=.${version_2} + fi + fi + + sed -i \ + -e "/^MAJOR_VERSION/s|:=.*|:= 0|" \ + -e "/^MINOR_VERSION/s|:=.*|:= ${version_0}|" \ + -e "/^SUBLEVEL/s|:=.*|:= ${subversion}|" \ + -e "/^EXTRAVERSION/s|:=.*|:= ${extraversion}|" \ + Rules.mak || die + + eapply_user +} + +src_configure() { + # Map our toolchain arch name to the name expected by uClibc-ng. + local target=$(tc-arch) + case ${target} in + amd64) target="x86_64";; + arm) target="arm";; + mips) target="mips";; + ppc) target="powerpc";; + x86) target="i386";; + esac + + # Do arch specific configuration by changing the defaults in + # extra/Configs/Config.. If these are not overridden + # by an save .config, they will be selected by default. + + # For i386, i486, i586 and i686 + local cpu + if [[ ${target} == "i386" ]]; then + [[ ${CTARGET} == i[456]86* ]] && cpu="${CTARGET:1:1}86" + sed -i -e "s|default CONFIG_686|default CONFIG_${cpu:-486}|" \ + extra/Configs/Config.i386 || die + fi + + # For arm + if [[ ${target} == "arm" ]]; then + sed -i -e '/Build for EABI/a \\tdefault y' extra/Configs/Config.arm + fi + + # We set HOSTCC to the proper tuple rather than just 'gcc' + sed -i -e "s|^HOSTCC.*=.*|HOSTCC=$(tc-getBUILD_CC)|" Rules.mak + + make_config ${target} + + einfo + einfo "Runtime Prefix: /" + einfo "Devel Prefix: /usr" + einfo "Kernel Prefix: $(alt_build_kprefix)" + einfo "CBUILD: ${CBUILD}" + einfo "CHOST: ${CHOST}" + einfo "CTARGET: ${CTARGET}" + einfo "ABI: ${ABI}" + einfo "ENDIAN: $(uclibc_endian)" + einfo +} + +src_compile() { + emake headers + just_headers && return 0 + + emake + if is_crosscompile ; then + emake -C utils hostutils + else + emake utils + fi +} + +src_test() { + is_crosscompile && return 0 + + # assert test fails on pax/grsec enabled kernels + # normal vfork test fails in sandbox (both glibc/uclibc) + emake UCLIBC_ONLY=1 check +} + +src_install() { + local sysroot=${D} + is_crosscompile && sysroot+="/usr/${CTARGET}" + + local target="install" + just_headers && target="install_headers" + emake DESTDIR="${sysroot}" ${target} + + save_config .config + + # remove files coming from kernel-headers + rm -rf "${sysroot}"/usr/include/{linux,asm*} + + # 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 + if is_crosscompile ; then + dosym usr/include /usr/${CTARGET}/sys-include + if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then + newbin utils/ldconfig.host ${CTARGET}-ldconfig + newbin utils/ldd.host ${CTARGET}-ldd + fi + return 0 + fi + + if use symlink-compat; then + dosym libc.so.0 "${DESTDIR}"/lib/libcrypt.so.0 + dosym libc.so.0 "${DESTDIR}"/lib/libdl.so.0 + dosym libc.so.0 "${DESTDIR}"/lib/libm.so.0 + dosym libc.so.0 "${DESTDIR}"/lib/libpthread.so.0 + dosym libc.so.0 "${DESTDIR}"/lib/librt.so.0 + dosym libc.so.0 "${DESTDIR}"/lib/libresolv.so.0 + dosym libc.so.0 "${DESTDIR}"/lib/libubacktrace.so.0 + dosym libc.so.0 "${DESTDIR}"/lib/libutil.so.0 + fi + + emake DESTDIR="${D}" install_utils + dobin extra/scripts/getent + dodoc README docs/*.txt +} + +pkg_postinst() { + is_crosscompile && return 0 + + if [ ! -e "${ROOT}"/etc/TZ ] ; then + ewarn "Please remember to set your timezone in /etc/TZ" + mkdir -p "${ROOT}"/etc + echo "UTC" > "${ROOT}"/etc/TZ + fi + [ "${ROOT}" != "/" ] && return 0 + # update cache before reloading init + ldconfig + # reload init ... + /sbin/telinit U 2>/dev/null +} -- cgit v1.2.3