From 2198f8593ae0312add1bdccb49edfcb935e5f8a6 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 7 Dec 2024 02:07:26 +0000 Subject: gentoo auto-resync : 07:12:2024 - 02:07:26 --- sys-libs/Manifest.gz | Bin 14570 -> 14561 bytes sys-libs/binutils-libs/Manifest | 2 +- .../binutils-libs/binutils-libs-2.43-r3.ebuild | 2 +- sys-libs/compiler-rt-sanitizers/Manifest | 2 +- .../compiler-rt-sanitizers-19.1.4.ebuild | 2 +- sys-libs/compiler-rt/Manifest | 2 +- sys-libs/compiler-rt/compiler-rt-19.1.4.ebuild | 2 +- sys-libs/gdbm/Manifest | 2 +- sys-libs/gdbm/gdbm-1.24.ebuild | 2 +- sys-libs/glibc/Manifest | 4 +- sys-libs/glibc/glibc-2.40-r6.ebuild | 1751 -------------------- sys-libs/glibc/glibc-2.40-r7.ebuild | 1751 ++++++++++++++++++++ sys-libs/gpm/Manifest | 2 +- sys-libs/gpm/gpm-1.20.7-r6.ebuild | 2 +- sys-libs/libcxx/Manifest | 2 +- sys-libs/libcxx/libcxx-19.1.4.ebuild | 2 +- sys-libs/libcxxabi/Manifest | 2 +- sys-libs/libcxxabi/libcxxabi-19.1.4.ebuild | 2 +- sys-libs/libomp/Manifest | 2 +- sys-libs/libomp/libomp-19.1.4.ebuild | 2 +- sys-libs/libunwind/Manifest | 1 - .../files/libunwind-1.7.2-backport-pr521.patch | 31 - sys-libs/llvm-libunwind/Manifest | 2 +- .../llvm-libunwind/llvm-libunwind-19.1.4.ebuild | 2 +- sys-libs/ncurses/Manifest | 2 +- sys-libs/ncurses/ncurses-6.5_p20241109.ebuild | 2 +- sys-libs/pam/Manifest | 2 +- sys-libs/pam/pam-1.6.1.ebuild | 2 +- sys-libs/readline/Manifest | 6 +- sys-libs/readline/readline-8.1_p2-r2.ebuild | 2 +- sys-libs/readline/readline-8.2_p13-r1.ebuild | 2 +- sys-libs/readline/readline-8.2_p13.ebuild | 2 +- 32 files changed, 1781 insertions(+), 1813 deletions(-) delete mode 100644 sys-libs/glibc/glibc-2.40-r6.ebuild create mode 100644 sys-libs/glibc/glibc-2.40-r7.ebuild delete mode 100644 sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch (limited to 'sys-libs') diff --git a/sys-libs/Manifest.gz b/sys-libs/Manifest.gz index 1dd1f772e518..c293e1e00d28 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 49e5e63c2073..2972d087cfd8 100644 --- a/sys-libs/binutils-libs/Manifest +++ b/sys-libs/binutils-libs/Manifest @@ -30,6 +30,6 @@ EBUILD binutils-libs-2.40-r7.ebuild 5085 BLAKE2B 83197e69386093e06221231ae188131 EBUILD binutils-libs-2.41-r5.ebuild 5267 BLAKE2B 7c955ed4e435f894a45c444ffbec7f92b94993fcea2aa1197c84e476e50506dca782a0ca7adf5aef8d724f9c3e9bbd9b6103eceed52738b777208f9612b8c4af SHA512 57ff255c93b642916178f9581705378276e7e4f2ffb96cbfd8b2c86932f437f53eb144cdd9efd91d54cfe19b6080a225bdd75ef5f9e6fd24bf324630e348fd2f EBUILD binutils-libs-2.42-r2.ebuild 5416 BLAKE2B d338164ec84b068311b3e8bb36c4d70d449072d60572ace109badccc29e0cf1f42ca913388aa9b50d4783465370ef999c039a897503d02e396a6efe0dff7559f SHA512 dd50d52faf5bba96a93caac528ef51cbba78948370ece9dd159ede7a8fc938e918f9a4c01c2214a72431ef0c95899ec0ddfdf6023b07ecc0c9fca64a29536853 EBUILD binutils-libs-2.43-r2.ebuild 5393 BLAKE2B 8a6aec7741b56fc1b1e169521eefe97ec7e783a81fdc2feca1240e37f589e86173faeda1912044fe24359d00af0b0f7ee71e6567f43122f942147e63c13a081f SHA512 361b7e48a781812807b6ebea550f3d14f71faf2c984070b3faf79870e57066e0c1aa97edd4e3f3c4269564cd0df529c804dabc610e95a14ba2a6a581446a32f0 -EBUILD binutils-libs-2.43-r3.ebuild 5387 BLAKE2B 1c0b1fedc6e7c33bc7ccbdf73159e55a8d45014624ef1472f1293e6c36e611544b73e520a5d54790b42043d30b64148f8a5329514aae97d74d1def7031d0dbee SHA512 f893d2e8c2398f8576b08b8be2ddd114e4e3589d7399ba932833e1c88b4b89e28a908d9a424dfdbcfd6d203060d538d091b7c2b37f2e75f88c467cebffe4839b +EBUILD binutils-libs-2.43-r3.ebuild 5385 BLAKE2B 778d4b9e1092bdd27a38659d7bbdc835bd252344b1dab312e580a0a1176fed3144611c1b092154fc02b9acc17fb302fde8c130a01e183c5fb1fd5b7d2e48721d SHA512 41b26e061b65d3249a3389f616543d7887321c09a3186cf96a3017f2515df1eae71a2ad9f2e79f6e69bd990a0b534e39f148c007b72e0648851b014de3720a45 EBUILD binutils-libs-9999.ebuild 6594 BLAKE2B bb2853af0a5a0f540dd3f67c0b854b5500aac8007ec53ddddff50e4df4b8b52ff7ee8175f9e4dde10a939053488137f3802492b5d7114ef587eebbd82c208415 SHA512 79b2b4c2886e09c8d51d5ff968e80edefa8cc10ff33d65ba8595558d05aea3f42c412444436e473399b7566ba0063b75bf59671fdcde6ef6e8d20c9cba6d201c MISC metadata.xml 612 BLAKE2B ceaafd9fd1421e9f3993e003d0029c92a78054c7a2b90bd78afc05370ad19c931c6a7c150545cfb7d57165168e0fdaf3a00dde1905b328826a91cbc70d9548a8 SHA512 c8d33bb8d1c62c7e95758624ed0febbc9d40e9f141bfd280837b3207bcd771412158d71c0cb5548d60be0b236f6fe103621daf7efa8875191982859b566ffa8d diff --git a/sys-libs/binutils-libs/binutils-libs-2.43-r3.ebuild b/sys-libs/binutils-libs/binutils-libs-2.43-r3.ebuild index 2aaa95d9d0ba..b2251c25ecde 100644 --- a/sys-libs/binutils-libs/binutils-libs-2.43-r3.ebuild +++ b/sys-libs/binutils-libs/binutils-libs-2.43-r3.ebuild @@ -29,7 +29,7 @@ else fi IUSE="64-bit-bfd cet multitarget nls static-libs test" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos ~x64-macos ~x64-solaris" RESTRICT="!test? ( test )" BDEPEND=" diff --git a/sys-libs/compiler-rt-sanitizers/Manifest b/sys-libs/compiler-rt-sanitizers/Manifest index 071de942b311..f79057d6c019 100644 --- a/sys-libs/compiler-rt-sanitizers/Manifest +++ b/sys-libs/compiler-rt-sanitizers/Manifest @@ -21,7 +21,7 @@ EBUILD compiler-rt-sanitizers-16.0.6-r1.ebuild 6655 BLAKE2B db5371e8891181bc3652 EBUILD compiler-rt-sanitizers-17.0.6-r1.ebuild 6487 BLAKE2B 5083f082d2e9bc0152bd601b5702cb2d5566ed8b9cb7640503bcc02cf42d5d85ae94945aaf72899ea1ab89c2396090113286efd6157baee51d6000920c91ef10 SHA512 b61fd0bd3a2a29fb72ec4fb4f53546febbc70168951f4c0cec52c5670f0db5c009032d9911e4f78230eac91a02d9c25a6e209d5f4f7b62b0e32d51b8e04555d7 EBUILD compiler-rt-sanitizers-18.1.8-r1.ebuild 6399 BLAKE2B 89775029b096011375f25b0c96c17ec26472e2d298673182b6a9284b1273d0f878a7d7a72e28bbb4e800434de4c248e24475edee22f5bbd26157b663ea383b97 SHA512 e3352e1b3dce27a223159cc7d7a31d9ed71944e204725acc36ee381e32ff571d5b6c6b8ce7706afaf853d96d42630ee216f0321cb173533b3cf4e15ba166e850 EBUILD compiler-rt-sanitizers-18.1.8-r6.ebuild 6404 BLAKE2B 44eb48fd2ab90c0b2e5dabdbb4e05e79544799c8c28daa3ac4b762cfd43fba641e2f827ea51d39cc573a6f4707ec95e0559bb137f31f112135e463f6430ac812 SHA512 814e50974005572618d672aa86761977819aab9e53b3dc5cb3865717ef3dcd776f892792cb29b331531a2d2c8fceb775c6c633dfacb57ae57a59ad19455c280b -EBUILD compiler-rt-sanitizers-19.1.4.ebuild 6479 BLAKE2B db6bd87ee4cb4be87537152c8041fb0e6bd69100e6fa4242e231c98ec1222834dd87a7b0350b42bddc6d50597919169f44d136b7a3f609407cf752f9a5ee6cff SHA512 3a992ea97ce2028d99a94adc291bf6c084af6ccb103dab7dbba43568e1283b7c4c6dfc03385b931c185eed2fc4c37563edaeff76ed3e8528c92293030121ac7e +EBUILD compiler-rt-sanitizers-19.1.4.ebuild 6474 BLAKE2B 6242f59f11589223b494cc11b401391bbe001a8cd9f729b6a2c50fcbccbc87ae626a5dcc5ee73bb83c449b5b08bd597b12628801e762d44e225e509982414e4f SHA512 ede9112b6b96ba713bd7f82fce20c62f131106bdd6b87874fa9e2cd8b6cefd607f25ddef3552ba5a5df88331935f6dcc665105af1d325f233d6b5f48c840e11c EBUILD compiler-rt-sanitizers-19.1.5.ebuild 6479 BLAKE2B db6bd87ee4cb4be87537152c8041fb0e6bd69100e6fa4242e231c98ec1222834dd87a7b0350b42bddc6d50597919169f44d136b7a3f609407cf752f9a5ee6cff SHA512 3a992ea97ce2028d99a94adc291bf6c084af6ccb103dab7dbba43568e1283b7c4c6dfc03385b931c185eed2fc4c37563edaeff76ed3e8528c92293030121ac7e EBUILD compiler-rt-sanitizers-20.0.0.9999.ebuild 6394 BLAKE2B 458582b435bbd97d6fc776b1dcf653af9d41e53b0540803a3528db993eddf33284a11ec72ba7bdd2e54bbe4cf7c51e340e04970f9dc3f1f8a08edb9e5c98b9db SHA512 7f2432f6ffe217d3dcaf2185c5b08321674f1b9e5da46a2abdebebb68bccc761f0a713aa85741d9a32c29e1b54f1b12f93110146e533742265d0bb182a45501f EBUILD compiler-rt-sanitizers-20.0.0_pre20241130.ebuild 6394 BLAKE2B 458582b435bbd97d6fc776b1dcf653af9d41e53b0540803a3528db993eddf33284a11ec72ba7bdd2e54bbe4cf7c51e340e04970f9dc3f1f8a08edb9e5c98b9db SHA512 7f2432f6ffe217d3dcaf2185c5b08321674f1b9e5da46a2abdebebb68bccc761f0a713aa85741d9a32c29e1b54f1b12f93110146e533742265d0bb182a45501f diff --git a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.4.ebuild b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.4.ebuild index 24dcc0582eda..3d8d627e816b 100644 --- a/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.4.ebuild +++ b/sys-libs/compiler-rt-sanitizers/compiler-rt-sanitizers-19.1.4.ebuild @@ -11,7 +11,7 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="${LLVM_MAJOR}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~ppc-macos ~x64-macos" +KEYWORDS="amd64 arm arm64 ~loong ~mips ppc64 ~riscv x86 ~amd64-linux ~ppc-macos ~x64-macos" IUSE="+abi_x86_32 abi_x86_64 +clang debug test" # base targets IUSE+=" +ctx-profile +libfuzzer +memprof +orc +profile +xray" diff --git a/sys-libs/compiler-rt/Manifest b/sys-libs/compiler-rt/Manifest index 857eeb83cf3d..adb348bdde13 100644 --- a/sys-libs/compiler-rt/Manifest +++ b/sys-libs/compiler-rt/Manifest @@ -22,7 +22,7 @@ EBUILD compiler-rt-17.0.6-r1.ebuild 5232 BLAKE2B 5a0f7dfe903120235504687ae76593c EBUILD compiler-rt-17.0.6-r2.ebuild 5360 BLAKE2B 2177d53ff3c498ca85871197a466e583fe6a1fcb80092df75dfa1330bc80aad21c090395132b99359138977c62888bd03ea48331c4acb79e543852ced2f52c50 SHA512 f065a0ed894081cb96fbf045011ec57fbedeadfe6fc384b7ab2b493e41c3b92e79c837f0d542a5fafd9801878f760384fb76a7739fef3043194fbe781cc18422 EBUILD compiler-rt-18.1.8-r1.ebuild 4987 BLAKE2B e32d8c2e8ae1b978600444420dfb2e9329c85fad13e91cbf494167aa4e57f24bf538a4417d3b47d4b87234ae26b48d88d6efd1a9413587ac4488e3a007a9ddff SHA512 0e103e1bf304892e41ec4935d390f7d2e5cfcf569f2cf22b091524d8c73fcf60e07f96f3e8d71949226852ce61777bc4a309aa9063ab87830c3fb94bf8082001 EBUILD compiler-rt-18.1.8-r2.ebuild 5115 BLAKE2B 7c066ac2380913e67431f1d40a21d4c3a3866f7c40064762aff98d116ddacd4e876d5290b2f3bfa463b35072208bf959c18bba611e2a90c645937ec52fdf296c SHA512 6ed1a02b0e6d53469444aa0285fbcf395381e8e2caf01a062c92b664f81373458e13352ea9b7dedcd6aecbfab48cea0c3434b918f18c6d834195ecabad70c47e -EBUILD compiler-rt-19.1.4.ebuild 5209 BLAKE2B d69ba529020b23d4a7f00195d2ea7a3010976271a69b4a5229d7fbc944f129480874ec9e8ca3b68f3a938d790c112d2cd2aa77eb560ab821eb3f79dcb028b71b SHA512 92c74ab12577049d145a3f078d72fa59dcda40fde713ff1079dc065c50fd48d29b30dd58052bb2182bc01146485134c694eb332196d415f8967b38de2ad74301 +EBUILD compiler-rt-19.1.4.ebuild 5204 BLAKE2B d589324b86c735d3b4ab8a654037c8af6bc0c39535bffa378d2a8bf3ce39e171f2771439599bb421b0eb216cd86b220d293b8f6b6a5792447af1c149c4ae57d5 SHA512 d7c7f7d2a10affff8d63203f688a6cb08510856b12308faf829f7585bca4b1c69e60449d581f482a41072722d2d01408e9bd47358372378c538e9ba170d519bf EBUILD compiler-rt-19.1.5.ebuild 5209 BLAKE2B d69ba529020b23d4a7f00195d2ea7a3010976271a69b4a5229d7fbc944f129480874ec9e8ca3b68f3a938d790c112d2cd2aa77eb560ab821eb3f79dcb028b71b SHA512 92c74ab12577049d145a3f078d72fa59dcda40fde713ff1079dc065c50fd48d29b30dd58052bb2182bc01146485134c694eb332196d415f8967b38de2ad74301 EBUILD compiler-rt-20.0.0.9999.ebuild 5100 BLAKE2B 8b21c012e5424c96d3957670edfa06a03ed3a5a328b1600c29d471ba12191b319d39e0124d276fbd4ebaef9bea3f1a2133c9fd391f22328a46b008e9c783e5cb SHA512 cd3d927fb0ad5a5f919bcc7143f07e1f32870ab7ff278503c3b73a90f1d685e9b4b657d364ddd9c20f3dd2b03d370bb791f1a5e5f1314e9b592b00df41557360 EBUILD compiler-rt-20.0.0_pre20241130.ebuild 5100 BLAKE2B 8b21c012e5424c96d3957670edfa06a03ed3a5a328b1600c29d471ba12191b319d39e0124d276fbd4ebaef9bea3f1a2133c9fd391f22328a46b008e9c783e5cb SHA512 cd3d927fb0ad5a5f919bcc7143f07e1f32870ab7ff278503c3b73a90f1d685e9b4b657d364ddd9c20f3dd2b03d370bb791f1a5e5f1314e9b592b00df41557360 diff --git a/sys-libs/compiler-rt/compiler-rt-19.1.4.ebuild b/sys-libs/compiler-rt/compiler-rt-19.1.4.ebuild index 88726a8977e1..e957e5d48be7 100644 --- a/sys-libs/compiler-rt/compiler-rt-19.1.4.ebuild +++ b/sys-libs/compiler-rt/compiler-rt-19.1.4.ebuild @@ -12,7 +12,7 @@ HOMEPAGE="https://llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="${LLVM_MAJOR}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" +KEYWORDS="amd64 arm arm64 ~loong ~mips ppc64 ~riscv x86 ~amd64-linux ~arm64-macos ~ppc-macos ~x64-macos" IUSE="+abi_x86_32 abi_x86_64 +atomic-builtins +clang debug test" REQUIRED_USE="atomic-builtins? ( clang )" RESTRICT="!test? ( test ) !clang? ( test )" diff --git a/sys-libs/gdbm/Manifest b/sys-libs/gdbm/Manifest index 38c260d45ce7..e464ee7a51b5 100644 --- a/sys-libs/gdbm/Manifest +++ b/sys-libs/gdbm/Manifest @@ -3,5 +3,5 @@ DIST gdbm-1.23.tar.gz.sig 181 BLAKE2B 34785e6fe8e02100084d61e989749ee388794b8af8 DIST gdbm-1.24.tar.gz 1195931 BLAKE2B 79f49adbb455c2e1b91f3450037b71165fa8de82650d6402e0e22ee1f4d278fdb0bd78100659bf416e2409b432e1f8d32ecbae523980413f7148b80ee06c9f4b SHA512 401ff8c707079f21da1ac1d6f4714a87f224b6f41943078487dc891be49f51fd1ac7a32fd599aae0fad185f2c6ba7432616d328fd6aaab068eb54db9562ff7fa DIST gdbm-1.24.tar.gz.sig 95 BLAKE2B 3a66c2a256d9601db57df20feb5d72d1e94d23b7a92e3099f121549c8aa2c57b05a3021d88f97291819378462a68664af958de4c9de65887d2cca6642d172bc3 SHA512 a54595e0fd23724f5e30c2ff1b9656dbb6da3b448f4ab6a2579a523c11bae53e47d3843327a1e4499b312ab947ac73b5a9aa6e78fe5e932c55a1be0cdab4e63d EBUILD gdbm-1.23.ebuild 1559 BLAKE2B cd15b05d96777af4ce73a828ab9e787b410cfa259f1a20b6252d00fdfcb75385ae3801f31d998ec729855a8f10de77c79421b986be534d07c78688391ba71c9d SHA512 bf082c3d47d102f5a0b69508480b1ebcae68a2a13b7c713e99b6a519a4364699eda57e20df15695dcf7fa026051939a9453577c148d80d1ad0cdd9338e859b1c -EBUILD gdbm-1.24.ebuild 1747 BLAKE2B 9fb34505e70b6bfc3c05c649d4d5dbe2c2346e80e8fe53aeab19a91d7be2fd7dc86de752e4d8b874321e7a14d2cfb69e5ac6202512ef8a962808dc18c8f782f1 SHA512 2f063e87f1d339e9f89e060ffcbfc4f59e07a4eaf1158d7160bd1ec6493625d865ac2601603db4b9a1789bf00759ebfc276e9b49c569201487fa45944ed15d68 +EBUILD gdbm-1.24.ebuild 1764 BLAKE2B d7a8208bf1ef4b8b9328bd5709f3a680687f8df5e20f4840fdcb8d75943357776a705dec4132cbb23a5df3d61705c76dae27b4348fa3f03b3b55215617d0445e SHA512 ea930e758eac48e007d36aabb84e64b2966fc1fd43a411a615491a61d68e187d04554a9e188fcbeced32177dd50a8e8cde3cfcc706e0341e3451fcb8cf4bc8fd MISC metadata.xml 452 BLAKE2B 9688553eee24115f83128016ef5a5ea8536c34bcd18eb0ee444f897db05b38522a6b1332c970b906097178746bb075a839ca5e4a20871601f577204e8144be01 SHA512 f52ce70540b144b749baa59c87fb6d2582ddb86feb19938ca7d0a85d70e19bc85a6013885a9c2a2fa6dab706d5eddc6a6436d9bf879e04b2f3dfb9891c353a4c diff --git a/sys-libs/gdbm/gdbm-1.24.ebuild b/sys-libs/gdbm/gdbm-1.24.ebuild index 122b7b2c8098..1dec3b5c1908 100644 --- a/sys-libs/gdbm/gdbm-1.24.ebuild +++ b/sys-libs/gdbm/gdbm-1.24.ebuild @@ -36,7 +36,7 @@ src_prepare() { multilib_src_configure() { # https://puszcza.gnu.org.ua/bugs/index.php?642 - append-cflags -std=gnu17 + append-cflags $(test-flags-CC -std=gnu17) # gdbm doesn't appear to use either of these libraries export ac_cv_lib_dbm_main=no ac_cv_lib_ndbm_main=no diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index 508a4a383b17..6629ea4aa24d 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -33,7 +33,7 @@ DIST glibc-2.38.tar.xz 18913712 BLAKE2B f9b039f0ef98a7dd8e1cba228ed10286b9e4fbe4 DIST glibc-2.39-patches-11.tar.xz 192784 BLAKE2B fef42e0bd2a3341f41cac56dc878dcc95b7f521ffb27686a9109fe92e0458e903a24e763db17631b8ae6c1e8de7add2a11979b970689b2378aeb6ef29da7ceb6 SHA512 9daf2c57d178c7ce9d98ee454f680280738b37571bbbecc1724282e4866df29b78e60de40ad81a6efcc0a75b45d08148cb1a5f942ae7e308ae6fa63f9671b7de DIST glibc-2.39.tar.xz 18520988 BLAKE2B 9d98459a2d58401e07c081e0d841935b23998da75a7eb5a7ebd23a1f9ebab99dee623fe166397c1b6c926960c570f62dbca5cb3b5ce84a918adff6b7a15e16bb SHA512 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2 DIST glibc-2.40-patches-5.tar.xz 87376 BLAKE2B b09b9d2c8e45c0b494223cd01effb14ef205b030f2aeb76e1d7d289997258c1e46d85f8f4ad761e22afc35b1f4747fbca51d7caf252181c7b054b6a3e6bd2bfe SHA512 bf4776c27e5d962d2774afbed2236996a712a6127e5fdccd051af212d86a7e699a932cf4cb22f5516d513b9490b91d5e145727035e845cd4ef290985ac3dc524 -DIST glibc-2.40-patches-6.tar.xz 103888 BLAKE2B 14b7410d11c82e8149ad8a26e4df565f2aa824dc0feee5e97769659d22d9c506ab6fdac1429f1ca396433ef7dd4a4eb11e9f3301f9f9eb0e5597c4c0973479ae SHA512 166fca570eab269b7a2a445e46989a319389d46af9f052ab07958068ad30d8e9675812316c53e0975a6ba64a876fa1aa50c4e36bdff2b2db9b79988edf69952c +DIST glibc-2.40-patches-7.tar.xz 104100 BLAKE2B 6e91571bea0475b1a47a2c1b796cc91d2ab0f542cc82dba8691f99d09459bea73c0940c89c8f559edfb315cf9844a5c1eb0392f40499b1b8861f1e16f8b549db SHA512 8d61810f11f4c2ce97037e0f3c62e2a7bf0d83571fe68c7f80a248df744c31c2bda075c1f4c6189e8d5de0b200c1070e667a753144c61b0cb9bd5456b1c99d8b DIST glibc-2.40.tar.xz 18752204 BLAKE2B 8593cab5b2549b77159b6866fbb40b917e491fd5bc0814f7f85b6529166d78d4583436450c479b86cdfe468304fc4d2a9ba8294230a55dbc4c15e89c3ab6c000 SHA512 33caf91dbfddde6480b7cdf7a68b36aff8c522bfee56160af26af297f1b768668edb08bc4e1a7ff61c64721e3c1d49c347a5dd01c5edd3b914ee6479c8b27885 DIST glibc-systemd-20210729.tar.gz 1480 BLAKE2B 37722c7579df782d890e44dbab99c3de52ab466eb9de80d82405e9bb5620bf39ffc8c5f466a435bdb86ef6d36dd7019c0736573916bda6c67d02a2581e0ec979 SHA512 efd75af58b50522c28cdac7abd1fc56555bc1bb042512c90d8340c1ec09c5791b3872a305bf83723252bbde5855b75d958c041083457765c4cfd170732d09238 DIST glibc-systemd-20210814.tar.gz 1469 BLAKE2B 10fa7bcb46d4fdce9c0ab353cbd30871e9b09a347a13a9c9a3b5777f931aa3c826c158d2e49532c604d4a834f2fab4089b67495fb88d0398945dc50d45ad9ef1 SHA512 5346a9ea459a1e6ccf665389f2a294de1e16f1e3e05cdf07e3dd99ed0e4f6f8b52cc333d4bff3c75ac90ab6ce70cd4ab2b3e126f920ce7979abd6dda56315efc @@ -52,6 +52,6 @@ EBUILD glibc-2.37-r10.ebuild 53322 BLAKE2B 301a9c47f4149e927764cc132e6ec2a20b90a EBUILD glibc-2.38-r13.ebuild 55028 BLAKE2B fcee988603b8bcec9cf184c54e040c9190a98170170665c56998e9a14bec55b34e25fc1002b2aaa8bae29392968a8f543f2f68f1e564c52d9e7a0fcf5c829317 SHA512 9bd2e1fe3709f4b792575d37c6b343e2db3b4bb60090281521ac3b9c4e5b9bed2367453933a2df8c1fa9cc988a71e97d797c009f7bb9fabde6c2821ab61102dd EBUILD glibc-2.39-r11.ebuild 54663 BLAKE2B ef95a8014c990f42738c5b66b73416a55fab1b433af10d879a60d4d798ed3b9fca747242fb09d110f6a258e37bdbb384a85cc59dd8dc80f375c6faaa30ab4932 SHA512 3e8c216ac02f129a37de9d475980d911fb1ff77d09949f87ff6c5ffa666afdc6a35004d32d60d8a78b1abc17a823083442a68cbea6df35d4409897648ce8783f EBUILD glibc-2.40-r5.ebuild 54662 BLAKE2B 62dd423d70cd8598bc4e69dc49e9b5442d283af497b80c58a99fcc6d4977936b0171c0c76325978fd43ddccd7e3c6496984c90a171bfd7b27ce5296bd204f7e9 SHA512 4daab8f45afa47660e9edce14ce5733702a5c229e1dea24e702858425d30201686eb62b0fd2d6a9c99343e4c6e138352f18eacde24d99aada8ce610f001c5b33 -EBUILD glibc-2.40-r6.ebuild 54670 BLAKE2B b0a26137adccaf80adb11c0a48bd76ca4d4efd42cea951c917868a234a706aff287e8ae98d4ad8048108b7e93b78c912d7f34daaa14d96b57efa75abbc976def SHA512 9540dad1e32fc21810174e5e3fd5c604f660963046bab86d24ce4accd3eb380acfff9f3ffd4d888917c119f3a8db561b894f8639da249f2d810f4e52ed26f7a1 +EBUILD glibc-2.40-r7.ebuild 54670 BLAKE2B b1d6131882778b27e943d5a6ef15e81288366a66a400f48c0282bdeb5a4559b63168cef8a082d6b4f6910e50411fbbe986ea91ad8f031804fb140cecb9f44144 SHA512 efc619a834f6044de420ad08dd7bbb568b3013954f9dd16b0269bfa983623bc85891061b9b6250b5ac43f09ee567fe875e907463013b2551b3425b8306d8e85d EBUILD glibc-9999.ebuild 54896 BLAKE2B a3c2402443b562c7c5b9fa524fc42acbd19d28806257c463ecff37b1f7ec45717406fa274e8f7f681d01a9f243d24fb1bb484add88160ff5b1e2a7a00ab3ae3d SHA512 6882166fb744d9a48c5b8dd813bb1e749f3a94074713df664a652d05709224fdf6fef3705c9bdd555b59c93fa938623959f48130a9a6a6d7c48b68e0576fb177 MISC metadata.xml 2142 BLAKE2B 765ba540eb10afccd1bade4de56f0c13ce269225500a62d1d17328194de69e7fa15d359a14eac6bfa8a36df45344db3d52f5e1811b174cf1fa2bfb95ad7760a7 SHA512 2f4a148c076a0967663d14e76b85a698ddae7093ff299b0dc95a6c3b00957c9bf73443f2bace9670eb62a45465efbcca892bb52b6aac8577acb2bc5f74a7397c diff --git a/sys-libs/glibc/glibc-2.40-r6.ebuild b/sys-libs/glibc/glibc-2.40-r6.ebuild deleted file mode 100644 index 43646a3ec8c2..000000000000 --- a/sys-libs/glibc/glibc-2.40-r6.ebuild +++ /dev/null @@ -1,1751 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc -# Please read & adapt the page as necessary if obsolete. - -PYTHON_COMPAT=( python3_{10..13} ) -TMPFILES_OPTIONAL=1 - -EMULTILIB_PKG="true" - -# Gentoo patchset (ignored for live ebuilds) -PATCH_VER=6 -PATCH_DEV=dilfridge - -# gcc mulitilib bootstrap files version -GCC_BOOTSTRAP_VER=20201208 - -# systemd integration version -GLIBC_SYSTEMD_VER=20210729 - -# Minimum kernel version that glibc requires -MIN_KERN_VER="3.2.0" - -# Minimum pax-utils version needed (which contains any new syscall changes for -# its seccomp filter!). Please double check this! -MIN_PAX_UTILS_VER="1.3.3" - -# Minimum systemd version needed (which contains any new syscall changes for -# its seccomp filter!). Please double check this! -MIN_SYSTEMD_VER="254.9-r1" - -inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ - multilib systemd multiprocessing tmpfiles - -DESCRIPTION="GNU libc C library" -HOMEPAGE="https://www.gnu.org/software/libc/" - -if [[ ${PV} == 9999* ]]; then - inherit git-r3 -else - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" - SRC_URI="mirror://gnu/glibc/${P}.tar.xz" - SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" -fi - -SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" -SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" - -LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" -SLOT="2.2" -IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" - -# 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. -# - similarly, valgrind requires knowledge about symbols in ld.so: -# bug #920753 -# As Gentoo's strip does not allow us to pass less aggressive stripping -# options and does not check the machine target we strip selectively. - -# We need a new-enough binutils/gcc to match upstream baseline. -# Also we need to make sure our binutils/gcc supports TLS, -# and that gcc already contains the hardened patches. -# Lastly, let's avoid some openssh nastiness, bug 708224, as -# convenience to our users. - -IDEPEND=" - !compile-locales? ( sys-apps/locale-gen ) -" -BDEPEND=" - ${PYTHON_DEPS} - >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} - sys-devel/bison - compile-locales? ( sys-apps/locale-gen ) - doc? ( - dev-lang/perl - sys-apps/texinfo - ) - test? ( - dev-lang/perl - >=net-dns/libidn2-2.3.0 - ) -" -COMMON_DEPEND=" - gd? ( media-libs/gd:2= ) - nscd? ( selinux? ( - audit? ( sys-process/audit ) - caps? ( sys-libs/libcap ) - ) ) - suid? ( caps? ( sys-libs/libcap ) ) - selinux? ( sys-libs/libselinux ) - systemtap? ( dev-debug/systemtap ) -" -DEPEND="${COMMON_DEPEND} -" -RDEPEND="${COMMON_DEPEND} - !' \ - | $(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 - - # We assume CC is already set up. - nonfatal emake 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'; 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 - # For compatibility with older binaries at slight performance cost. - use stack-realign && export CFLAGS+=" -mstackrealign" - ;; - amd64) - # -march needed for #185404 #199334 - # TODO: See cross-compile issues listed above for x86. - if [[ ${ABI} == x86 ]]; then - if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then - local t=${CTARGET_OPT:-${CTARGET}} - t=${t%%-*} - # Normally the target is x86_64-xxx, so turn that into the -march that - # gcc actually accepts. #528708 - [[ ${t} == "x86_64" ]] && t="x86-64" - filter-flags '-march=*' - # ugly, ugly, ugly. ugly. - CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") - export CFLAGS_x86="${CFLAGS_x86} -march=${t}" - einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" - fi - # For compatibility with older binaries at slight performance cost. - use stack-realign && export CFLAGS_x86+=" -mstackrealign" - fi - ;; - mips) - # The mips abi cannot support the GNU style hashes. #233233 - filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both - ;; - ppc|ppc64) - # Many arch-specific implementations do not work on ppc with - # cache-block not equal to 128 bytes. This breaks memset: - # https://sourceware.org/PR26522 - # https://bugs.gentoo.org/737996 - # Use default -mcpu=. For ppc it means non-multiarch setup. - filter-flags '-mcpu=*' - ;; - sparc) - # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. - filter-flags "-fcall-used-g7" - append-flags "-fcall-used-g6" - - local cpu - case ${CTARGET} in - sparc64-*) - cpu="sparc64" - case $(get-flag mcpu) in - v9) - # We need to force at least v9a because the base build doesn't - # work with just v9. - # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 - append-flags "-Wa,-xarch=v9a" - ;; - esac - ;; - sparc-*) - case $(get-flag mcpu) in - v8|supersparc|hypersparc|leon|leon3) - cpu="sparcv8" - ;; - *) - cpu="sparcv9" - ;; - esac - ;; - esac - [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" - ;; - esac -} - -setup_flags() { - # Make sure host make.conf doesn't pollute us - if is_crosscompile || tc-is-cross-compiler ; then - CHOST=${CTARGET} strip-unsupported-flags - fi - - # Store our CFLAGS because it's changed depending on which CTARGET - # we are building when pulling glibc on a multilib profile - CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} - CFLAGS=${CFLAGS_BASE} - CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} - CXXFLAGS=${CXXFLAGS_BASE} - ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} - ASFLAGS=${ASFLAGS_BASE} - - # Allow users to explicitly avoid flag sanitization via - # USE=custom-cflags. - if ! use custom-cflags; then - # Over-zealous CFLAGS can often cause problems. What may work for one - # person may not work for another. To avoid a large influx of bugs - # relating to failed builds, we strip most CFLAGS out to ensure as few - # problems as possible. - strip-flags - - # Allow -O2 and -O3, but nothing else for now. - # TODO: Test -Os, -Oz. - if ! is-flagq '-O@(2|3)' ; then - # Lock glibc at -O2. We want to be conservative here. - filter-flags '-O?' - append-flags -O2 - fi - fi - - strip-unsupported-flags - filter-lto - filter-flags -m32 -m64 '-mabi=*' - - # glibc aborts if rpath is set by LDFLAGS - filter-ldflags '-Wl,-rpath=*' - - # ld can't use -r & --relax at the same time, bug #788901 - # https://sourceware.org/PR27837 - filter-ldflags '-Wl,--relax' - - # Flag added for cross-prefix, but causes ldconfig to segfault. Not needed - # anyway because glibc already handles this by itself. - filter-ldflags '-Wl,--dynamic-linker=*' - - # Fails to link (bug #940709) in some cases but even if it manages to, - # subtle runtime breakage will occur because the linker scripts need - # adaptation. Mentioned in PR21557#c0. - filter-ldflags '-Wl,--gc-sections' - - # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 - # we have to do that here already so mips can filter it out again :P - if use hash-sysv-compat ; then - append-ldflags '-Wl,--hash-style=both' - fi - - # #492892 - filter-flags -frecord-gcc-switches - - # #898098 - filter-flags -fno-builtin - - # #798774 - filter-flags -fno-semantic-interposition - - # #829583 - filter-lfs-flags - - 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" - # https://sourceware.org/glibc/wiki/FAQ#Why_do_I_get:.60.23error_.22glibc_cannot_be_compiled_without_optimization.22.27.2C_when_trying_to_compile_GNU_libc_with_GNU_CC.3F - replace-flags -O0 -O1 - - # glibc handles this internally already where it's appropriate; - # can't always have SSP when we're the ones setting it up, etc - filter-flags '-fstack-protector*' - - # Similar issues as with SSP. Can't inject yourself that early. - filter-flags '-fsanitize=*' - - # See end of bug #830454; we handle this via USE=cet - filter-flags '-fcf-protection=*' - - # When bootstrapping, we may have a situation where - # CET-enabled gcc from seed is used to build CET-disabled - # glibc. As such, gcc implicitly enables CET if no - # -fcf-protection flag is passed. For a typical package it - # should not be a problem, but for glibc it matters as it is - # dealing with CET in ld.so. So if CET is supposed to be - # disabled for glibc, be explicit about it. - if ! use cet; then - case ${ABI}-${CTARGET} in - amd64-x86_64-*|x32-x86_64-*-*-gnux32) - append-flags '-fcf-protection=none' - ;; - arm64-aarch64*) - append-flags '-mbranch-protection=none' - ;; - esac - fi -} - -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 - - # glibc does not work with non-bfd (for various reasons): - # * gold (bug #269274) - # * mold (bug #860900) - tc-ld-force-bfd - - if use doc ; then - export MAKEINFO=makeinfo - else - export MAKEINFO=/dev/null - fi - - # Reset CC and CXX to the value at start of emerge - export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} - export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} - export CPP=${glibc__ORIG_CPP:-${CPP:-$(tc-getCPP ${CTARGET})}} - - # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now. - export glibc__ORIG_CC=${CC} - export glibc__ORIG_CXX=${CXX} - export glibc__ORIG_CPP=${CPP} - - if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then - export glibc__force_gcc=yes - # once this is toggled on, it needs to stay on, since with CPP manipulated - # tc-is-clang does not work correctly anymore... - fi - - if [[ ${glibc__force_gcc} == "yes" ]] ; then - # If we are running in an otherwise clang/llvm environment, we need to - # recover the proper gcc and binutils settings here, at least until glibc - # is finally building with clang. So let's override everything that is - # set in the clang profiles. - # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always - # a good start into that direction. - # Also, if you're crosscompiling, let's assume you know what you are doing. - # Hopefully. - # Last, we need the settings of the *build* environment, not of the - # target environment... - - local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) - local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) - einfo "Overriding clang configuration, since it won't work here" - - export CC="${current_gcc_path}/gcc" - export CPP="${current_gcc_path}/cpp" - export CXX="${current_gcc_path}/g++" - export LD="${current_binutils_path}/ld.bfd" - export AR="${current_binutils_path}/ar" - export AS="${current_binutils_path}/as" - export NM="${current_binutils_path}/nm" - export STRIP="${current_binutils_path}/strip" - export RANLIB="${current_binutils_path}/ranlib" - export OBJCOPY="${current_binutils_path}/objcopy" - export STRINGS="${current_binutils_path}/strings" - export OBJDUMP="${current_binutils_path}/objdump" - export READELF="${current_binutils_path}/readelf" - export ADDR2LINE="${current_binutils_path}/addr2line" - - # do we need to also do flags munging here? yes! at least... - filter-flags '-fuse-ld=*' - filter-flags '-D_FORTIFY_SOURCE=*' - - else - - # this is the "normal" case - - export CC="$(tc-getCC ${CTARGET})" - export CXX="$(tc-getCXX ${CTARGET})" - export CPP="$(tc-getCPP ${CTARGET})" - - # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure - # can't detect them automatically due to ${CHOST} mismatch and fallbacks - # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). - export NM="$(tc-getNM ${CTARGET})" - export READELF="$(tc-getREADELF ${CTARGET})" - - fi - - # 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. (Why does the comment talk about CFLAGS if the code - # acts on CC?) - export glibc__GLIBC_CC=${CC} - export glibc__GLIBC_CXX=${CXX} - export glibc__GLIBC_CPP=${CPP} - - export glibc__abi_CFLAGS="$(get_abi_CFLAGS)" - - # 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="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" - - # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 - export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}" - - export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}" - - if is_crosscompile; then - # Assume worst-case bootstrap: glibc is built for the first time - # with ${CTARGET}-g++ 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 -} - -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+=" (patchset ${PATCH_VER})" - echo "${b}" -} - -# The following Kernel version handling functions are mostly copied from portage -# source. It's better not to use linux-info.eclass here since a) it adds too -# much magic, see bug 326693 for some of the arguments, and b) some of the -# functions are just not provided. - -g_get_running_KV() { - uname -r - return $? -} - -g_KV_major() { - [[ -z $1 ]] && return 1 - local KV=$@ - echo "${KV%%.*}" -} - -g_KV_minor() { - [[ -z $1 ]] && return 1 - local KV=$@ - KV=${KV#*.} - echo "${KV%%.*}" -} - -g_KV_micro() { - [[ -z $1 ]] && return 1 - local KV=$@ - KV=${KV#*.*.} - echo "${KV%%[^[:digit:]]*}" -} - -g_KV_to_int() { - [[ -z $1 ]] && return 1 - local KV_MAJOR=$(g_KV_major "$1") - local KV_MINOR=$(g_KV_minor "$1") - local KV_MICRO=$(g_KV_micro "$1") - local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) - - # We make version 2.2.0 the minimum version we will handle as - # a sanity check ... if its less, we fail ... - if [[ ${KV_int} -ge 131584 ]] ; then - echo "${KV_int}" - return 0 - fi - return 1 -} - -g_int_to_KV() { - local version=$1 major minor micro - major=$((version / 65536)) - minor=$(((version % 65536) / 256)) - micro=$((version % 256)) - echo ${major}.${minor}.${micro} -} - -eend_KV() { - [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] - eend $? -} - -get_kheader_version() { - printf '#include \nLINUX_VERSION_CODE\n' | \ - $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ - tail -n 1 -} - -# We collect all sanity checks here. Consistency is not guranteed between -# pkg_ and src_ phases, so we call this function both in pkg_pretend and in -# src_unpack. -sanity_prechecks() { - # Prevent native builds from downgrading - if [[ ${MERGE_TYPE} != "buildonly" ]] && \ - [[ -z ${ROOT} ]] && \ - [[ ${CBUILD} == ${CHOST} ]] && \ - [[ ${CHOST} == ${CTARGET} ]] ; then - - # The high rev # is to allow people to downgrade between -r# - # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 - # should be fine. Hopefully we never actually use a r# this - # high. - if has_version ">${CATEGORY}/${P}-r10000" ; then - eerror "Sanity check to keep you from breaking your system:" - eerror " Downgrading glibc is not supported and a sure way to destruction." - [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." - fi - - if ! do_run_test '#include \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 - - if [[ ${CTARGET} == i386-* ]] ; then - eerror "i386 CHOSTs are no longer supported." - eerror "Chances are you don't actually want/need i386." - eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" - die "Please fix your CHOST" - fi - - if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then - ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." - ewarn "This will result in a 50% performance penalty when running with a 32bit" - ewarn "hypervisor, which is probably not what you want." - fi - - # ABI-specific checks follow here. Hey, we have a lot more specific conditions that - # we test for... - if ! is_crosscompile ; then - if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then - ebegin "Checking if the system can execute 32-bit binaries" - 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 - if [[ $STAT -ne 0 ]]; then - eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." - eerror "Seek support otherwise." - die "Unable to execute 32-bit binaries" - fi - fi - - fi - - # When we actually have to compile something... - if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then - if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then - # bug #833620, bug #643302 - eerror "Found ${ESYSROOT}/usr/lib/include directory!" - eerror "This is known to break glibc's build." - eerror "Please backup its contents then remove the directory." - die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" - 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 - - # Do not run this check for pkg_pretend, just pkg_setup and friends (if we ever get used there). - # It's plausible (seen it in the wild) that Portage will (correctly) schedule a linux-headers - # upgrade before glibc, but because pkg_pretend gets run before any packages are merged at all (not - # just glibc), the whole emerge gets aborted without a good reason. We probably don't - # need to run this check at all given we have a dependency on the right headers, - # but let's leave it as-is for now. - if [[ ${EBUILD_PHASE_FUNC} != pkg_pretend ]] ; then - 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 - fi -} - -upgrade_warning() { - is_crosscompile && return - - if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then - local oldv newv=$(ver_cut 1-2 ${PV}) - for oldv in ${REPLACING_VERSIONS}; do - if ver_test ${oldv} -lt ${newv}; then - ewarn "After upgrading glibc, please restart all running processes." - ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." - ewarn "Alternatively, reboot your system." - ewarn "(See bug #660556, bug #741116, bug #823756, etc)" - break - fi - done - fi -} - -# -# the phases -# - -# pkg_pretend - -pkg_pretend() { - upgrade_warning -} - -# pkg_setup - -pkg_setup() { - # see bug 682570 - [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup -} - -# src_unpack - -src_unpack() { - setup_env - - einfo "Checking general environment sanity." - sanity_prechecks - - use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz - - if [[ ${PV} == 9999* ]] ; then - EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" - EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git - git-r3_src_unpack - mv patches-git/9999 patches || die - - EGIT_REPO_URI="https://sourceware.org/git/glibc.git" - EGIT_CHECKOUT_DIR=${S} - git-r3_src_unpack - else - unpack ${P}.tar.xz - - cd "${WORKDIR}" || die - unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz - fi - - cd "${WORKDIR}" || die - use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz -} - -# src_prepare - -src_prepare() { - local patchsetname - if ! use vanilla ; then - if [[ ${PV} == 9999* ]] ; then - patchsetname="from git master" - else - patchsetname="${PV}-${PATCH_VER}" - fi - einfo "Applying Gentoo Glibc patchset ${patchsetname}" - eapply "${WORKDIR}"/patches - einfo "Done." - fi - - default - - gnuconfig_update - - cd "${WORKDIR}" || die - find . -name configure -exec touch {} + - - # Fix permissions on some of the scripts. - chmod u+x "${S}"/scripts/*.sh - - cd "${S}" || die -} - -# src_configure - -glibc_do_configure() { - dump_build_environment - - local myconf=() - - # Use '=strong' instead of '=all' to protect only functions - # worth protecting from stack smashes. - myconf+=( --enable-stack-protector=$(usex ssp strong no) ) - - # Keep a whitelist of targets supporting 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|riscv|loong) ;; - # Blacklist everywhere else - *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; - esac - - case ${ABI}-${CTARGET} in - amd64-x86_64-*|x32-x86_64-*-*-gnux32) 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+=( - --disable-werror - --enable-bind-now - --enable-fortify-source - --build=${CBUILD_OPT:-${CBUILD}} - --host=${CTARGET_OPT:-${CTARGET}} - $(use_enable profile) - $(use_with gd) - --with-headers=$(build_eprefix)$(alt_build_headers) - --prefix="$(host_eprefix)/usr" - --sysconfdir="$(host_eprefix)/etc" - --localstatedir="$(host_eprefix)/var" - --libdir='$(prefix)'/$(get_libdir) - --mandir='$(prefix)'/share/man - --infodir='$(prefix)'/share/info - --libexecdir='$(libdir)'/misc/glibc - --with-bugurl=https://bugs.gentoo.org/ - --with-pkgversion="$(glibc_banner)" - $(use_multiarch || echo --disable-multi-arch) - $(use_enable systemtap) - $(use_enable nscd) - - # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if - # Perl hasn't been installed inside the prefix yet and configure picks - # up a Perl from outside the prefix instead. configure will fail to - # execute Perl during configure if we're cross-compiling a prefix, but - # it will just disable mtrace in that case. - # Note: mtrace is needed by the test suite. - ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl $(usex doc "${EPREFIX}"/usr/bin/perl no)))" - - # locale data is arch-independent - # https://bugs.gentoo.org/753740 - libc_cv_complocaledir='${exec_prefix}/lib/locale' - - # On aarch64 there is no way to override -mcpu=native, and if - # the current cpu does not support SVE configure fails. - # Let's boldly assume our toolchain can always build SVE instructions. - libc_cv_aarch64_sve_asm=yes - - ${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)" - - local builddir=$(builddir nptl) - mkdir -p "${builddir}" - cd "${builddir}" - set -- "${S}"/configure "${myconf[@]}" - echo "$@" - "$@" || die "failed to configure glibc" - - # If we're trying to migrate between ABI sets, we need - # to lie and use a local copy of gcc. Like if the system - # is built with MULTILIB_ABIS="amd64 x86" but we want to - # add x32 to it, gcc/glibc don't yet support x32. - # - if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then - echo 'int main(void){}' > "${T}"/test.c || die - 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,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 - - local myconf=() - - case ${CTARGET} in - aarch64*) - # The configure checks fail during cross-build, so disable here - # for headers-only - myconf+=( - --disable-mathvec - ) ;; - 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 - - myconf+=( - --disable-sanity-checks - --enable-hacker-mode - --disable-werror - --enable-bind-now - --build=${CBUILD_OPT:-${CBUILD}} - --host=${CTARGET_OPT:-${CTARGET}} - --with-headers=$(build_eprefix)$(alt_build_headers) - --prefix="$(host_eprefix)/usr" - ${EXTRA_ECONF} - ) - - # Nothing is compiled here which would affect the headers for the target. - # So forcing CC/CFLAGS is sane. - local headers_only_CC=$(tc-getBUILD_CC) - local headers_only_CFLAGS="-O1 -pipe" - local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" - local headers_only_LDFLAGS="" - set -- "${S}"/configure "${myconf[@]}" - echo \ - "CC=${headers_only_CC}" \ - "CFLAGS=${headers_only_CFLAGS}" \ - "CPPFLAGS=${headers_only_CPPFLAGS}" \ - "LDFLAGS=${headers_only_LDFLAGS}" \ - "$@" - CC=${headers_only_CC} \ - CFLAGS=${headers_only_CFLAGS} \ - CPPFLAGS=${headers_only_CPPFLAGS} \ - LDFLAGS="" \ - "$@" || die "failed to configure glibc" -} - -do_src_configure() { - if just_headers ; then - glibc_headers_configure - else - glibc_do_configure nptl - fi -} - -src_configure() { - foreach_abi do_src_configure -} - -# src_compile - -do_src_compile() { - emake -C "$(builddir nptl)" -} - -src_compile() { - if just_headers ; then - return - fi - - foreach_abi do_src_compile -} - -# src_test - -glibc_src_test() { - cd "$(builddir nptl)" - - local myxfailparams="" - if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then - local virt=$(systemd-detect-virt 2>/dev/null) - if [[ ${virt} == systemd-nspawn ]] ; then - ewarn "Skipping extra tests because in systemd-nspawn container" - XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" ) - fi - if [[ "$(nice)" == "19" ]] ; then - # Expects to be able to increase niceness, which it can't do if - # already at the highest nice value - XFAIL_TEST_LIST+=( "tst-nice" ) - fi - - for myt in ${XFAIL_TEST_LIST[@]} ; do - myxfailparams+="test-xfail-${myt}=yes " - done - fi - - # sandbox does not understand unshare() and prevents - # writes to /proc/, which makes many tests fail - - # we give the tests a bit more time to avoid spurious - # bug reports on slow arches - - SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check -} - -src_test() { - if just_headers ; then - return - fi - - foreach_abi glibc_src_test || die "tests failed" -} - -# src_install - -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 - - # bug 736794: we need to be careful with the parallelization... the number of - # processors saved in the environment of a binary package may differ strongly - # from the number of processes available during postinst - local mygenjobs="$(makeopts_jobs)" - if [[ "${EMERGE_FROM}" == "binary" ]] ; then - mygenjobs="$(nproc)" - fi - - set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \ - --destdir "${root}" - echo "$@" - "$@" - - popd >/dev/null -} - -glibc_do_src_install() { - local builddir=$(builddir nptl) - cd "${builddir}" - - emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install - - # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support - # which come without headers etc. Only needed for binary packages since the - # external net-libs/libnsl has increased soversion. Keep only versioned libraries. - find "${D}" -name "libnsl.a" -delete - find "${D}" -name "libnsl.so" -delete - - # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need - # to infer upstream version: - # '#define VERSION "2.26.90"' -> '2.26.90' - local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) - - # Avoid stripping binaries not targeted by ${CHOST}. Or else - # ${CHOST}-strip would break binaries build for ${CTARGET}. - is_crosscompile && dostrip -x / - - # gdb thread introspection relies on local libpthreads symbols. stripping breaks it - # See Note [Disable automatic stripping] - dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so - # valgrind requires knowledge about ld.so symbols. - dostrip -x $(alt_libdir)/ld-*.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 configure toolchains for standalone prefix systems with a sysroot, - # which is prepended to paths in ld scripts, so strip the prefix from these. - # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) ) - # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) - if [[ -n $(host_eprefix) ]] ; then - local file - grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do - sed -i "s|$(host_eprefix)/|/|g" "${file}" || die - done - fi - - # We'll take care of the cache ourselves - rm -f "${ED}"/etc/ld.so.cache - - # Everything past this point just needs to be done once ... - is_final_abi || return 0 - - # Make sure the non-native interp can be found on multilib systems even - # if the main library set isn't installed into the right place. Maybe - # we should query the active gcc for info instead of hardcoding it ? - local i ldso_abi ldso_name - local ldso_abi_list=( - # x86 - amd64 /lib64/ld-linux-x86-64.so.2 - x32 /libx32/ld-linux-x32.so.2 - x86 /lib/ld-linux.so.2 - # mips - o32 /lib/ld.so.1 - n32 /lib32/ld.so.1 - n64 /lib64/ld.so.1 - # powerpc - ppc /lib/ld.so.1 - # riscv - ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 - ilp32 /lib/ld-linux-riscv32-ilp32.so.1 - lp64d /lib/ld-linux-riscv64-lp64d.so.1 - lp64 /lib/ld-linux-riscv64-lp64.so.1 - # s390 - s390 /lib/ld.so.1 - s390x /lib/ld64.so.1 - # sparc - sparc32 /lib/ld-linux.so.2 - sparc64 /lib64/ld-linux.so.2 - ) - case $(tc-endian) in - little) - ldso_abi_list+=( - # arm - arm64 /lib/ld-linux-aarch64.so.1 - # ELFv2 (glibc does not support ELFv1 on LE) - ppc64 /lib64/ld64.so.2 - ) - ;; - big) - ldso_abi_list+=( - # arm - arm64 /lib/ld-linux-aarch64_be.so.1 - # ELFv1 (glibc does not support ELFv2 on BE) - ppc64 /lib64/ld64.so.1 - ) - ;; - esac - if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then - dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib - fi - for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do - ldso_abi=${ldso_abi_list[i]} - has ${ldso_abi} $(get_install_abis) || continue - - ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" - if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then - dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} - fi - done - - # In the LSB 5.0 definition, someone had the excellent idea to "standardize" - # the runtime loader name, see also https://xkcd.com/927/ - # Normally, in Gentoo one should never come across executables that require this. - # However, binary commercial packages are known to adhere to weird practices. - # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB - local lsb_ldso_name native_ldso_name lsb_ldso_abi - local lsb_ldso_abi_list=( - # x86 - amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 - ) - for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do - lsb_ldso_abi=${lsb_ldso_abi_list[i]} - native_ldso_name=${lsb_ldso_abi_list[i+1]} - lsb_ldso_name=${lsb_ldso_abi_list[i+2]} - has ${lsb_ldso_abi} $(get_install_abis) || continue - - if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then - dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" - fi - done - - # With devpts under Linux mounted properly, we do not need the pt_chown - # binary to be setuid. This is because the default owners/perms will be - # exactly what we want. - if ! use suid ; then - find "${ED}" -name pt_chown -exec chmod -s {} + - fi - - ################################################################# - # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # - ################################################################# - - # Make sure we install some symlink hacks so that when we build - # a 2nd stage cross-compiler, gcc finds the target system - # headers correctly. See gcc/doc/gccinstall.info - if is_crosscompile ; then - # We need to make sure that /lib and /usr/lib always exists. - # gcc likes to use relative paths to get to its multilibs like - # /usr/lib/../lib64/. So while we don't install any files into - # /usr/lib/, we do need it to exist. - keepdir $(alt_prefix)/lib - keepdir $(alt_prefix)/usr/lib - - dosym usr/include $(alt_prefix)/sys-include - return 0 - fi - - # Files for Debian-style locale updating - dodir /usr/share/i18n - sed \ - -e "/^#/d" \ - -e "/SUPPORTED-LOCALES=/d" \ - -e "s: \\\\::g" -e "s:/: :g" \ - "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ - || die "generating /usr/share/i18n/SUPPORTED failed" - - cd "${S}" || die - - # Install misc network config files - insinto /etc - doins posix/gai.conf - - if use systemd ; then - doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" - else - doins nss/nsswitch.conf - fi - - # Gentoo-specific - newins "${FILESDIR}"/host.conf-1 host.conf - - if use nscd ; then - doins nscd/nscd.conf - - newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd - - local nscd_args=( - -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" - ) - - sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd - - use systemd && systemd_dounit nscd/nscd.service - newtmpfiles nscd/nscd.tmpfiles nscd.conf - fi - - echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc - doenvd "${T}"/00glibc - - for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do - [[ -s ${d} ]] && dodoc ${d} - done - dodoc -r ChangeLog.old - - # Prevent overwriting of the /etc/localtime symlink. We'll handle the - # creation of the "factory" symlink in pkg_postinst(). - rm -f "${ED}"/etc/localtime - - # Generate all locales if this is a native build as locale generation - if use compile-locales && ! is_crosscompile ; then - run_locale_gen --inplace-glibc "${ED}/" - fi -} - -glibc_headers_install() { - local builddir=$(builddir "headers") - cd "${builddir}" - emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers - - insinto $(alt_headers)/gnu - doins "${S}"/include/gnu/stubs.h - - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - dosym usr/include $(alt_prefix)/sys-include -} - -src_install() { - if just_headers ; then - export ABI=default - glibc_headers_install - return - fi - - foreach_abi glibc_do_src_install - - if ! use static-libs ; then - einfo "Not installing static glibc libraries" - find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete - fi -} - -# Simple test to make sure our new glibc isn't completely broken. -# Make sure we don't test with statically built binaries since -# they will fail. Also, skip if this glibc is a cross compiler. -# -# If coreutils is built with USE=multicall, some of these files -# will just be wrapper scripts, not actual ELFs we can test. -glibc_sanity_check() { - cd / #228809 - - # We enter ${ED} so to avoid trouble if the path contains - # special characters; for instance if the path contains the - # colon character (:), then the linker will try to split it - # and look for the libraries in an unexpected place. This can - # lead to unsafe code execution if the generated prefix is - # within a world-writable directory. - # (e.g. /var/tmp/portage:${HOSTNAME}) - pushd "${ED}"/$(get_libdir) >/dev/null - - # first let's find the actual dynamic linker here - # symlinks may point to the wrong abi - local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) - - einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... - - 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 \ - ${newldso} --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 - - einfo "Checking general environment sanity." - sanity_prechecks - - # prepare /etc/ld.so.conf.d/ for files - mkdir -p "${EROOT}"/etc/ld.so.conf.d - - # Default /etc/hosts.conf:multi to on for systems with small dbs. - if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then - sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf - einfo "Defaulting /etc/host.conf:multi to on" - fi - - [[ -n ${ROOT} ]] && return 0 - [[ -d ${ED}/$(get_libdir) ]] || return 0 - [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check - - if [[ -L ${EROOT}/usr/lib/locale ]]; then - # Help portage migrate this to a directory - # https://bugs.gentoo.org/753740 - rm "${EROOT}"/usr/lib/locale || die - fi - - # Keep around libcrypt so that Perl doesn't break when merging libxcrypt - # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). - # bug #802207 - if has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then - PRESERVED_OLD_LIBCRYPT=1 - cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" \ - "${T}/libcrypt$(get_libname 1)" || die - else - PRESERVED_OLD_LIBCRYPT=0 - fi -} - -glibc_refresh_ldconfig() { - if [[ ${MERGE_TYPE} == buildonly ]]; then - return - fi - - # Version check could be added to avoid unnecessary work, but ldconfig - # should finish quickly enough to not matter. - ebegin "Refreshing ld.so.cache" - ldconfig -i - if ! eend $?; then - ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken" - ewarn "before you manually do so (ldconfig -i)." - fi -} - -pkg_postinst() { - # nothing to do if just installing headers - just_headers && return - - if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then - # Generate fastloading iconv module configuration file. - "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" - fi - - if ! is_crosscompile && [[ -z ${ROOT} ]] ; then - # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags - # handling has changed as well, which means stale ldconfig auxiliary - # cache entries and failure to lookup libgcc_s / libstdc++ (breaking - # every C++ application) / libgomp etc., among other breakages. - # - # To fix this, simply refresh the ld.so.cache without using the - # auxiliary cache if we're natively installing on loong. This should - # be done relatively soon because we want to minimize the breakage - # window for the affected programs. - use loong && glibc_refresh_ldconfig - - use compile-locales || run_locale_gen "${EROOT}/" - fi - - upgrade_warning - - # 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 grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then - ewarn "" - ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" - ewarn "removed from glibc and is now provided by the package" - ewarn " sys-auth/libnss-nis" - ewarn "Install it now to keep your NIS setup working." - ewarn "" - fi - done - fi - - if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then - cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die - preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) - - elog "Please ignore a possible later error message about a file collision involving" - elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" - elog "the upgrade working, but it also needs to be overwritten when" - elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." - fi -} diff --git a/sys-libs/glibc/glibc-2.40-r7.ebuild b/sys-libs/glibc/glibc-2.40-r7.ebuild new file mode 100644 index 000000000000..4b56270760cc --- /dev/null +++ b/sys-libs/glibc/glibc-2.40-r7.ebuild @@ -0,0 +1,1751 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# Bumping notes: https://wiki.gentoo.org/wiki/Project:Toolchain/sys-libs/glibc +# Please read & adapt the page as necessary if obsolete. + +PYTHON_COMPAT=( python3_{10..13} ) +TMPFILES_OPTIONAL=1 + +EMULTILIB_PKG="true" + +# Gentoo patchset (ignored for live ebuilds) +PATCH_VER=7 +PATCH_DEV=dilfridge + +# gcc mulitilib bootstrap files version +GCC_BOOTSTRAP_VER=20201208 + +# systemd integration version +GLIBC_SYSTEMD_VER=20210729 + +# Minimum kernel version that glibc requires +MIN_KERN_VER="3.2.0" + +# Minimum pax-utils version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_PAX_UTILS_VER="1.3.3" + +# Minimum systemd version needed (which contains any new syscall changes for +# its seccomp filter!). Please double check this! +MIN_SYSTEMD_VER="254.9-r1" + +inherit python-any-r1 prefix preserve-libs toolchain-funcs flag-o-matic gnuconfig \ + multilib systemd multiprocessing tmpfiles + +DESCRIPTION="GNU libc C library" +HOMEPAGE="https://www.gnu.org/software/libc/" + +if [[ ${PV} == 9999* ]]; then + inherit git-r3 +else + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + SRC_URI="mirror://gnu/glibc/${P}.tar.xz" + SRC_URI+=" https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${P}-patches-${PATCH_VER}.tar.xz" +fi + +SRC_URI+=" multilib-bootstrap? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" +SRC_URI+=" systemd? ( https://gitweb.gentoo.org/proj/toolchain/glibc-systemd.git/snapshot/glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz )" + +LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" +SLOT="2.2" +IUSE="audit caps cet compile-locales custom-cflags doc gd hash-sysv-compat headers-only +multiarch multilib multilib-bootstrap nscd perl profile selinux +ssp stack-realign +static-libs suid systemd systemtap test vanilla" + +# 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. +# - similarly, valgrind requires knowledge about symbols in ld.so: +# bug #920753 +# As Gentoo's strip does not allow us to pass less aggressive stripping +# options and does not check the machine target we strip selectively. + +# We need a new-enough binutils/gcc to match upstream baseline. +# Also we need to make sure our binutils/gcc supports TLS, +# and that gcc already contains the hardened patches. +# Lastly, let's avoid some openssh nastiness, bug 708224, as +# convenience to our users. + +IDEPEND=" + !compile-locales? ( sys-apps/locale-gen ) +" +BDEPEND=" + ${PYTHON_DEPS} + >=app-misc/pax-utils-${MIN_PAX_UTILS_VER} + sys-devel/bison + compile-locales? ( sys-apps/locale-gen ) + doc? ( + dev-lang/perl + sys-apps/texinfo + ) + test? ( + dev-lang/perl + >=net-dns/libidn2-2.3.0 + ) +" +COMMON_DEPEND=" + gd? ( media-libs/gd:2= ) + nscd? ( selinux? ( + audit? ( sys-process/audit ) + caps? ( sys-libs/libcap ) + ) ) + suid? ( caps? ( sys-libs/libcap ) ) + selinux? ( sys-libs/libselinux ) + systemtap? ( dev-debug/systemtap ) +" +DEPEND="${COMMON_DEPEND} +" +RDEPEND="${COMMON_DEPEND} + !' \ + | $(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 + + # We assume CC is already set up. + nonfatal emake 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'; 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 + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS+=" -mstackrealign" + ;; + amd64) + # -march needed for #185404 #199334 + # TODO: See cross-compile issues listed above for x86. + if [[ ${ABI} == x86 ]]; then + if ! do_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n'; then + local t=${CTARGET_OPT:-${CTARGET}} + t=${t%%-*} + # Normally the target is x86_64-xxx, so turn that into the -march that + # gcc actually accepts. #528708 + [[ ${t} == "x86_64" ]] && t="x86-64" + filter-flags '-march=*' + # ugly, ugly, ugly. ugly. + CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") + export CFLAGS_x86="${CFLAGS_x86} -march=${t}" + einfo "Auto adding -march=${t} to CFLAGS_x86 #185404 (ABI=${ABI})" + fi + # For compatibility with older binaries at slight performance cost. + use stack-realign && export CFLAGS_x86+=" -mstackrealign" + fi + ;; + mips) + # The mips abi cannot support the GNU style hashes. #233233 + filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both + ;; + ppc|ppc64) + # Many arch-specific implementations do not work on ppc with + # cache-block not equal to 128 bytes. This breaks memset: + # https://sourceware.org/PR26522 + # https://bugs.gentoo.org/737996 + # Use default -mcpu=. For ppc it means non-multiarch setup. + filter-flags '-mcpu=*' + ;; + sparc) + # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. + filter-flags "-fcall-used-g7" + append-flags "-fcall-used-g6" + + local cpu + case ${CTARGET} in + sparc64-*) + cpu="sparc64" + case $(get-flag mcpu) in + v9) + # We need to force at least v9a because the base build doesn't + # work with just v9. + # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 + append-flags "-Wa,-xarch=v9a" + ;; + esac + ;; + sparc-*) + case $(get-flag mcpu) in + v8|supersparc|hypersparc|leon|leon3) + cpu="sparcv8" + ;; + *) + cpu="sparcv9" + ;; + esac + ;; + esac + [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" + ;; + esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Allow users to explicitly avoid flag sanitization via + # USE=custom-cflags. + if ! use custom-cflags; then + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + + # Allow -O2 and -O3, but nothing else for now. + # TODO: Test -Os, -Oz. + if ! is-flagq '-O@(2|3)' ; then + # Lock glibc at -O2. We want to be conservative here. + filter-flags '-O?' + append-flags -O2 + fi + fi + + strip-unsupported-flags + filter-lto + filter-flags -m32 -m64 '-mabi=*' + + # glibc aborts if rpath is set by LDFLAGS + filter-ldflags '-Wl,-rpath=*' + + # ld can't use -r & --relax at the same time, bug #788901 + # https://sourceware.org/PR27837 + filter-ldflags '-Wl,--relax' + + # Flag added for cross-prefix, but causes ldconfig to segfault. Not needed + # anyway because glibc already handles this by itself. + filter-ldflags '-Wl,--dynamic-linker=*' + + # Fails to link (bug #940709) in some cases but even if it manages to, + # subtle runtime breakage will occur because the linker scripts need + # adaptation. Mentioned in PR21557#c0. + filter-ldflags '-Wl,--gc-sections' + + # some weird software relies on sysv hashes in glibc, bug 863863, bug 864100 + # we have to do that here already so mips can filter it out again :P + if use hash-sysv-compat ; then + append-ldflags '-Wl,--hash-style=both' + fi + + # #492892 + filter-flags -frecord-gcc-switches + + # #898098 + filter-flags -fno-builtin + + # #798774 + filter-flags -fno-semantic-interposition + + # #829583 + filter-lfs-flags + + 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" + # https://sourceware.org/glibc/wiki/FAQ#Why_do_I_get:.60.23error_.22glibc_cannot_be_compiled_without_optimization.22.27.2C_when_trying_to_compile_GNU_libc_with_GNU_CC.3F + replace-flags -O0 -O1 + + # glibc handles this internally already where it's appropriate; + # can't always have SSP when we're the ones setting it up, etc + filter-flags '-fstack-protector*' + + # Similar issues as with SSP. Can't inject yourself that early. + filter-flags '-fsanitize=*' + + # See end of bug #830454; we handle this via USE=cet + filter-flags '-fcf-protection=*' + + # When bootstrapping, we may have a situation where + # CET-enabled gcc from seed is used to build CET-disabled + # glibc. As such, gcc implicitly enables CET if no + # -fcf-protection flag is passed. For a typical package it + # should not be a problem, but for glibc it matters as it is + # dealing with CET in ld.so. So if CET is supposed to be + # disabled for glibc, be explicit about it. + if ! use cet; then + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) + append-flags '-fcf-protection=none' + ;; + arm64-aarch64*) + append-flags '-mbranch-protection=none' + ;; + esac + fi +} + +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 + + # glibc does not work with non-bfd (for various reasons): + # * gold (bug #269274) + # * mold (bug #860900) + tc-ld-force-bfd + + if use doc ; then + export MAKEINFO=makeinfo + else + export MAKEINFO=/dev/null + fi + + # Reset CC and CXX to the value at start of emerge + export CC=${glibc__ORIG_CC:-${CC:-$(tc-getCC ${CTARGET})}} + export CXX=${glibc__ORIG_CXX:-${CXX:-$(tc-getCXX ${CTARGET})}} + export CPP=${glibc__ORIG_CPP:-${CPP:-$(tc-getCPP ${CTARGET})}} + + # and make sure glibc__ORIG_CC and glibc__ORIG_CXX is defined now. + export glibc__ORIG_CC=${CC} + export glibc__ORIG_CXX=${CXX} + export glibc__ORIG_CPP=${CPP} + + if tc-is-clang && ! use custom-cflags && ! is_crosscompile ; then + export glibc__force_gcc=yes + # once this is toggled on, it needs to stay on, since with CPP manipulated + # tc-is-clang does not work correctly anymore... + fi + + if [[ ${glibc__force_gcc} == "yes" ]] ; then + # If we are running in an otherwise clang/llvm environment, we need to + # recover the proper gcc and binutils settings here, at least until glibc + # is finally building with clang. So let's override everything that is + # set in the clang profiles. + # Want to shoot yourself into the foot? Set USE=custom-cflags, that's always + # a good start into that direction. + # Also, if you're crosscompiling, let's assume you know what you are doing. + # Hopefully. + # Last, we need the settings of the *build* environment, not of the + # target environment... + + local current_binutils_path=$(env ROOT="${BROOT}" binutils-config -B) + local current_gcc_path=$(env ROOT="${BROOT}" gcc-config -B) + einfo "Overriding clang configuration, since it won't work here" + + export CC="${current_gcc_path}/gcc" + export CPP="${current_gcc_path}/cpp" + export CXX="${current_gcc_path}/g++" + export LD="${current_binutils_path}/ld.bfd" + export AR="${current_binutils_path}/ar" + export AS="${current_binutils_path}/as" + export NM="${current_binutils_path}/nm" + export STRIP="${current_binutils_path}/strip" + export RANLIB="${current_binutils_path}/ranlib" + export OBJCOPY="${current_binutils_path}/objcopy" + export STRINGS="${current_binutils_path}/strings" + export OBJDUMP="${current_binutils_path}/objdump" + export READELF="${current_binutils_path}/readelf" + export ADDR2LINE="${current_binutils_path}/addr2line" + + # do we need to also do flags munging here? yes! at least... + filter-flags '-fuse-ld=*' + filter-flags '-D_FORTIFY_SOURCE=*' + + else + + # this is the "normal" case + + export CC="$(tc-getCC ${CTARGET})" + export CXX="$(tc-getCXX ${CTARGET})" + export CPP="$(tc-getCPP ${CTARGET})" + + # Always use tuple-prefixed toolchain. For non-native ABI glibc's configure + # can't detect them automatically due to ${CHOST} mismatch and fallbacks + # to unprefixed tools. Similar to multilib.eclass:multilib_toolchain_setup(). + export NM="$(tc-getNM ${CTARGET})" + export READELF="$(tc-getREADELF ${CTARGET})" + + fi + + # 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. (Why does the comment talk about CFLAGS if the code + # acts on CC?) + export glibc__GLIBC_CC=${CC} + export glibc__GLIBC_CXX=${CXX} + export glibc__GLIBC_CPP=${CPP} + + export glibc__abi_CFLAGS="$(get_abi_CFLAGS)" + + # 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="${glibc__GLIBC_CC} ${glibc__abi_CFLAGS} ${CFLAGS} ${LDFLAGS}" + + # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548 + export CXX="${glibc__GLIBC_CXX} ${glibc__abi_CFLAGS} ${CFLAGS}" + + export CPP="${glibc__GLIBC_CPP} ${glibc__abi_CFLAGS} ${CFLAGS}" + + if is_crosscompile; then + # Assume worst-case bootstrap: glibc is built for the first time + # with ${CTARGET}-g++ 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 +} + +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+=" (patchset ${PATCH_VER})" + echo "${b}" +} + +# The following Kernel version handling functions are mostly copied from portage +# source. It's better not to use linux-info.eclass here since a) it adds too +# much magic, see bug 326693 for some of the arguments, and b) some of the +# functions are just not provided. + +g_get_running_KV() { + uname -r + return $? +} + +g_KV_major() { + [[ -z $1 ]] && return 1 + local KV=$@ + echo "${KV%%.*}" +} + +g_KV_minor() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.} + echo "${KV%%.*}" +} + +g_KV_micro() { + [[ -z $1 ]] && return 1 + local KV=$@ + KV=${KV#*.*.} + echo "${KV%%[^[:digit:]]*}" +} + +g_KV_to_int() { + [[ -z $1 ]] && return 1 + local KV_MAJOR=$(g_KV_major "$1") + local KV_MINOR=$(g_KV_minor "$1") + local KV_MICRO=$(g_KV_micro "$1") + local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO )) + + # We make version 2.2.0 the minimum version we will handle as + # a sanity check ... if its less, we fail ... + if [[ ${KV_int} -ge 131584 ]] ; then + echo "${KV_int}" + return 0 + fi + return 1 +} + +g_int_to_KV() { + local version=$1 major minor micro + major=$((version / 65536)) + minor=$(((version % 65536) / 256)) + micro=$((version % 256)) + echo ${major}.${minor}.${micro} +} + +eend_KV() { + [[ $(g_KV_to_int $1) -ge $(g_KV_to_int $2) ]] + eend $? +} + +get_kheader_version() { + printf '#include \nLINUX_VERSION_CODE\n' | \ + $(tc-getCPP ${CTARGET}) -I "$(build_eprefix)$(alt_build_headers)" - | \ + tail -n 1 +} + +# We collect all sanity checks here. Consistency is not guranteed between +# pkg_ and src_ phases, so we call this function both in pkg_pretend and in +# src_unpack. +sanity_prechecks() { + # Prevent native builds from downgrading + if [[ ${MERGE_TYPE} != "buildonly" ]] && \ + [[ -z ${ROOT} ]] && \ + [[ ${CBUILD} == ${CHOST} ]] && \ + [[ ${CHOST} == ${CTARGET} ]] ; then + + # The high rev # is to allow people to downgrade between -r# + # versions. We want to block 2.20->2.19, but 2.20-r3->2.20-r2 + # should be fine. Hopefully we never actually use a r# this + # high. + if has_version ">${CATEGORY}/${P}-r10000" ; then + eerror "Sanity check to keep you from breaking your system:" + eerror " Downgrading glibc is not supported and a sure way to destruction." + [[ ${I_ALLOW_TO_BREAK_MY_SYSTEM} = yes ]] || die "Aborting to save your system." + fi + + if ! do_run_test '#include \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 + + if [[ ${CTARGET} == i386-* ]] ; then + eerror "i386 CHOSTs are no longer supported." + eerror "Chances are you don't actually want/need i386." + eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml" + die "Please fix your CHOST" + fi + + if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then + ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." + ewarn "This will result in a 50% performance penalty when running with a 32bit" + ewarn "hypervisor, which is probably not what you want." + fi + + # ABI-specific checks follow here. Hey, we have a lot more specific conditions that + # we test for... + if ! is_crosscompile ; then + if use amd64 && use multilib && [[ ${MERGE_TYPE} != "binary" ]] ; then + ebegin "Checking if the system can execute 32-bit binaries" + 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 + if [[ $STAT -ne 0 ]]; then + eerror "Ensure that CONFIG_IA32_EMULATION is enabled in the kernel." + eerror "Seek support otherwise." + die "Unable to execute 32-bit binaries" + fi + fi + + fi + + # When we actually have to compile something... + if ! just_headers && [[ ${MERGE_TYPE} != "binary" ]] ; then + if [[ -d "${ESYSROOT}"/usr/lib/include ]] ; then + # bug #833620, bug #643302 + eerror "Found ${ESYSROOT}/usr/lib/include directory!" + eerror "This is known to break glibc's build." + eerror "Please backup its contents then remove the directory." + die "Found directory (${ESYSROOT}/usr/lib/include) which will break build (bug #833620)!" + 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 + + # Do not run this check for pkg_pretend, just pkg_setup and friends (if we ever get used there). + # It's plausible (seen it in the wild) that Portage will (correctly) schedule a linux-headers + # upgrade before glibc, but because pkg_pretend gets run before any packages are merged at all (not + # just glibc), the whole emerge gets aborted without a good reason. We probably don't + # need to run this check at all given we have a dependency on the right headers, + # but let's leave it as-is for now. + if [[ ${EBUILD_PHASE_FUNC} != pkg_pretend ]] ; then + 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 + fi +} + +upgrade_warning() { + is_crosscompile && return + + if [[ ${MERGE_TYPE} != buildonly && -n ${REPLACING_VERSIONS} && -z ${ROOT} ]]; then + local oldv newv=$(ver_cut 1-2 ${PV}) + for oldv in ${REPLACING_VERSIONS}; do + if ver_test ${oldv} -lt ${newv}; then + ewarn "After upgrading glibc, please restart all running processes." + ewarn "Be sure to include init (telinit u) or systemd (systemctl daemon-reexec)." + ewarn "Alternatively, reboot your system." + ewarn "(See bug #660556, bug #741116, bug #823756, etc)" + break + fi + done + fi +} + +# +# the phases +# + +# pkg_pretend + +pkg_pretend() { + upgrade_warning +} + +# pkg_setup + +pkg_setup() { + # see bug 682570 + [[ -z ${BOOTSTRAP_RAP} ]] && python-any-r1_pkg_setup +} + +# src_unpack + +src_unpack() { + setup_env + + einfo "Checking general environment sanity." + sanity_prechecks + + use multilib-bootstrap && unpack gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz + + if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="https://anongit.gentoo.org/git/proj/toolchain/glibc-patches.git" + EGIT_CHECKOUT_DIR=${WORKDIR}/patches-git + git-r3_src_unpack + mv patches-git/9999 patches || die + + EGIT_REPO_URI="https://sourceware.org/git/glibc.git" + EGIT_CHECKOUT_DIR=${S} + git-r3_src_unpack + else + unpack ${P}.tar.xz + + cd "${WORKDIR}" || die + unpack glibc-${PV}-patches-${PATCH_VER}.tar.xz + fi + + cd "${WORKDIR}" || die + use systemd && unpack glibc-systemd-${GLIBC_SYSTEMD_VER}.tar.gz +} + +# src_prepare + +src_prepare() { + local patchsetname + if ! use vanilla ; then + if [[ ${PV} == 9999* ]] ; then + patchsetname="from git master" + else + patchsetname="${PV}-${PATCH_VER}" + fi + einfo "Applying Gentoo Glibc patchset ${patchsetname}" + eapply "${WORKDIR}"/patches + einfo "Done." + fi + + default + + gnuconfig_update + + cd "${WORKDIR}" || die + find . -name configure -exec touch {} + + + # Fix permissions on some of the scripts. + chmod u+x "${S}"/scripts/*.sh + + cd "${S}" || die +} + +# src_configure + +glibc_do_configure() { + dump_build_environment + + local myconf=() + + # Use '=strong' instead of '=all' to protect only functions + # worth protecting from stack smashes. + myconf+=( --enable-stack-protector=$(usex ssp strong no) ) + + # Keep a whitelist of targets supporting 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|riscv|loong) ;; + # Blacklist everywhere else + *) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;; + esac + + case ${ABI}-${CTARGET} in + amd64-x86_64-*|x32-x86_64-*-*-gnux32) 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+=( + --disable-werror + --enable-bind-now + --enable-fortify-source + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + $(use_enable profile) + $(use_with gd) + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + --sysconfdir="$(host_eprefix)/etc" + --localstatedir="$(host_eprefix)/var" + --libdir='$(prefix)'/$(get_libdir) + --mandir='$(prefix)'/share/man + --infodir='$(prefix)'/share/info + --libexecdir='$(libdir)'/misc/glibc + --with-bugurl=https://bugs.gentoo.org/ + --with-pkgversion="$(glibc_banner)" + $(use_multiarch || echo --disable-multi-arch) + $(use_enable systemtap) + $(use_enable nscd) + + # /usr/bin/mtrace has a Perl shebang. Gentoo Prefix QA checks fail if + # Perl hasn't been installed inside the prefix yet and configure picks + # up a Perl from outside the prefix instead. configure will fail to + # execute Perl during configure if we're cross-compiling a prefix, but + # it will just disable mtrace in that case. + # Note: mtrace is needed by the test suite. + ac_cv_path_PERL="$(usex perl "${EPREFIX}"/usr/bin/perl $(usex test "${EPREFIX}"/usr/bin/perl $(usex doc "${EPREFIX}"/usr/bin/perl no)))" + + # locale data is arch-independent + # https://bugs.gentoo.org/753740 + libc_cv_complocaledir='${exec_prefix}/lib/locale' + + # On aarch64 there is no way to override -mcpu=native, and if + # the current cpu does not support SVE configure fails. + # Let's boldly assume our toolchain can always build SVE instructions. + libc_cv_aarch64_sve_asm=yes + + ${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)" + + local builddir=$(builddir nptl) + mkdir -p "${builddir}" + cd "${builddir}" + set -- "${S}"/configure "${myconf[@]}" + echo "$@" + "$@" || die "failed to configure glibc" + + # If we're trying to migrate between ABI sets, we need + # to lie and use a local copy of gcc. Like if the system + # is built with MULTILIB_ABIS="amd64 x86" but we want to + # add x32 to it, gcc/glibc don't yet support x32. + # + if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib-bootstrap ; then + echo 'int main(void){}' > "${T}"/test.c || die + 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,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 + + local myconf=() + + case ${CTARGET} in + aarch64*) + # The configure checks fail during cross-build, so disable here + # for headers-only + myconf+=( + --disable-mathvec + ) ;; + 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 + + myconf+=( + --disable-sanity-checks + --enable-hacker-mode + --disable-werror + --enable-bind-now + --build=${CBUILD_OPT:-${CBUILD}} + --host=${CTARGET_OPT:-${CTARGET}} + --with-headers=$(build_eprefix)$(alt_build_headers) + --prefix="$(host_eprefix)/usr" + ${EXTRA_ECONF} + ) + + # Nothing is compiled here which would affect the headers for the target. + # So forcing CC/CFLAGS is sane. + local headers_only_CC=$(tc-getBUILD_CC) + local headers_only_CFLAGS="-O1 -pipe" + local headers_only_CPPFLAGS="-U_FORTIFY_SOURCE ${headers_only_arch_CPPFLAGS[*]}" + local headers_only_LDFLAGS="" + set -- "${S}"/configure "${myconf[@]}" + echo \ + "CC=${headers_only_CC}" \ + "CFLAGS=${headers_only_CFLAGS}" \ + "CPPFLAGS=${headers_only_CPPFLAGS}" \ + "LDFLAGS=${headers_only_LDFLAGS}" \ + "$@" + CC=${headers_only_CC} \ + CFLAGS=${headers_only_CFLAGS} \ + CPPFLAGS=${headers_only_CPPFLAGS} \ + LDFLAGS="" \ + "$@" || die "failed to configure glibc" +} + +do_src_configure() { + if just_headers ; then + glibc_headers_configure + else + glibc_do_configure nptl + fi +} + +src_configure() { + foreach_abi do_src_configure +} + +# src_compile + +do_src_compile() { + emake -C "$(builddir nptl)" +} + +src_compile() { + if just_headers ; then + return + fi + + foreach_abi do_src_compile +} + +# src_test + +glibc_src_test() { + cd "$(builddir nptl)" + + local myxfailparams="" + if [[ "${GENTOO_GLIBC_XFAIL_TESTS}" == "yes" ]] ; then + local virt=$(systemd-detect-virt 2>/dev/null) + if [[ ${virt} == systemd-nspawn ]] ; then + ewarn "Skipping extra tests because in systemd-nspawn container" + XFAIL_TEST_LIST+=( "${XFAIL_NSPAWN_TEST_LIST[@]}" ) + fi + if [[ "$(nice)" == "19" ]] ; then + # Expects to be able to increase niceness, which it can't do if + # already at the highest nice value + XFAIL_TEST_LIST+=( "tst-nice" ) + fi + + for myt in ${XFAIL_TEST_LIST[@]} ; do + myxfailparams+="test-xfail-${myt}=yes " + done + fi + + # sandbox does not understand unshare() and prevents + # writes to /proc/, which makes many tests fail + + # we give the tests a bit more time to avoid spurious + # bug reports on slow arches + + SANDBOX_ON=0 LD_PRELOAD= TIMEOUTFACTOR=16 emake ${myxfailparams} check +} + +src_test() { + if just_headers ; then + return + fi + + foreach_abi glibc_src_test || die "tests failed" +} + +# src_install + +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 + + # bug 736794: we need to be careful with the parallelization... the number of + # processors saved in the environment of a binary package may differ strongly + # from the number of processes available during postinst + local mygenjobs="$(makeopts_jobs)" + if [[ "${EMERGE_FROM}" == "binary" ]] ; then + mygenjobs="$(nproc)" + fi + + set -- locale-gen ${inplace} --jobs "${mygenjobs}" --config "${locale_list}" \ + --destdir "${root}" + echo "$@" + "$@" + + popd >/dev/null +} + +glibc_do_src_install() { + local builddir=$(builddir nptl) + cd "${builddir}" + + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install + + # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support + # which come without headers etc. Only needed for binary packages since the + # external net-libs/libnsl has increased soversion. Keep only versioned libraries. + find "${D}" -name "libnsl.a" -delete + find "${D}" -name "libnsl.so" -delete + + # Normally upstream_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) + + # Avoid stripping binaries not targeted by ${CHOST}. Or else + # ${CHOST}-strip would break binaries build for ${CTARGET}. + is_crosscompile && dostrip -x / + + # gdb thread introspection relies on local libpthreads symbols. stripping breaks it + # See Note [Disable automatic stripping] + dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so + # valgrind requires knowledge about ld.so symbols. + dostrip -x $(alt_libdir)/ld-*.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 configure toolchains for standalone prefix systems with a sysroot, + # which is prepended to paths in ld scripts, so strip the prefix from these. + # Before: GROUP ( /foo/lib64/libc.so.6 /foo/usr/lib64/libc_nonshared.a AS_NEEDED ( /foo/lib64/ld-linux-x86-64.so.2 ) ) + # After: GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib64/ld-linux-x86-64.so.2 ) ) + if [[ -n $(host_eprefix) ]] ; then + local file + grep -lZIF "ld script" "${ED}/$(alt_usrlibdir)"/lib*.{a,so} 2>/dev/null | while read -rd '' file ; do + sed -i "s|$(host_eprefix)/|/|g" "${file}" || die + done + fi + + # We'll take care of the cache ourselves + rm -f "${ED}"/etc/ld.so.cache + + # Everything past this point just needs to be done once ... + is_final_abi || return 0 + + # Make sure the non-native interp can be found on multilib systems even + # if the main library set isn't installed into the right place. Maybe + # we should query the active gcc for info instead of hardcoding it ? + local i ldso_abi ldso_name + local ldso_abi_list=( + # x86 + amd64 /lib64/ld-linux-x86-64.so.2 + x32 /libx32/ld-linux-x32.so.2 + x86 /lib/ld-linux.so.2 + # mips + o32 /lib/ld.so.1 + n32 /lib32/ld.so.1 + n64 /lib64/ld.so.1 + # powerpc + ppc /lib/ld.so.1 + # riscv + ilp32d /lib/ld-linux-riscv32-ilp32d.so.1 + ilp32 /lib/ld-linux-riscv32-ilp32.so.1 + lp64d /lib/ld-linux-riscv64-lp64d.so.1 + lp64 /lib/ld-linux-riscv64-lp64.so.1 + # s390 + s390 /lib/ld.so.1 + s390x /lib/ld64.so.1 + # sparc + sparc32 /lib/ld-linux.so.2 + sparc64 /lib64/ld-linux.so.2 + ) + case $(tc-endian) in + little) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64.so.1 + # ELFv2 (glibc does not support ELFv1 on LE) + ppc64 /lib64/ld64.so.2 + ) + ;; + big) + ldso_abi_list+=( + # arm + arm64 /lib/ld-linux-aarch64_be.so.1 + # ELFv1 (glibc does not support ELFv2 on BE) + ppc64 /lib64/ld64.so.1 + ) + ;; + esac + if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then + dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib + fi + for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do + ldso_abi=${ldso_abi_list[i]} + has ${ldso_abi} $(get_install_abis) || continue + + ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}" + if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then + dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name} + fi + done + + # In the LSB 5.0 definition, someone had the excellent idea to "standardize" + # the runtime loader name, see also https://xkcd.com/927/ + # Normally, in Gentoo one should never come across executables that require this. + # However, binary commercial packages are known to adhere to weird practices. + # https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-AMD64/LSB-Core-AMD64.html#BASELIB + local lsb_ldso_name native_ldso_name lsb_ldso_abi + local lsb_ldso_abi_list=( + # x86 + amd64 ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3 + ) + for (( i = 0; i < ${#lsb_ldso_abi_list[@]}; i += 3 )) ; do + lsb_ldso_abi=${lsb_ldso_abi_list[i]} + native_ldso_name=${lsb_ldso_abi_list[i+1]} + lsb_ldso_name=${lsb_ldso_abi_list[i+2]} + has ${lsb_ldso_abi} $(get_install_abis) || continue + + if [[ ! -L ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} && ! -e ${ED}/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name} ]] ; then + dosym ${native_ldso_name} "$(alt_prefix)/$(get_abi_LIBDIR ${lsb_ldso_abi})/${lsb_ldso_name}" + fi + done + + # With devpts under Linux mounted properly, we do not need the pt_chown + # binary to be setuid. This is because the default owners/perms will be + # exactly what we want. + if ! use suid ; then + find "${ED}" -name pt_chown -exec chmod -s {} + + fi + + ################################################################# + # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # + ################################################################# + + # Make sure we install some symlink hacks so that when we build + # a 2nd stage cross-compiler, gcc finds the target system + # headers correctly. See gcc/doc/gccinstall.info + if is_crosscompile ; then + # We need to make sure that /lib and /usr/lib always exists. + # gcc likes to use relative paths to get to its multilibs like + # /usr/lib/../lib64/. So while we don't install any files into + # /usr/lib/, we do need it to exist. + keepdir $(alt_prefix)/lib + keepdir $(alt_prefix)/usr/lib + + dosym usr/include $(alt_prefix)/sys-include + return 0 + fi + + # Files for Debian-style locale updating + dodir /usr/share/i18n + sed \ + -e "/^#/d" \ + -e "/SUPPORTED-LOCALES=/d" \ + -e "s: \\\\::g" -e "s:/: :g" \ + "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \ + || die "generating /usr/share/i18n/SUPPORTED failed" + + cd "${S}" || die + + # Install misc network config files + insinto /etc + doins posix/gai.conf + + if use systemd ; then + doins "${WORKDIR}/glibc-systemd-${GLIBC_SYSTEMD_VER}/gentoo-config/nsswitch.conf" + else + doins nss/nsswitch.conf + fi + + # Gentoo-specific + newins "${FILESDIR}"/host.conf-1 host.conf + + if use nscd ; then + doins nscd/nscd.conf + + newinitd "$(prefixify_ro "${FILESDIR}"/nscd-1)" nscd + + local nscd_args=( + -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):" + ) + + sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd + + use systemd && systemd_dounit nscd/nscd.service + newtmpfiles nscd/nscd.tmpfiles nscd.conf + fi + + echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc + doenvd "${T}"/00glibc + + for d in BUGS ChangeLog CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do + [[ -s ${d} ]] && dodoc ${d} + done + dodoc -r ChangeLog.old + + # Prevent overwriting of the /etc/localtime symlink. We'll handle the + # creation of the "factory" symlink in pkg_postinst(). + rm -f "${ED}"/etc/localtime + + # Generate all locales if this is a native build as locale generation + if use compile-locales && ! is_crosscompile ; then + run_locale_gen --inplace-glibc "${ED}/" + fi +} + +glibc_headers_install() { + local builddir=$(builddir "headers") + cd "${builddir}" + emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers + + insinto $(alt_headers)/gnu + doins "${S}"/include/gnu/stubs.h + + # Make sure we install the sys-include symlink so that when + # we build a 2nd stage cross-compiler, gcc finds the target + # system headers correctly. See gcc/doc/gccinstall.info + dosym usr/include $(alt_prefix)/sys-include +} + +src_install() { + if just_headers ; then + export ABI=default + glibc_headers_install + return + fi + + foreach_abi glibc_do_src_install + + if ! use static-libs ; then + einfo "Not installing static glibc libraries" + find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete + fi +} + +# Simple test to make sure our new glibc isn't completely broken. +# Make sure we don't test with statically built binaries since +# they will fail. Also, skip if this glibc is a cross compiler. +# +# If coreutils is built with USE=multicall, some of these files +# will just be wrapper scripts, not actual ELFs we can test. +glibc_sanity_check() { + cd / #228809 + + # We enter ${ED} so to avoid trouble if the path contains + # special characters; for instance if the path contains the + # colon character (:), then the linker will try to split it + # and look for the libraries in an unexpected place. This can + # lead to unsafe code execution if the generated prefix is + # within a world-writable directory. + # (e.g. /var/tmp/portage:${HOSTNAME}) + pushd "${ED}"/$(get_libdir) >/dev/null + + # first let's find the actual dynamic linker here + # symlinks may point to the wrong abi + local newldso=$(find . -maxdepth 1 -name 'ld*so.?' -type f -print -quit) + + einfo Last-minute run tests with ${newldso} in /$(get_libdir) ... + + 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 \ + ${newldso} --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 + + einfo "Checking general environment sanity." + sanity_prechecks + + # prepare /etc/ld.so.conf.d/ for files + mkdir -p "${EROOT}"/etc/ld.so.conf.d + + # Default /etc/hosts.conf:multi to on for systems with small dbs. + if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then + sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf + einfo "Defaulting /etc/host.conf:multi to on" + fi + + [[ -n ${ROOT} ]] && return 0 + [[ -d ${ED}/$(get_libdir) ]] || return 0 + [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check + + if [[ -L ${EROOT}/usr/lib/locale ]]; then + # Help portage migrate this to a directory + # https://bugs.gentoo.org/753740 + rm "${EROOT}"/usr/lib/locale || die + fi + + # Keep around libcrypt so that Perl doesn't break when merging libxcrypt + # (libxcrypt is the new provider for now of libcrypt.so.{1,2}). + # bug #802207 + if has_version "${CATEGORY}/${PN}[crypt]" && ! has preserve-libs ${FEATURES}; then + PRESERVED_OLD_LIBCRYPT=1 + cp -p "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" \ + "${T}/libcrypt$(get_libname 1)" || die + else + PRESERVED_OLD_LIBCRYPT=0 + fi +} + +glibc_refresh_ldconfig() { + if [[ ${MERGE_TYPE} == buildonly ]]; then + return + fi + + # Version check could be added to avoid unnecessary work, but ldconfig + # should finish quickly enough to not matter. + ebegin "Refreshing ld.so.cache" + ldconfig -i + if ! eend $?; then + ewarn "Failed to refresh the ld.so.cache for you. Some programs may be broken" + ewarn "before you manually do so (ldconfig -i)." + fi +} + +pkg_postinst() { + # nothing to do if just installing headers + just_headers && return + + if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then + # Generate fastloading iconv module configuration file. + "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" + fi + + if ! is_crosscompile && [[ -z ${ROOT} ]] ; then + # glibc-2.38+ on loong has ldconfig support added, but the ELF e_flags + # handling has changed as well, which means stale ldconfig auxiliary + # cache entries and failure to lookup libgcc_s / libstdc++ (breaking + # every C++ application) / libgomp etc., among other breakages. + # + # To fix this, simply refresh the ld.so.cache without using the + # auxiliary cache if we're natively installing on loong. This should + # be done relatively soon because we want to minimize the breakage + # window for the affected programs. + use loong && glibc_refresh_ldconfig + + use compile-locales || run_locale_gen "${EROOT}/" + fi + + upgrade_warning + + # 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 grep -E -q "^[ \t]*${entry}:.*nis" "${EROOT}"/etc/nsswitch.conf; then + ewarn "" + ewarn "Your ${EROOT}/etc/nsswitch.conf uses NIS. Support for that has been" + ewarn "removed from glibc and is now provided by the package" + ewarn " sys-auth/libnss-nis" + ewarn "Install it now to keep your NIS setup working." + ewarn "" + fi + done + fi + + if [[ ${PRESERVED_OLD_LIBCRYPT} -eq 1 ]] ; then + cp -p "${T}/libcrypt$(get_libname 1)" "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1)" || die + preserve_old_lib_notify /$(get_libdir)/libcrypt$(get_libname 1) + + elog "Please ignore a possible later error message about a file collision involving" + elog "${EROOT}/$(get_libdir)/libcrypt$(get_libname 1). We need to preserve this file for the moment to keep" + elog "the upgrade working, but it also needs to be overwritten when" + elog "sys-libs/libxcrypt is installed. See bug 802210 for more details." + fi +} diff --git a/sys-libs/gpm/Manifest b/sys-libs/gpm/Manifest index 7b16c65a6633..75f594e38b40 100644 --- a/sys-libs/gpm/Manifest +++ b/sys-libs/gpm/Manifest @@ -11,5 +11,5 @@ AUX gpm.service 218 BLAKE2B 728726976390bb394d479e424d5c1fafb9bc17d00e23a9021899 AUX gpm.service-r1 196 BLAKE2B a1ec9c4d5bbd111ffe5e95cfb3fbd3a6c2d6181e794e1eb07938c1581ee72ffcec6ba80f28438371c474728a69e4d19183f8385e006db4bc44becd210b5a1bfc SHA512 2bb5a2faadaee9691b95191b67aef70f6dc7ef923db853abec8987d86e3d8239737ba2baf8ada4ae705a42f5cf59f34fdf1ce2accd642d8a0ff6718a89e81434 DIST gpm-1.20.7-docs.patch.xz 41668 BLAKE2B cab4649d0eda83c37474b68ac141fab84cbfaac4e18f0f42ad7c0a90d14bc39697b17c450e8a8dc8b1c960f6d9e7ff344ec15791df240f61a27ccfcd7d0a9171 SHA512 6cdcad70d0a77a56cb507330ff8409155de11255b5e61fb92ee439c1e117932c346df475f4187abb0e348ee4c28fa235a9693883b1c36913e91404662df272f4 DIST gpm-1.20.7.tar.lzma 789691 BLAKE2B 5dbceedaa330d5f1ead8b2267fb5844cfd284627e085edd784a72365830a700f9a6a97f96afb4aa00a44ddbae735ef23be7eafc97a65f6250d72e15b359486c7 SHA512 a502741e2f457b47e41c6d155b1f7ef7c95384fd394503f82ddacf80cde9cdc286c906c77be12b6af8565ef1c3ab24d226379c1dcebcfcd15d64bcf3e94b63b9 -EBUILD gpm-1.20.7-r6.ebuild 2843 BLAKE2B 8eeca7d72daf16728599d83a0053e54cfdd4e3189e33c11e4a5c404de80dadb212804ee56ba9b8a43fe65e7d64dbc1f5fc55ea0a4d60ca512b6f4e32f1bec40b SHA512 f81e6d5e11484da5fab6ea3e6130542efcec9eb693583b2aed71c1f16f47d372312e3fb24e8c3c1ed904696b4fa5ecc6298e3625944f7802d8678ddd19ab7bf7 +EBUILD gpm-1.20.7-r6.ebuild 2860 BLAKE2B 9b9698bb2e8cb7603d4a0df5b640c0f34dfbfb064e7f8d8801fde2c968c5846d86a5e23a4414f819ce2bf22154d18afc574981c07677b3162e62763f1203499b SHA512 96d91dc1b7b3affa9b9811b42d16c52b963ebeb53bb1a4cd8204549616b52a89c384cd6bd970a7f29c16fb0552007636f90fc3246c21e488530c0e729209545a MISC metadata.xml 334 BLAKE2B e2fe9030bcb3a1e85b0cd4aaae85bf3952ddad42585fd10e1edaa7fa2f47f4337b012e13e5f8773b16bfb19409b5230118e42f7c545aa6cd7cf22db81dc80a2f SHA512 8256b2488b6142311c077f15d5dc1c9061e182e969c2edbbc4cc8984fc493ec46b30a4d93a058d64087fb64c39959957151a046bbdfeac90bdd5b287343f4dfd diff --git a/sys-libs/gpm/gpm-1.20.7-r6.ebuild b/sys-libs/gpm/gpm-1.20.7-r6.ebuild index 5c3ed388e5d4..b67d1fed55b9 100644 --- a/sys-libs/gpm/gpm-1.20.7-r6.ebuild +++ b/sys-libs/gpm/gpm-1.20.7-r6.ebuild @@ -73,7 +73,7 @@ src_prepare() { multilib_src_configure() { # https://github.com/telmich/gpm/issues/48 - append-cflags -std=gnu17 + append-cflags $(test-flags-CC -std=gnu17) # bug #885323 # src/headers/daemon.h:175:25: error: type of ‘cinfo’ does not match original declaration [-Werror=lto-type-mismatch] diff --git a/sys-libs/libcxx/Manifest b/sys-libs/libcxx/Manifest index 783b1b58cf88..f0b1c87a04ea 100644 --- a/sys-libs/libcxx/Manifest +++ b/sys-libs/libcxx/Manifest @@ -17,7 +17,7 @@ EBUILD libcxx-15.0.7-r1.ebuild 5283 BLAKE2B 4380fc5b851054a5ec226ee4c92a2b79511d EBUILD libcxx-16.0.6.ebuild 5300 BLAKE2B 4714e22ad2fdcb07c62ead4cfa47fb4734e45dc055700b63a0f24cd6e93dde960c638fa16f55f4c04c6130fc2a7fa5729814c4aee12e9953f603ea5ccb706cc1 SHA512 3eab779107b5c737d971abe29b7bd9f44a73570957bd7d54d6aaa98ec78a6045d7d69272d611f7f09c60e1aa30bbad46b4bd1358b0b2c69e5bc686ab21444857 EBUILD libcxx-17.0.6.ebuild 5280 BLAKE2B a882313471af07942a0772efa642800ba85545227f7dfe281cd7fcdc686ecda82692d273550b28cca2de47b1b9fda87717c98c52ffafdf1155d5269a3733f48a SHA512 d9a2932d7b9e26dea0e62dfd3aeac08ad0206a242d3d42d83e55b93cc767195a67bc0eb3da38cb8d51930175f94bac6496184d6d4be516014e0208c3f852d427 EBUILD libcxx-18.1.8.ebuild 5442 BLAKE2B 0bafe813a25b0bf38606bc5def482fa9e354005273762cdb29564d0dea93a575a7a95b1b8435ba959da4e47a26aec788e10c15509eb66937830b227679a2fbf7 SHA512 e12a3002d860023ef1f302ac1656ea4ec5556f41ef2b2f247a3eedebeddd7fb51a1e4f2c5a4e75770e15cffd1bdb830a82d081d2505a2196b494a490cc516f17 -EBUILD libcxx-19.1.4.ebuild 5181 BLAKE2B dbad2e4443d758b1b2570dd2e5bf448f6fc4d8e633e2a21e5f26485203eb6da0e72a81abf870ef95c7903632b56af75fa0bb46220ee3651685144a4bdea46f61 SHA512 316a9684216860346b6a7486145993d25ed3daf9cc01929dba45a19818da4c92c8da88cf0230cf5196be99b04bd8471a14ae69b5ac722175dd0f7fdf5919bc75 +EBUILD libcxx-19.1.4.ebuild 5176 BLAKE2B 455425f6d90f9b5b4d4331606428908fd823885fe704f9555ed4f62865cb02a81a55c9bdea327b33323fd1be3ea413cfe1c990229ae3cca2fcd1535a8b083b06 SHA512 ec5afa5c8087d4bd5c3e95cdb77a0b6d907e563fd4c4f610e1d2861d4cce83735c849750bfa782d501cb21eba17c59eb5d456e3a99003512f479f6ecd2f5d312 EBUILD libcxx-19.1.5.ebuild 5181 BLAKE2B dbad2e4443d758b1b2570dd2e5bf448f6fc4d8e633e2a21e5f26485203eb6da0e72a81abf870ef95c7903632b56af75fa0bb46220ee3651685144a4bdea46f61 SHA512 316a9684216860346b6a7486145993d25ed3daf9cc01929dba45a19818da4c92c8da88cf0230cf5196be99b04bd8471a14ae69b5ac722175dd0f7fdf5919bc75 EBUILD libcxx-20.0.0.9999.ebuild 5358 BLAKE2B f1653197106b3f12fa21ca3e82968e2a4b1d5376bf0c7a72ffafe28623919c85de6180de6d2bb75092de2101ddd98c07cfa1866fda15c50832802e1a712a3f60 SHA512 501844ea65ad7200b74c412e5b9298559a78859f25f01a6b963a336db5f4be4790e079f861ab749f5b87241da014958bf166695b7aa03a6e84a7bc598dd455c2 EBUILD libcxx-20.0.0_pre20241130.ebuild 5358 BLAKE2B f1653197106b3f12fa21ca3e82968e2a4b1d5376bf0c7a72ffafe28623919c85de6180de6d2bb75092de2101ddd98c07cfa1866fda15c50832802e1a712a3f60 SHA512 501844ea65ad7200b74c412e5b9298559a78859f25f01a6b963a336db5f4be4790e079f861ab749f5b87241da014958bf166695b7aa03a6e84a7bc598dd455c2 diff --git a/sys-libs/libcxx/libcxx-19.1.4.ebuild b/sys-libs/libcxx/libcxx-19.1.4.ebuild index 80dbe207d4c4..b1a524e796f3 100644 --- a/sys-libs/libcxx/libcxx-19.1.4.ebuild +++ b/sys-libs/libcxx/libcxx-19.1.4.ebuild @@ -12,7 +12,7 @@ HOMEPAGE="https://libcxx.llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos" +KEYWORDS="amd64 arm arm64 ~loong ~riscv sparc x86 ~arm64-macos ~x64-macos" IUSE="+clang +libcxxabi +static-libs test" REQUIRED_USE="test? ( clang )" RESTRICT="!test? ( test )" diff --git a/sys-libs/libcxxabi/Manifest b/sys-libs/libcxxabi/Manifest index 99a311f033b2..9a8aad64e1cb 100644 --- a/sys-libs/libcxxabi/Manifest +++ b/sys-libs/libcxxabi/Manifest @@ -15,7 +15,7 @@ EBUILD libcxxabi-15.0.7.ebuild 2911 BLAKE2B 5f2004d2f68fe4eddb0b22be82d28fcca795 EBUILD libcxxabi-16.0.6.ebuild 2932 BLAKE2B 837ab88ee88d5497b8bddb9f001d4b4ddd44ed982ef47114c965174135ed136abd0e3a6f3848a4aba53d0ca3748c54674cb28de8d46fda3bb7a90f326d41c7c6 SHA512 e4ebf7f35d2cad3bf3ba02754c85fee1cd1c4e52887770698ebaa3ef2fe66873f468677d307ea2d6956c2f6d3ac9b61943461193a5315f1e8a2846f2463b0581 EBUILD libcxxabi-17.0.6.ebuild 2932 BLAKE2B 837ab88ee88d5497b8bddb9f001d4b4ddd44ed982ef47114c965174135ed136abd0e3a6f3848a4aba53d0ca3748c54674cb28de8d46fda3bb7a90f326d41c7c6 SHA512 e4ebf7f35d2cad3bf3ba02754c85fee1cd1c4e52887770698ebaa3ef2fe66873f468677d307ea2d6956c2f6d3ac9b61943461193a5315f1e8a2846f2463b0581 EBUILD libcxxabi-18.1.8.ebuild 2759 BLAKE2B 1d4ac3db2b24ed4c598f2e5c4021e68a95b3652b0ee4a7b9a8976bb253b921d428dd30a5da26dfb82b350c05ec8840f38887ae02a766a22861e0638434a7a4a6 SHA512 8fe5ca2d5c605406b102abd013f05b5662a5d643ec22b1a83a8bf8ec1b6a940fcdc448f1bb81f877741406874e126747148e295f5492f6b76c0e17ad093ad07a -EBUILD libcxxabi-19.1.4.ebuild 2764 BLAKE2B 279e2dedfd47b02e89b0d34b7ce17ddfcc409340319473901306b761545030bfaa0ab9788b567f6982b1071d37bc4f9790fe38a2817bd9b4f13bd337aa2f8b99 SHA512 10fbb48677a4bd39c196631649eaf307f7adfb5d8512f9abd6c4c0b7984a91113c4e9cf663282de38be7b02e0e8e835bc91300a38ca63f26c73f7fe6fd737de9 +EBUILD libcxxabi-19.1.4.ebuild 2759 BLAKE2B 8f45a664c7988528c5199ae91ab72baa39df26b29f89b9b661fe031ecd90d3267aba8c2d2eef5687dd96aaa9de09f0357891c13476d2498ac3b602dfeb50b66f SHA512 5ebb648874eb8aa9ad85b947c011796e4938a955f565a13ed5341766410ce266443361c9264f8dcc6b9696b4eb15d9a90acd2f434157a52271de2fac8960f042 EBUILD libcxxabi-19.1.5.ebuild 2764 BLAKE2B 279e2dedfd47b02e89b0d34b7ce17ddfcc409340319473901306b761545030bfaa0ab9788b567f6982b1071d37bc4f9790fe38a2817bd9b4f13bd337aa2f8b99 SHA512 10fbb48677a4bd39c196631649eaf307f7adfb5d8512f9abd6c4c0b7984a91113c4e9cf663282de38be7b02e0e8e835bc91300a38ca63f26c73f7fe6fd737de9 EBUILD libcxxabi-20.0.0.9999.ebuild 2663 BLAKE2B 51f73901a172d1d38eb2204428cab606794110644be1d95e542da7c80e2f88f12b1dde949f3b000a27677108922413351d7f79547101a22b14595b31f3cb9138 SHA512 3d61d2c559bcdb9d13a8134dd75dfb66b46b51eb8c3c870fa807f0dfc6298ed1582a6a3eeba732d9aac6e974e28bf5fc8efb6825654b11b0fcbb4eeaa4d40492 EBUILD libcxxabi-20.0.0_pre20241130.ebuild 2663 BLAKE2B 51f73901a172d1d38eb2204428cab606794110644be1d95e542da7c80e2f88f12b1dde949f3b000a27677108922413351d7f79547101a22b14595b31f3cb9138 SHA512 3d61d2c559bcdb9d13a8134dd75dfb66b46b51eb8c3c870fa807f0dfc6298ed1582a6a3eeba732d9aac6e974e28bf5fc8efb6825654b11b0fcbb4eeaa4d40492 diff --git a/sys-libs/libcxxabi/libcxxabi-19.1.4.ebuild b/sys-libs/libcxxabi/libcxxabi-19.1.4.ebuild index c129f18b4672..81bed80ba0c9 100644 --- a/sys-libs/libcxxabi/libcxxabi-19.1.4.ebuild +++ b/sys-libs/libcxxabi/libcxxabi-19.1.4.ebuild @@ -12,7 +12,7 @@ HOMEPAGE="https://libcxxabi.llvm.org/" LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos" +KEYWORDS="amd64 arm arm64 ~loong ~riscv sparc x86 ~arm64-macos ~x64-macos" IUSE="+clang +static-libs test" REQUIRED_USE="test? ( clang )" RESTRICT="!test? ( test )" diff --git a/sys-libs/libomp/Manifest b/sys-libs/libomp/Manifest index 72704b58e501..972f696afd9b 100644 --- a/sys-libs/libomp/Manifest +++ b/sys-libs/libomp/Manifest @@ -16,7 +16,7 @@ EBUILD libomp-15.0.7-r6.ebuild 3470 BLAKE2B 9f76ca5b080ccf01617d7dcbfe3eb424c525 EBUILD libomp-16.0.6.ebuild 3984 BLAKE2B 8302d2776c0d8c50dcc7cac2dde8523f1abdf391d48594fdd26ebe17a089efdfee93825bdec07569878d06873b571e469411f108564df6c7eb50dc425615c255 SHA512 714da170fba4b62f3267e2530a82c583d299e8dc6c6f4037417c216c1239cc0fadc1aebf823608df37a932a7722144e67a148b58079e50560450b94c93f3e415 EBUILD libomp-17.0.6.ebuild 4052 BLAKE2B 8a05a46719120eac5495417fb6ea54b7a6a3d93aa7cc0917ca9e8f3cb2238f23348ecaefebd4c2064eac4adfbd4ef7f86b70c051cbcc009692ec790159d8883d SHA512 80b48f5a3af351ee14296aa76ba28b964eb85d84a1827af8acd35076895342a5dd743362c988e042c57f11dc9e8bbca1a9003a6752562758249062e460c73247 EBUILD libomp-18.1.8.ebuild 4288 BLAKE2B f357d18d80010a75b917694db783d6a7ea3e2d49c157f194cdcf6f27a89110df32d0605d2eda30a30b662cc9f52994b16c48c2ecb01b4c81bcde741282a5e840 SHA512 16580962bb4d278794edd748a26be3d7d185c906f76b5dde675a875cdd62e3c97e817de042fc2564ac40d41919fd649aa747ec430fa8c18be553ea88b0d02f88 -EBUILD libomp-19.1.4.ebuild 2248 BLAKE2B 8493ef91a33d9415c1ae604e8d65a972964b8a4d4adc5dbecf884a30a2a5aa216955fb15ade6d260e2573dcf265c845a1ed95ad7ef850342007e97e345c78558 SHA512 fb53d47a8a75cb06d4915ea00186dffc01ba718d021945df3f9f8cc106c2ecbc9278b1fdc8d037ce562a3b0b1bdc58dc266b90d671b2d427de2761b02661a96d +EBUILD libomp-19.1.4.ebuild 2243 BLAKE2B 50121968463834767de14f7143e2bb45a3f9688c4eec17e2c11f8892c63a6a009fba74e8f0cb00c819b42f9295c40104ba4b9841fc279a6fecfbbe4683e402b8 SHA512 c96d28ad501c5e0e39d24335596494963baf621dcefbbfdc84cd6996af3cdc13deb63ff002206fcbe2ca663c890a29f3624a916f8f1587d8337e712084dce789 EBUILD libomp-19.1.5.ebuild 2248 BLAKE2B 8493ef91a33d9415c1ae604e8d65a972964b8a4d4adc5dbecf884a30a2a5aa216955fb15ade6d260e2573dcf265c845a1ed95ad7ef850342007e97e345c78558 SHA512 fb53d47a8a75cb06d4915ea00186dffc01ba718d021945df3f9f8cc106c2ecbc9278b1fdc8d037ce562a3b0b1bdc58dc266b90d671b2d427de2761b02661a96d EBUILD libomp-20.0.0.9999.ebuild 2163 BLAKE2B 522f4f9099cf7ca69f3bd2d93f1bfa0f80fd1937d8147b0464d3bcb143b161cf5b17b8e2fc80a981188a1962a3dc1396979dd726028f546ccb10b56265405415 SHA512 5ae5744e3addc95f790c15e1d89d3da4080ea0216518ece8097ac21a71432892d920722618ea3589f7bf4f70c505b5be37fa9b8c49683fd2307988b4425e7bea EBUILD libomp-20.0.0_pre20241130.ebuild 2163 BLAKE2B 522f4f9099cf7ca69f3bd2d93f1bfa0f80fd1937d8147b0464d3bcb143b161cf5b17b8e2fc80a981188a1962a3dc1396979dd726028f546ccb10b56265405415 SHA512 5ae5744e3addc95f790c15e1d89d3da4080ea0216518ece8097ac21a71432892d920722618ea3589f7bf4f70c505b5be37fa9b8c49683fd2307988b4425e7bea diff --git a/sys-libs/libomp/libomp-19.1.4.ebuild b/sys-libs/libomp/libomp-19.1.4.ebuild index 64ab38e3e987..6996520f455a 100644 --- a/sys-libs/libomp/libomp-19.1.4.ebuild +++ b/sys-libs/libomp/libomp-19.1.4.ebuild @@ -11,7 +11,7 @@ HOMEPAGE="https://openmp.llvm.org" LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0/${LLVM_SOABI}" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc64 ~riscv ~x86 ~amd64-linux ~x64-macos" +KEYWORDS="amd64 arm arm64 ~loong ~mips ppc64 ~riscv x86 ~amd64-linux ~x64-macos" IUSE="debug gdb-plugin hwloc ompt test" REQUIRED_USE=" gdb-plugin? ( ${PYTHON_REQUIRED_USE} ) diff --git a/sys-libs/libunwind/Manifest b/sys-libs/libunwind/Manifest index 2473d26492e8..6b3088881e01 100644 --- a/sys-libs/libunwind/Manifest +++ b/sys-libs/libunwind/Manifest @@ -1,4 +1,3 @@ -AUX libunwind-1.7.2-backport-pr521.patch 1415 BLAKE2B 696e075318574e40b3a583526cb8fbbdcff0ccd4357c6cd4f10655222b1a13c79402f40c3887c9c07ec68819f02451685875c88af5c28cbb17ce926abb716a8f SHA512 4d50a36e214f927cc85f7d03424b0a06358a403f82dfb7f4148a668cf745c85876e2f8c4a49a71f868b1bd1e818fda8d9c85b75d8a5e4a9cd3499d0fc0cbd13d DIST libunwind-1.8.0-docs.tar.xz 29280 BLAKE2B 260c5011cf23422ec04449126259c9960b5549b94def8ffa3821ccc67809b5da06be22fb0b465fcee2f0ec89faebab71d2bf3316dc68315a27e0913856513b0a SHA512 6969c8426dc5d79a78a9dae366a9e7b6f1d9a7ce307357913d4f5b8867a540ab8225b5342ee0e06e77b832ef76336fba41dadf12effa5236a076e6bfe72ec548 DIST libunwind-1.8.1.tar.gz 958468 BLAKE2B 936e70f2428d8f6ada3b4d58b3c9e3a9738eb2f7aee1ad5fb4e44dbb7400186d1bd1ead86a698e53d199d5944b102f8380d08b48104a138021286a79fb006ec3 SHA512 aba7b578c1b8cbe78f05b64e154f3530525f8a34668b2a9f1ee6acb4b22c857befe34ad4e9e8cca99dbb66689d41bc72060a8f191bd8be232725d342809431b3 EBUILD libunwind-1.8.1.ebuild 4054 BLAKE2B 0e8bb18baa0bd26efdc737d81417a9dd7bb329a5e15e354aa10fcae12288069548b499fc60fa56ff3c43602101b5dfe4fdc10f20762cf950066bace8c883a447 SHA512 6f8ce3c1959f8f8de45c1c015f141269afa2f785d339bef3492f58b71dccf0aa1c1c3c6a4c44814192aa4c1f3d4831dd0c0ac9878ba08e27a8327d396236c064 diff --git a/sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch b/sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch deleted file mode 100644 index addfc0a60a03..000000000000 --- a/sys-libs/libunwind/files/libunwind-1.7.2-backport-pr521.patch +++ /dev/null @@ -1,31 +0,0 @@ -https://bugs.gentoo.org/913817 -https://github.com/libunwind/libunwind/issues/520 -https://github.com/libunwind/libunwind/pull/521 - -From aaf9909c91f1fa875907df8d437bff689e00172e Mon Sep 17 00:00:00 2001 -From: Stephen Webb -Date: Fri, 26 May 2023 16:22:08 -0400 -Subject: [PATCH] Fix FTBFS on Linux ppc32 - -Looks like the Linux ucontext structure has changed for PPC at some -point. This probably needs some kind of version check, or else ancient -kernels will need to stick with 1.6 or earlier. ---- - src/ppc32/ucontext_i.h | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/ppc32/ucontext_i.h b/src/ppc32/ucontext_i.h -index 64f8ed878..ee93c6979 100644 ---- a/src/ppc32/ucontext_i.h -+++ b/src/ppc32/ucontext_i.h -@@ -44,8 +44,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - //#define MQ_IDX 36 - #define LINK_IDX 36 - --#define _UC_MCONTEXT_GPR(x) ( (void *)&dmy_ctxt.uc_mcontext.gregs[x] - (void *)&dmy_ctxt) ) --#define _UC_MCONTEXT_FPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.fpregs[x] - (void *)&dmy_ctxt) ) -+#define _UC_MCONTEXT_GPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[x] - (void *)&dmy_ctxt) ) -+#define _UC_MCONTEXT_FPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[x] - (void *)&dmy_ctxt) ) - - /* These are dummy structures used only for obtaining the offsets of the - various structure members. */ diff --git a/sys-libs/llvm-libunwind/Manifest b/sys-libs/llvm-libunwind/Manifest index 6fa56664f636..785e5a5fc8e1 100644 --- a/sys-libs/llvm-libunwind/Manifest +++ b/sys-libs/llvm-libunwind/Manifest @@ -15,7 +15,7 @@ EBUILD llvm-libunwind-15.0.7.ebuild 3032 BLAKE2B 9b47e894db1a764f3eca3135f4caba6 EBUILD llvm-libunwind-16.0.6-r1.ebuild 3440 BLAKE2B eafe21a3de172043ca0039ba27c80c64d32b02cc86bdb5a6d108ded35770e0352216337cbf24ee4fde43b699a68a85c8145be2d17510d525452bfd5a02674998 SHA512 164fdc1c62405e02c035af7997b8522b51f5b9337d2bb66d7fc9b1f45df74ec70d31b26dc5324c59792d32c543fe18abf74ed3b07a64c131e3c1bb4f9f733c5d EBUILD llvm-libunwind-17.0.6.ebuild 3440 BLAKE2B eafe21a3de172043ca0039ba27c80c64d32b02cc86bdb5a6d108ded35770e0352216337cbf24ee4fde43b699a68a85c8145be2d17510d525452bfd5a02674998 SHA512 164fdc1c62405e02c035af7997b8522b51f5b9337d2bb66d7fc9b1f45df74ec70d31b26dc5324c59792d32c543fe18abf74ed3b07a64c131e3c1bb4f9f733c5d EBUILD llvm-libunwind-18.1.8.ebuild 3407 BLAKE2B 1f0f6be6cd671b42d97bfa5ffc5fbf0c837f1d97a034db9c88fa15ba381651c6f669aef7e8e6f46091f33950f6fc8dad7a7e45ded1711b8dea2e562ec7174cb9 SHA512 e4db23d628e8d82c48f5dd1f2c29a90acceaabdcdb049d38310cdfe82c3d59b4cb5d80df8b9f5663ab3c86fbf304bffc35fd01d61f9b7dc99cbef879e9157a61 -EBUILD llvm-libunwind-19.1.4.ebuild 3413 BLAKE2B 7f510e3b4b415a4178c5783a5252adf00ee264ec8173d459f1ee7df65dcb3c0c9bc8712384d2e4c9a5451a13c7868bef011d990158e4875f5ed8f343866bd228 SHA512 84de24446bb5b2239ef96155327e2c9b35a1a3d1c93c7acb5aaf046299dd8ebab6c89b9b2c6d36bd6adb6265492521c3a6f395f4fdecb37ea4b022e6a840f56f +EBUILD llvm-libunwind-19.1.4.ebuild 3407 BLAKE2B 6cd9f1a7dbbe1dbdb7d64c139c15db14aa5ee69e064fdcced2453d188a5c9014365f4745321053deec0d8921c9063962a5770b8787d04529a06902966d4230d9 SHA512 dc053b545072509bccce93ba746001a02f3707cbbe2a6b91c7addb7e7f56fa99717ad64a6e496b3a60287edaecf2ff79bc2b7e5853f047e5cd5f1290617423c2 EBUILD llvm-libunwind-19.1.5.ebuild 3413 BLAKE2B 7f510e3b4b415a4178c5783a5252adf00ee264ec8173d459f1ee7df65dcb3c0c9bc8712384d2e4c9a5451a13c7868bef011d990158e4875f5ed8f343866bd228 SHA512 84de24446bb5b2239ef96155327e2c9b35a1a3d1c93c7acb5aaf046299dd8ebab6c89b9b2c6d36bd6adb6265492521c3a6f395f4fdecb37ea4b022e6a840f56f EBUILD llvm-libunwind-20.0.0.9999.ebuild 3321 BLAKE2B 11e3226e8d8fd4781f2c3b9b4a40068a57fba8b0797726c88f592e69147a99bbfc78d98449daccfd0d30fd378ba8ced48d6dcd4df938fb7604d02dcee3f18f3e SHA512 9c815395dcb606b62f192c978185d88978c4f280a71c69611a1d106dcec1758b901cfd74652e2b4e4adcb944bec318de8f2aa8d32aaea3d471b43870dbf2d562 EBUILD llvm-libunwind-20.0.0_pre20241130.ebuild 3321 BLAKE2B 11e3226e8d8fd4781f2c3b9b4a40068a57fba8b0797726c88f592e69147a99bbfc78d98449daccfd0d30fd378ba8ced48d6dcd4df938fb7604d02dcee3f18f3e SHA512 9c815395dcb606b62f192c978185d88978c4f280a71c69611a1d106dcec1758b901cfd74652e2b4e4adcb944bec318de8f2aa8d32aaea3d471b43870dbf2d562 diff --git a/sys-libs/llvm-libunwind/llvm-libunwind-19.1.4.ebuild b/sys-libs/llvm-libunwind/llvm-libunwind-19.1.4.ebuild index 45b7c96819be..02c17fd01f00 100644 --- a/sys-libs/llvm-libunwind/llvm-libunwind-19.1.4.ebuild +++ b/sys-libs/llvm-libunwind/llvm-libunwind-19.1.4.ebuild @@ -12,7 +12,7 @@ HOMEPAGE="https://llvm.org/docs/ExceptionHandling.html" LICENSE="Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )" SLOT="0" -KEYWORDS="~amd64 ~arm ~arm64 ~loong ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86 ~arm64-macos ~x64-macos" +KEYWORDS="amd64 arm arm64 ~loong ~mips ~ppc ppc64 ~riscv sparc x86 ~arm64-macos ~x64-macos" IUSE="+clang debug static-libs test" REQUIRED_USE="test? ( clang )" RESTRICT="!test? ( test )" diff --git a/sys-libs/ncurses/Manifest b/sys-libs/ncurses/Manifest index b930c46671c5..c64b5a53d9f5 100644 --- a/sys-libs/ncurses/Manifest +++ b/sys-libs/ncurses/Manifest @@ -200,5 +200,5 @@ DIST ncurses-6.5_p20241109-patches.tar.xz 63676 BLAKE2B 9981b740fcec18cc794074cc EBUILD ncurses-6.4_p20240414.ebuild 14355 BLAKE2B 33f762811b54142db6ad02789e40a896da5a7163003898c20d49c64c551db4ee1ef7b000204482fc87019f6e489d9e86a3512a44012420633d735a900e63d778 SHA512 06d21b4b82708370f03ce972952d22625c87fe32de189366b4bb090027a8f1a58f3c961628abb85a0a559a1081b5f8a5253248248547ee559c4d92bd252f5864 EBUILD ncurses-6.5-r1.ebuild 13875 BLAKE2B 6149ec2accc814e80c829f738b1471b21b476edfa13e20fa1ba6f016cf9a78874b9cf1ee1177f23212a91d9b4e5d3420caa052b0848bc311fc15c73dfa8af3bd SHA512 d817b26b8eca20a13f61a3172923c6a36e9259eed0c6466b16a929832854d4aa1618623ffd5469bfe9550f95ff789635c4294f927bf469f16abd5865cc7ba230 EBUILD ncurses-6.5_p20240615.ebuild 13941 BLAKE2B e22a5ed76cb87c4c60a1ae7b73bca25bbea53c6d91d90e174d80855015f0df6e61bec5491b8aa22e86b6aa5d769ba14d994c78bf13fa43fc4895808e87a885dd SHA512 a1e18805537910e701354670e81059d6f27f6b5acf795eba9a57d1aa41a5714f7e09df28ecf8cc0cf951b231b25a7a0cec2f9f64796f7f84d993369b74054d7e -EBUILD ncurses-6.5_p20241109.ebuild 14143 BLAKE2B 8305d0923bd08e4b7f16565be7f620ed20f9853de3598de6a25804117c912d11c1b0de324a849c34294951d354d2f6c3acfd265bb366ff71c05c02ed1732d44a SHA512 b086fd2d79dba36455677992498ca7aec69ebb21d04e206506af6ce5b34322c4c7aabb56def292d613f5a6df06e5a34897a3b5736773599e3bf76bf364144996 +EBUILD ncurses-6.5_p20241109.ebuild 14160 BLAKE2B 300b888e27775243a3d0e5200b4dcecdfa05bd5d9d4fb279e057f5ce2eccf2163dbe1aca4564b59d74b260d72a444eb0e95d4dea76e1e842ea21f7a5ad38ae87 SHA512 fbba8a15f2478805ad73eee8894b5f0e45bd69e29eaf4b4d0887d6d1c648ea28196baed13562999add60b0269ee47d2de6ffd6a85a2b5c7047040796830e8b24 MISC metadata.xml 1094 BLAKE2B a65bbb9584f77fb07fff735e6471ef48a5d63e7fa79112bf75df67f2f94e816706165fdd42a482708a7fd2ab3b3e308f9766eac0b39c3a4e31dcff5b3db25d57 SHA512 adf0f939a1e14c964bfb44ab80b1b8c1ee897a036a994848ba3e40280ab3a73ddb3beef540c905efd623e71b890c4c91e0b7c24651561d0e2bb2a4c86f039dba diff --git a/sys-libs/ncurses/ncurses-6.5_p20241109.ebuild b/sys-libs/ncurses/ncurses-6.5_p20241109.ebuild index df1dda200557..c95699da9f73 100644 --- a/sys-libs/ncurses/ncurses-6.5_p20241109.ebuild +++ b/sys-libs/ncurses/ncurses-6.5_p20241109.ebuild @@ -169,7 +169,7 @@ src_configure() { BUILD_CPPFLAGS+=" -D_GNU_SOURCE" # NCURSES_BOOL confusion, see https://lists.gnu.org/archive/html/bug-ncurses/2024-11/msg00010.html - append-cflags -std=gnu17 + append-cflags $(test-flags-CC -std=gnu17) # Build the various variants of ncurses -- narrow, wide, and threaded. #510440 # Order matters here -- we want unicode/thread versions to come last so that the diff --git a/sys-libs/pam/Manifest b/sys-libs/pam/Manifest index 252feb74d149..776377d6537d 100644 --- a/sys-libs/pam/Manifest +++ b/sys-libs/pam/Manifest @@ -4,5 +4,5 @@ DIST Linux-PAM-1.5.3.tar.xz 1020076 BLAKE2B 362c939f3afc343e6f4e78e7f6ba6f7a9c6e DIST Linux-PAM-1.6.1-docs.tar.xz 465516 BLAKE2B c39dfba2e327120edc1f30be6ea7f8e6cf20d1f4dd17752cc34e0ae1c0bd22b3d19b94ab665bf3df5bd6ecc7fc358dbbedd8a3069df95ff6189580e538aa3547 SHA512 c6054ec6832f604c0654cf074e4e241c44037fd41cd37cca7da94abe008ff72adc4466d31bd254517eda083c7ec3f6aefd37785b3ee3d0d4553250bd29963855 DIST Linux-PAM-1.6.1.tar.xz 1054152 BLAKE2B 649b4ff892fbd3eb90adcbd9ccc5b3f5df51bf1c79b9084c7a1613c432587b13b81761d1eb4f31ef12d58843d16af24a3c441d0b6f5d2f2a1db9c8da15a61e2f SHA512 ddb5a5f296f564b76925324550d29f15d342841a97815336789c7bb922a8663e831edeb54f3dcd1eaf297e3325c9e2e6c14b8740def5c43cf3f160a8a14fa2ea EBUILD pam-1.5.3-r1.ebuild 4456 BLAKE2B 11d04b870ae3571fa71aa7d1bdaa29eb59b5593899aa70223d3ad708331b875d21ac1ab6b28f06392651db04bca8821c747e478fb87744968d6cc6a23a652951 SHA512 a98f212ddcdef9542e6f3bcd05c3a1f6243b5e2696bf93bd4596ae8f84a88acf0ad7bba4a196dfc91775a20b5d3dff30659406437491f476252f4cb1e7c3c92a -EBUILD pam-1.6.1.ebuild 4460 BLAKE2B 5aa90cb199e71f5761ae0b0409bb4a340164c5defffea7de31e5efbec95d9db75712ce7647e1c9df70b3b00b686c8a0792caf40fbbd7e552e66abd96e3e03bb8 SHA512 5c20fd2bb307d0357673e55778d95faf1ca91273f598cc99d92c82b173c37a78bc174da8e85fd25b9936a384d7120f60c4aa0497addd9c3f26e95e4b612001d5 +EBUILD pam-1.6.1.ebuild 4459 BLAKE2B b6c946278113f8c0cf63676382fce8dfee77ed4d02f56314f55734c4c5e32b1dc668d851315ff27fe98c470a61cda43cb9bd31b3430fc859aaa3aca767fd4c33 SHA512 4100f9df870643f57f8d99114d6ff02553d9fc6ebd5fc3a3fea85ab49ec248482bddfe5b0767551d6bcb0a8a42439f9b35cf81f087750aa030d4d9d144f20834 MISC metadata.xml 846 BLAKE2B e236bd8c7a53097d96164d9063d1dbb9372cef4ec92731dc43df6731cc7f4fc2935aeeb2e069b6da1d4bce3f1cc6a657e0361208581da615f3f41ec72c02261e SHA512 e2e28deadb2c941f8fa31447ec20c95ccb340d638f8b1e742a89ccc2dbb3c8d88e764f750d6e13c5a6320a612d6f2447689c02862a5e897919d1e9bca7857089 diff --git a/sys-libs/pam/pam-1.6.1.ebuild b/sys-libs/pam/pam-1.6.1.ebuild index 65fd318970b9..551804de8156 100644 --- a/sys-libs/pam/pam-1.6.1.ebuild +++ b/sys-libs/pam/pam-1.6.1.ebuild @@ -21,7 +21,7 @@ S="${WORKDIR}/${MY_P}" LICENSE="|| ( BSD GPL-2 )" SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux" IUSE="audit berkdb examples debug nis selinux" BDEPEND=" diff --git a/sys-libs/readline/Manifest b/sys-libs/readline/Manifest index a0eecec24ec1..839a4874737b 100644 --- a/sys-libs/readline/Manifest +++ b/sys-libs/readline/Manifest @@ -42,9 +42,9 @@ DIST readline82-012 2824 BLAKE2B 02f5351cdeaf818d809a3d40596ef7c7d83ab397e28486a DIST readline82-012.sig 95 BLAKE2B c9d69070ebff6b1996cfb5d1559dfdaa56d2e34770f142f9771cf8b99a68dfd55933cbcbadf589f490db4c7bdc57e43cd657d43ce72c185a46b802e61175470e SHA512 d9c0cedd012fe5a1e2236f072aefca3b1c9c66c6eedef1842f22d80c860d1e48a4f0a10711f52316e6c57d221ee32e00172002f53a3931574a03891873c0ed1e DIST readline82-013 5757 BLAKE2B 5af309dc331cdc2fc9c47f8a53c78731885cf70ba22c135929a30c3ab0c6c0a786d1a58b607a7aca9a6522e70aa0e9dc182ad21854d87299e48bf207ee9b02e2 SHA512 9a768946c91e4af31e872fb856b017662cdd5a12ed432d84ba13013fbac327673b655a034dbcfab52da2ff9e45eb1fdb562c3e26c224a5f4e86bff23df25175e DIST readline82-013.sig 95 BLAKE2B 388b707e863c6047fdc92bb29e2c172292b497f53926f6e2534016e5cdb621fd7feb9418c6edd4a693869ea61c16cb64815bf2159d6af0bb3eec5d5dc666e525 SHA512 85bd30dc816d62a2e339c95bf9f243a60a960264e14bc396b34f586afdded2cc43ecc307a7f1a2c03c7eba2d11d2f3a0028107a59c4b2bc8d6dbe77fe9fb81cd -EBUILD readline-8.1_p2-r2.ebuild 7095 BLAKE2B 11ec5f6b072d8db6055480a4455b175696183daf1ca38567c8204d0fd0d6b3f85661a1fd446b03a870a8c8f30f5dcb93eb73b30ff893e991d9361c685152a1ce SHA512 6e31f862a872c8f3b0509ac2f2f751ea6b616ea570383e609fcb9ab3fb6f5b578c6316b400fe9384fe1ce40f687d88481fe5d77fcc83315a39b93fa9ae6b7808 -EBUILD readline-8.2_p13-r1.ebuild 7757 BLAKE2B 1e4ac1733fa997a2b2bf951c6edb01b390a1da3bdc432c22521a68054fb59a8949467bfc636942a8f7bf62a9c9c22b43a9d018ff3b9d49d0b63a95d331be7932 SHA512 c5e6ba07bfe6cba7e61495dbe7b54aad6910b760a8bd68758df0cc4f840be1ed6a505ca33096dc9444e9b43e005721a25f5ba5818d86eab41169dcf539830a39 -EBUILD readline-8.2_p13.ebuild 7673 BLAKE2B bec06a9c0cf03cf5b739d182f03d98ffd22a5b366d04b4a5ba95002bd05bf67ade0c71cbd09de14b03fc4ad0e6b87efdde5ea8bc52b943c39662b789a3abc414 SHA512 554cb0b86a2e63b41a2e13a7757603d4c81fb150248eb1c620a83cd2bc988d8764ab74205cd50fd69e7850b98e3c4f31f5c94bade455fe5c6c61f7c6c7549e63 +EBUILD readline-8.1_p2-r2.ebuild 7112 BLAKE2B d6a7e0a5dbfffe7bb5743afeba949b706ef437b609e082257b515fbb1c59d1f22934f555d23fdd090ac46377c9cc7b46ef12acc1fb8d4410c1285e1416023c89 SHA512 d6c1056a9392d73aa20197d65ecaa642121716e18f2e8af30b12eb6afaf0981c6aa8d90fc8e7fa9562a224d4e633c1de0841a6bb5f37b841487a54ca2971c804 +EBUILD readline-8.2_p13-r1.ebuild 7774 BLAKE2B 1d1d0affd98cdfae5631719ff0932be0d9d3cb8795a4a766ca6b9ad1e7aefc4481de1b934f0a39fffe72ef1d6cac5fd3c5f659fad371853442d5ec7fac8a8e1a SHA512 4c44d6166f4c4c2a04f1e76217ed41ae2c11e0099dc11187c27191f8b4ddf57504d1932b9c9fc82e6d7fd56fef10733f9be27d5970df994e593ecad5ba34bc22 +EBUILD readline-8.2_p13.ebuild 7690 BLAKE2B 92ccc7536949403673081bd8c21f9df08361b86299e5b44dc5fc0e4114bdfbf9680f3235ea1588e5c5ced8f5d7fd43ae7a5f17d6c32e480853297d26007ab1c1 SHA512 14072e5a71bbc20ea536e2ff56d4acde7e077339286b0055256c1fcea704f33db2a82ccf450d54bb993cedd7246e35f9871412442c64c008d80556607aea9b33 EBUILD readline-8.3_alpha.ebuild 7664 BLAKE2B c9c4b48462e671d26ddf981986b0310e88305e24990e1e312cf5bf48ec0e1a5310af059d6c91a3c7ab41ad4350275ddc3a96c517ba7d5fe8916c9468c3078e68 SHA512 6413171f101344d0896aaf5a9d592b7cbe55a337c780b537ab1b3f476a9f35e78446feda3e8bdcbeafa8c212ecce6066d7edeaa8121ed6d00b497df076bed95f EBUILD readline-8.3_alpha_p20241104.ebuild 7811 BLAKE2B 2000b04403b7245eb322a0c6ee6cf1d07061cbd6448f4017870d015071ecbc73ae11d8891487d34ec187ab949529df3c0e38069639f56d86bbd194c8bc32e574 SHA512 6055e75d59b204d1d18920d4875871a8d9569fd0cd5ea8ddaf91df2e5a0f6dbca466b9a27e5368f44902897d244d6b3afd8190d6d841f974c4945f33b5c1b7dd EBUILD readline-9999.ebuild 7811 BLAKE2B cf5eba115b0192005b2694856cef13519c3be3f9b65274286eacbd44ed4f700bad6a963604eb879911b28dba2804f27603d5c2fd6e079dc5a6b3b2acd42c5140 SHA512 c5bcb825bdccd649ba16986830df9bc4e20f74d6275cf9feb9f99de62715136951bd35b039c10c357bb972dee5b534994b7dc8d64a5a77b796568c99212bde50 diff --git a/sys-libs/readline/readline-8.1_p2-r2.ebuild b/sys-libs/readline/readline-8.1_p2-r2.ebuild index 34d9c8473928..256df55531d9 100644 --- a/sys-libs/readline/readline-8.1_p2-r2.ebuild +++ b/sys-libs/readline/readline-8.1_p2-r2.ebuild @@ -144,7 +144,7 @@ src_prepare() { src_configure() { # readline-8.3 drops unprototyped functions, earlier versions are # incompatible with C23. - append-cflags -std=gnu17 + append-cflags $(test-flags-CC -std=gnu17) # fix implicit decls with widechar funcs append-cppflags -D_GNU_SOURCE diff --git a/sys-libs/readline/readline-8.2_p13-r1.ebuild b/sys-libs/readline/readline-8.2_p13-r1.ebuild index 229382ca4b89..0917d70cb5c6 100644 --- a/sys-libs/readline/readline-8.2_p13-r1.ebuild +++ b/sys-libs/readline/readline-8.2_p13-r1.ebuild @@ -170,7 +170,7 @@ src_prepare() { src_configure() { # readline-8.3 drops unprototyped functions, earlier versions are # incompatible with C23. - append-cflags -std=gnu17 + append-cflags $(test-flags-CC -std=gnu17) # Fix implicit decls with widechar funcs append-cppflags -D_GNU_SOURCE diff --git a/sys-libs/readline/readline-8.2_p13.ebuild b/sys-libs/readline/readline-8.2_p13.ebuild index de76373ce838..1872970ab552 100644 --- a/sys-libs/readline/readline-8.2_p13.ebuild +++ b/sys-libs/readline/readline-8.2_p13.ebuild @@ -168,7 +168,7 @@ src_prepare() { src_configure() { # readline-8.3 drops unprototyped functions, earlier versions are # incompatible with C23. - append-cflags -std=gnu17 + append-cflags $(test-flags-CC -std=gnu17) # Fix implicit decls with widechar funcs append-cppflags -D_GNU_SOURCE -- cgit v1.2.3