summaryrefslogtreecommitdiff
path: root/sys-libs/glibc
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-11-03 16:06:58 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-11-03 16:06:58 +0000
commitbd4aeefe33e63f613512604e47bfca7b2187697d (patch)
treeadb35b5a9a00ee7ea591ab0c987f70167c23b597 /sys-libs/glibc
parent48ece6662cbd443015f5a57ae6d8cbdbd69ef37c (diff)
gentoo resync : 03.11.2019
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r--sys-libs/glibc/Manifest28
-rw-r--r--sys-libs/glibc/glibc-2.19-r2.ebuild22
-rw-r--r--sys-libs/glibc/glibc-2.24-r4.ebuild22
-rw-r--r--sys-libs/glibc/glibc-2.25-r11.ebuild22
-rw-r--r--sys-libs/glibc/glibc-2.26-r7.ebuild22
-rw-r--r--sys-libs/glibc/glibc-2.27-r6.ebuild22
-rw-r--r--sys-libs/glibc/glibc-2.28-r6.ebuild22
-rw-r--r--sys-libs/glibc/glibc-2.29-r2.ebuild22
-rw-r--r--sys-libs/glibc/glibc-2.29-r5.ebuild22
-rw-r--r--sys-libs/glibc/glibc-2.29-r6.ebuild (renamed from sys-libs/glibc/glibc-2.29-r4.ebuild)93
-rw-r--r--sys-libs/glibc/glibc-2.30-r1.ebuild22
-rw-r--r--sys-libs/glibc/glibc-2.30-r2.ebuild (renamed from sys-libs/glibc/glibc-2.30.ebuild)87
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild29
13 files changed, 357 insertions, 78 deletions
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 67928a4cbf36..6b1700cc5994 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -18,23 +18,23 @@ DIST glibc-2.27.tar.xz 15395316 BLAKE2B ea206d304c8c9aa86d69db981a14bea008602cea
DIST glibc-2.28-patches-9.tar.xz 98588 BLAKE2B 4ab583be712994f949dee2512da6e12fd7f7ad73e96393f21678552b43da98f49321b53b5b009551300cdb09ca135e7f6adc636ff750c251a1d6d7f262dbc410 SHA512 e3f40ae6e9d06471c1a11bd2bce7b5161d07c3d0a81791505a72aec4817e7faf9ef09841e98c6dcf62a0a00754dff87dd194d97ac6b6354aeb2497cf60900b96
DIST glibc-2.28.tar.xz 16484344 BLAKE2B 9aa8cbd5a145c2a6fde3a60b3d0a14b12b46ed79333ad1ca3e73464adcfe700277a17a9e7fd0ca36e355a0c5b0b27decfa091da320ba802741ad75cc955bbcc8 SHA512 521f820953ff07c69ece4c2186f59fc061a7f9747932cd70ef2995c2b2deee76eeb6de700d85071cdca5949179aa8ccee75eda7feca1394121ec7b821ad0a3f3
DIST glibc-2.29-patches-3.tar.xz 35812 BLAKE2B 90b8bc57b7a63f03617795c368b92e525eccfec462d638dbc25c581e5b7a2a72ffd5191842f5ac443a868cbc950838d7e5120e866d343a14b80c55dcbfa48f30 SHA512 4c9b78d9d1a8aa629418f2d758ef800857780b8a1fd8d3582b88348a513ca26ca7f6ac9110a8c6bae16949b360ba36840d184f42293cd4324760273592d1b438
-DIST glibc-2.29-patches-5.tar.xz 64032 BLAKE2B 6c3104bd80aaba617201812a631b734ded4b02f8d4dadb5e353af48692f2a1509ddae1d34098de913ae5b3ac1a29111a44dfae71c3024fab4a805a22e9d66e33 SHA512 39add1388268ecf2029cb90b8312fb610b203f459a092dc1da8b46ce91ccfbbdff235592aa6174edf9efe71039d984ee121dc9adf7e18490cf92fe24561b1267
DIST glibc-2.29-patches-6.tar.xz 64076 BLAKE2B 04c1baf838eff9275e79145d4a5a642dcd6572aadcdfc6782769f2de107dcd1648b81d0690068db8c0d53229efe2130e279f4aafe8a91238e5dd6a8a7120a433 SHA512 6494dcd23441fe308de97706f7abbea1571e0015d1456e719268b8026e1fb23733c2efd5256840f4b9f0df4f02ac7827b1fad56905cbd8919bca9c25b0afe822
+DIST glibc-2.29-patches-7.tar.xz 64752 BLAKE2B 766f3f2d11aedf7e1b83db94fd2793244e29abc0beb78071a3eadfb83d3589f56b07b68c8faffd77ecc859497ba52f0327e03cf984b00adbeee3e196b0c5e57c SHA512 aea61fd3e084b293d0a92c89cd83d176ca95112e23224091e31ac77f54089922926ebbd9b75748d5b750f3d88c6f55f9953f11375a07a219946c485d4bf6bcaf
DIST glibc-2.29.tar.xz 16515488 BLAKE2B b754e6825176538a2b8ca03fce014f0d87d333dc4d038bf0cda5ee8a2f484cd3ce93ad78ec126737e093ab64b55ceedf04cd08aecb4f8041daaa329e99717afa SHA512 146bc0769fe853d9edbf93cea7f74c5b3d84d69cb7614c62588e7acdecd1ec789a9d8949f3e8b99f8f36f2ccac740a003bed94f32b07817baf780b06cfeb6ed0
-DIST glibc-2.30-patches-1.tar.xz 19364 BLAKE2B 853ae651cf48a78796ac0a3c9c84098731d5a43b37644ee5029d2e2b06dab0d1d96b9dd7c3fd896c5513f5f712beca13845c1e24c698fe824ce0f529a2a827d4 SHA512 23065ec67b1a6302eece79da1ba731aa158a2abc0c65aed755cafea388c19aa1f545a6ea6d9db1fd128d06c6878b4c73aea07c6acc053b56bc416143e96e1c05
DIST glibc-2.30-patches-2.tar.xz 19588 BLAKE2B 672343ef8a44486304f03091844635febef9d1bc8000ab3382d702dcc1111a107b5e758355beaef8db5012f7e324e4c2365e10fc642b01c9f9a3a315de2dc7f6 SHA512 494155147b56e094a4427aed79e278b4a350928ddaff84330d6a40fad079131a4574f20c591dc95e572391b68ef72c49790571ee5323a2a541ec0757bcaeb161
+DIST glibc-2.30-patches-3.tar.xz 20412 BLAKE2B 8cd588284bf07985262a0289d8cbae03b0a75c48110fed6152c0431dc4f729a9695df910b1521a6072e9736b26145bf372d5b60163f64f4556f17f2f9f223e11 SHA512 0da9107518117a1cf901d282f2b84a2f4780130ab9eb7025ffd8b7e629aa6fd5f05b293dd49fc3c300bc2e74e7f81fc1f8a7cb12428b2be086a160d429715758
DIST glibc-2.30.tar.xz 16576920 BLAKE2B bd5aae4c9854f40785b91f83c3b632de6d48d811027ddfe61651cb1bc617db8017d7914c23a770cdd3feed06fcc316da841eea916cdba54179e7eace4ea45484 SHA512 37483990cd653685873e96c45dd1651b32b441b6d7919a68ebe3bae31a0c3f7ce183fc9b110f0b268b353f80312f18370559a1e7aecea0e5aa755c8f2aef1d6b
DIST glibc-9999-patches-14.tar.xz 17908 BLAKE2B a6e1f22a4358111ff757431c5d42fd020f6095584c3517aa854ea266129d1a177a7c09b310643f1cea32ffaf253806ac08f3aed864fb477097aaa2c4010450f4 SHA512 ef28b409b26472ec1d868167345aecfee70b1edf1863374dc2f25892f40c10f0826620a8b22fbbc9f737c8f611569b3412e8e2ea041da1ad1ef7f6398b82cddc
-EBUILD glibc-2.19-r2.ebuild 37294 BLAKE2B 61b3d7264b4591a645540b7be6b7f7c617dba61af38972ff9547d48bbf90b959e634391a4fbd950de631f092d23f4585b85e8b1eda5386dd57db5d201c7a306a SHA512 620140ba758d17e0d1edcc08e71477c5f9b240a2b86b170898841a9abc7e3090b5f3ec3730f44ff3315453696d1818c6f6c5e205544bb76efd3c562b05f2abf8
-EBUILD glibc-2.24-r4.ebuild 4945 BLAKE2B abeea3d030413af56ead335673e72fe6231de26f9d770b58928300bc8f8632c1eb1a7d65ed1b8e7c0ccc32f1283cd2e72a30253900fcce1c8cb34c9afe8aca83 SHA512 6d4e53d4ffb0789a4f92fd171058997ad2ec52b9c6cd5e8086cf79ab44dddeb0e14158a1c2e2cdc9a462e9b6a77fabde696b174c757ecd143d28b7cd606abd3a
-EBUILD glibc-2.25-r11.ebuild 4932 BLAKE2B bdc57cade5e96352ecb62e032f0ad048ae1f95383e66745b76f291f58b153f7ae5c37ad96a94b628c9b115db11d1bf9cb093da1eb5d47f7a70bff59dd296a805 SHA512 486937b13919c3c64539a2da3ebb32f8bd8a1b2b7286562d3525a111f23cd34df90ffb0fe10b793c30dc51af767ee580b9dcebbf390fdf2544c1fe2f20240414
-EBUILD glibc-2.26-r7.ebuild 25504 BLAKE2B fb61b5f6d84c58a183e5bff7143e11105c9a5ce6afcde505aede6cbaf48524e64aebe22eb47b877736fe82ca2a1eb4c6e9de7bff4d24dfe418bc2fcd89a2b276 SHA512 5ec483b841d43b8bcd9626d2ee94e56c6c58138c06a62b9bd53752396fe96e7e9c8dac565fd7de1dd30b04caaec790aec666b6e54870e37f4b2beb9d1644cd02
-EBUILD glibc-2.27-r6.ebuild 40871 BLAKE2B ca9730540a24b18d1da227e39ee5679012e8e28a8a787b21aefdf294b0668c28a1268103e459d52b233dce783cdfd1cf2fae6c582fd3a947dced3b9d7f0b138d SHA512 0965ba376cc7a55aa5cf960071a3d38c54ef180a443e3b8953d57e9e790a7365838ba24ca24750150d306db5fbd069e686add8ecc1c61c052f8756005ab62265
-EBUILD glibc-2.28-r6.ebuild 40641 BLAKE2B 0fb54fd95d02a5a6afc214625e743d5c2693809e274b7e2ab9664ae9f38056ba977cae6bc5751a0fe8208764da93ef9749d54f4bb5863c2026bb40c75cdf6869 SHA512 4e2e8bae3c31efce1a72c7baab698131f3903e69ba358a25090df3cd99d78ff7555cb366d48c7226e475cc43d06b437ba51a942365689c7f32de89fa8c18d941
-EBUILD glibc-2.29-r2.ebuild 41930 BLAKE2B bcb1911a391d7b7d60741a3a8f0084613894fd1fc6d74086433f8eac5afa1a834c4ffbb786fa9590f84b1c0dd619f7957863ef4d389a810df28474125146c8a6 SHA512 f3565011646ed6b5d1107fa32c0ba288235669f966a9fd15050e9d913e362c2bef68cc1565b527bf732ab53fa111f7ab5910a05212fc6383732568501a7eaeb7
-EBUILD glibc-2.29-r4.ebuild 42236 BLAKE2B 13a3249b2e56420e8587aeabded76157b2fa2a4f7bff84c25e9883af5334acb9a9e42d0d3f00abeaa3274f6b7d115afc9777b3deb0395cf91e67c140b08651f1 SHA512 1efb98c9cebfe87dcac0e51f7bb6294ac1e4e9cd5957830e3724fd45ff492195e5db450b590c7f4001bb54338902ed904bec2e34f50cc4a9d98a1e5e4eb140cc
-EBUILD glibc-2.29-r5.ebuild 42233 BLAKE2B 6a5918963b4f90b4e888bdb0c6153f50b536525db0fa7686c85cc0d79fc1fcfc1a3832145d2daea73cd8720bc8ffa92b3af4c17a27f59c5d141025f761067051 SHA512 f6bf65bf58c10803ab27e4b43167fa8bd6553bb7f4106732cab6fcb411e3289cb9aeb37bf3728a7d6c638851dfd7c2b267ead97716b23bf67513b6be8d475f6d
-EBUILD glibc-2.30-r1.ebuild 42522 BLAKE2B a2355b8c31b26e29591c7a9ac81db727cc0df5d84397f21880ccdfd30575d6e4d0bf5cdb2e1661dc38be65205e9f1feaa41f2adf7c4d13f53592e208ec6fb319 SHA512 6595471409756012d59a97246c6f0677e38eaffe1a077d5ff15e3ddef65acb5702818a36ab7ff22774d3c007a1642d36ee07fc449189a927f97703bf07052e43
-EBUILD glibc-2.30.ebuild 42525 BLAKE2B 3b7d542211e97f0ac15ea8c18c90c4742c622bad2dd07abf6cc2c8b4a283f8b905d92de7a4b288c0855ec5bd578f4f7dbd3974e5ddab7c8e6d4407bdff9299c5 SHA512 90fe39b77505e77ac3d086395f9b5186ae0333dbe3949b131b056f4ec52e69d4273f746a0445d119aedca1c8d07de5508b232c6c16b48f19d95197d915d31ab0
-EBUILD glibc-9999.ebuild 42487 BLAKE2B b1bd8cbe575183879f03471b29c0531f6c006da98a36bb14c73eabde308de0708ddd8870e71147502a2333841290bc909e3f6a1797809fe395d13a07967d98d0 SHA512 66e8e7c910d2662a4d0009b3cdaa1f2847aeb7a4936218b1444dc3d51d202dd6d406aa5c89bedeacc4bd45acc16086b3fcfe9f447a8d40d665c40663e77b347d
+EBUILD glibc-2.19-r2.ebuild 38499 BLAKE2B 02cf44053b89e707c8199790acceb573522ba2ea902fda81c8fce5cf5059978bcffbdd3284632c9322e6d0ef2d72686b89857d4484e221bb1506c70df58093c4 SHA512 1d843696065c2e2103ad5cdc673140b20fe8542c8090d7d79d18664b3d278ff330ac3c3f0766a49b3db05a576d0724d02f7c77f9bf2d7db48e55375478be6feb
+EBUILD glibc-2.24-r4.ebuild 6150 BLAKE2B 200792a0f1f94e3dcddea9861fdd29bd4f84e1ea3fe4383f8d129d8f93da4d4caa1e576fe3af9fb88b04938b911c68c19241efb43f03fbb06270ffbce88c6c6a SHA512 2feff5c5ef0ab2aa88529de5a7ab482d5028c927c737fc5dd98c131beabec0dcb73abddccc357f05a3771caa709b9ba605264c1bbd89b18953d7a7cfa473e59c
+EBUILD glibc-2.25-r11.ebuild 6137 BLAKE2B 9f3b67d7b51c1ebab3e8d6f09d5606605dc8baeca3f33257d10049eb55fceadf6ca4c8f344c4bb679fe741304e769ce0b40d172705f097df52cd56ffc9054eb9 SHA512 38742092d28a3676b14a779688b950ddb5b929509d856b2825a88963daf1a08a193bdeff40298924c9fc73739484c44d983851006e4d7845e3b8fc7c3e2562b9
+EBUILD glibc-2.26-r7.ebuild 26709 BLAKE2B cd6bc9991db0b53b83eda28a56fe4709de70ccb3b98d16cc33381305bfd01740378489274275654c2329868d69ffcb7d3b706868a10fc497ac6084de7d7bcc67 SHA512 edb6d0a381ef9e4d088269872d7eb4592a11808fb9e3b9cb76e8925882caabf04326a277f79f5482e97ab86d8732d0e59135b8413cd5373e050f89cf3fa45801
+EBUILD glibc-2.27-r6.ebuild 42076 BLAKE2B 7764eae64cfdced1389f5440847361542dd48ad06b11af309983c59c743d9adfabad6a13d99b8a7bc93e63bc7510ddd7b2290d185aaa69edc6359440ed6bd7e6 SHA512 547faf5a9f8cf17e793c94daefc365eb952649d8d78659e5565cf058a2b711cc2a40a0a620a40b07303a2e3ed6a9da60f58e4e868a2d7cce27a9b917887af52c
+EBUILD glibc-2.28-r6.ebuild 41846 BLAKE2B ab865b89519504b0d0ce267436e82612fbc5ecb908c4917c73ffbd58bceadd8150ad7f909a81a7b41861428c5603cafbdd7d3696508de7a11921005564ff6445 SHA512 dd5b66dd4773b5fcc066989477c5c6a345d37ff20aa2043ad9a7cad24ce5e7a72c8101e5d56e7bef7e628d3a9274f739c075cd6359fc381f563fde1ba6fcc178
+EBUILD glibc-2.29-r2.ebuild 43135 BLAKE2B 98d405683871c456d1bbdc675dc80e69a8addc6dbe6d3f05d3ff2552029dd9c9aedf95a710c95fd3f190e46b3485029c34cc146cfac64f870a5932634f04f62a SHA512 0ef4d0a55862fbee1bbabcb08c1b6dc39ab82099780a85948f8ad32ecab2bc56c9f214ec9775eeaf68e331f70657a55bf4b4f7c0a98c4a47546648f46ae4efdc
+EBUILD glibc-2.29-r5.ebuild 43438 BLAKE2B ce4d419263f872007356ce764464d4834aba95e41c0decfe434231cf8363479a5f2fb443ff0dafe49f6051243f4f0c7cbaa6291332307751260b1e419093b2b7 SHA512 e451e81069bd66ba67249846734415f4fae460bdd010f8a22b1b1715373354af9da6c975922d5c9a0151a8b6dc1e8018dc07a2825893480d605b0b46b718d315
+EBUILD glibc-2.29-r6.ebuild 43605 BLAKE2B 39ff5aae3f506e16c5626343c3faeb2d9a8f3751061ba1360a24103b9f51e188af17adce7a758bbb14978e940b885807c3d6422a12e62e411bc2ce18e76e92d4 SHA512 47f326c019c95af673be31328848747d88ec3059109b53b7088bb8fb629709cac6a4baf63a74564ecdd5343c694ef452cb81dda47aed3e2067fedc79615fefe3
+EBUILD glibc-2.30-r1.ebuild 43727 BLAKE2B a7ed79e68e97e0161f5f78a9f7610490c4bb73d4db0180097636589fc50c019082984712e30f976f98a1055f7182920f304bdcb29cdf70ac79236e7dab571a5c SHA512 cb6ea08b9d9f741a8e2a4cc1df0e21ebefa4c68583fd43ba70b95e1b9f5d047cfee925669e633a6f088c0c9fd05866e57ce08c67f304b1489b40163f48242e1f
+EBUILD glibc-2.30-r2.ebuild 44010 BLAKE2B a57916bee4472558780d12daf058d3cc5f1aca72d404cab4119a4d75cd44be428b26d944a61eddc29281b67dbd34f31c194e1c340b3faf4ba7fb7fd3c537f1ab SHA512 d148647b6003886b80e611a1aa7280b7a884f64a751917c12b0607be19a37e8be19d6ddb153b053f45d8633aceea1d819c09b3c2e2d471aaf41c318231d23e5f
+EBUILD glibc-9999.ebuild 44011 BLAKE2B 1526c362e808c5eac1401513dfddb828b99e6cccda96934cc8c761b8deaf542c4c3a3d6b1a32adb0cd77763770a044f8c20f4f0f601b5920b0c9fe14a600c621 SHA512 8da8ed353b94f51d47629ba1e8768eb2b198ce55a9db48ee2cff765901349282bb445d60c7eb846d238099e4ea5458980d90012d5cf89f4aa7d6fa0b254f6efc
MISC metadata.xml 1323 BLAKE2B 6a19ccbf9f068c6c3d3b945d3011dce3d7712dd74a2daeaa8244eef73fd86723b275ce018ec5557862278c23883fabfb27e91e0b88ff62c34fffdadd4b024411 SHA512 848adbf531103d69b8b0e7017c25de730daecccae220e337e475ba8dbcaa95c6d5e440330be56367974607050dfa1964026ed90bc699ab5f12fef35c88d67505
diff --git a/sys-libs/glibc/glibc-2.19-r2.ebuild b/sys-libs/glibc/glibc-2.19-r2.ebuild
index 0fedbb8e9409..de97f1158877 100644
--- a/sys-libs/glibc/glibc-2.19-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.19-r2.ebuild
@@ -59,6 +59,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we disable stripping
+# entirely.
+RESTRICT=strip
+
# We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS.
COMMON_DEPEND="
diff --git a/sys-libs/glibc/glibc-2.24-r4.ebuild b/sys-libs/glibc/glibc-2.24-r4.ebuild
index b808611bd319..6e4b70cd46d0 100644
--- a/sys-libs/glibc/glibc-2.24-r4.ebuild
+++ b/sys-libs/glibc/glibc-2.24-r4.ebuild
@@ -52,6 +52,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we disable stripping
+# entirely.
+RESTRICT=strip
+
is_crosscompile() {
[[ ${CHOST} != ${CTARGET} ]]
}
diff --git a/sys-libs/glibc/glibc-2.25-r11.ebuild b/sys-libs/glibc/glibc-2.25-r11.ebuild
index e2a0f9131bbc..0f544aa3101c 100644
--- a/sys-libs/glibc/glibc-2.25-r11.ebuild
+++ b/sys-libs/glibc/glibc-2.25-r11.ebuild
@@ -54,6 +54,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we disable stripping
+# entirely.
+RESTRICT=strip
+
is_crosscompile() {
[[ ${CHOST} != ${CTARGET} ]]
}
diff --git a/sys-libs/glibc/glibc-2.26-r7.ebuild b/sys-libs/glibc/glibc-2.26-r7.ebuild
index 34d8fb8a7ac9..ebe70b6e3ea6 100644
--- a/sys-libs/glibc/glibc-2.26-r7.ebuild
+++ b/sys-libs/glibc/glibc-2.26-r7.ebuild
@@ -58,6 +58,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we disable stripping
+# entirely.
+RESTRICT=strip
+
is_crosscompile() {
[[ ${CHOST} != ${CTARGET} ]]
}
diff --git a/sys-libs/glibc/glibc-2.27-r6.ebuild b/sys-libs/glibc/glibc-2.27-r6.ebuild
index f1409e36cf34..8815d7bc6233 100644
--- a/sys-libs/glibc/glibc-2.27-r6.ebuild
+++ b/sys-libs/glibc/glibc-2.27-r6.ebuild
@@ -58,6 +58,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we disable stripping
+# entirely.
+RESTRICT=strip
+
# We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS.
COMMON_DEPEND="
diff --git a/sys-libs/glibc/glibc-2.28-r6.ebuild b/sys-libs/glibc/glibc-2.28-r6.ebuild
index aa318b7e0f1b..7412d5dfc5cf 100644
--- a/sys-libs/glibc/glibc-2.28-r6.ebuild
+++ b/sys-libs/glibc/glibc-2.28-r6.ebuild
@@ -58,6 +58,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we disable stripping
+# entirely.
+RESTRICT=strip
+
# We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS,
# and that gcc already contains the hardened patches.
diff --git a/sys-libs/glibc/glibc-2.29-r2.ebuild b/sys-libs/glibc/glibc-2.29-r2.ebuild
index b80ddd008144..a09890ee70ad 100644
--- a/sys-libs/glibc/glibc-2.29-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.29-r2.ebuild
@@ -60,6 +60,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we disable stripping
+# entirely.
+RESTRICT=strip
+
# We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS,
# and that gcc already contains the hardened patches.
diff --git a/sys-libs/glibc/glibc-2.29-r5.ebuild b/sys-libs/glibc/glibc-2.29-r5.ebuild
index 1c3f4a15dde7..5ef228c36885 100644
--- a/sys-libs/glibc/glibc-2.29-r5.ebuild
+++ b/sys-libs/glibc/glibc-2.29-r5.ebuild
@@ -60,6 +60,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we disable stripping
+# entirely.
+RESTRICT=strip
+
# We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS,
# and that gcc already contains the hardened patches.
diff --git a/sys-libs/glibc/glibc-2.29-r4.ebuild b/sys-libs/glibc/glibc-2.29-r6.ebuild
index 7282d89d8eee..72a38553096f 100644
--- a/sys-libs/glibc/glibc-2.29-r4.ebuild
+++ b/sys-libs/glibc/glibc-2.29-r6.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
PYTHON_COMPAT=( python3_{5,6,7} )
-inherit python-any-r1 prefix eutils eapi7-ver toolchain-funcs flag-o-matic gnuconfig usr-ldscript \
+inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig usr-ldscript \
multilib systemd multiprocessing
DESCRIPTION="GNU libc C library"
@@ -28,9 +28,9 @@ RELEASE_VER=${PV}
GCC_BOOTSTRAP_VER=20180511
# Gentoo patchset
-PATCH_VER=5
+PATCH_VER=7
-SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
+SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
IUSE="audit caps cet compile-locales doc gd headers-only +multiarch multilib nscd profile selinux +ssp suid systemtap test vanilla"
@@ -60,9 +60,39 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we strip selectively.
+
# We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS,
# and that gcc already contains the hardened patches.
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=app-misc/pax-utils-0.1.10
+ sys-devel/bison
+ !<sys-apps/sandbox-1.6
+ !<sys-apps/portage-2.1.2
+ !<sys-devel/bison-2.7
+ !<sys-devel/make-4
+ doc? ( sys-apps/texinfo )
+"
COMMON_DEPEND="
nscd? ( selinux? (
audit? ( sys-process/audit )
@@ -73,14 +103,6 @@ COMMON_DEPEND="
systemtap? ( dev-util/systemtap )
"
DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
- >=app-misc/pax-utils-0.1.10
- sys-devel/bison
- !<sys-apps/sandbox-1.6
- !<sys-apps/portage-2.1.2
- !<sys-devel/bison-2.7
- !<sys-devel/make-4
- doc? ( sys-apps/texinfo )
test? ( >=net-dns/libidn2-2.0.5 )
"
RDEPEND="${COMMON_DEPEND}
@@ -90,17 +112,17 @@ RDEPEND="${COMMON_DEPEND}
"
if [[ ${CATEGORY} == cross-* ]] ; then
- DEPEND+=" !headers-only? (
+ BDEPEND+=" !headers-only? (
>=${CATEGORY}/binutils-2.24
>=${CATEGORY}/gcc-6
)"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else
- DEPEND+="
+ BDEPEND+="
>=sys-devel/binutils-2.24
>=sys-devel/gcc-6
- virtual/os-headers
"
+ DEPEND+=" virtual/os-headers "
RDEPEND+="
>=net-dns/libidn2-2.0.5
vanilla? ( !sys-libs/timezone-data )
@@ -514,7 +536,7 @@ check_devpts() {
[[ ${MERGE_TYPE} == "buildonly" ]] && return
# Only sanity check when installing the native glibc.
- [[ ${ROOT} != "/" ]] && return
+ [[ -n ${ROOT} ]] && return
# If they're opting in to the old suid code, then no need to check.
use suid && return
@@ -602,7 +624,7 @@ sanity_prechecks() {
# Prevent native builds from downgrading
if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ ${ROOT} == "/" ]] && \
+ [[ -z ${ROOT} ]] && \
[[ ${CBUILD} == ${CHOST} ]] && \
[[ ${CHOST} == ${CTARGET} ]] ; then
@@ -1094,7 +1116,7 @@ src_configure() {
}
do_src_compile() {
- emake -C "$(builddir nptl)" || die "make nptl for ${ABI} failed"
+ emake -C "$(builddir nptl)"
}
src_compile() {
@@ -1142,7 +1164,7 @@ run_locale_gen() {
local locale_list="${root}/etc/locale.gen"
- pushd "${ED}"/$(get_libdir)
+ 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"
@@ -1152,14 +1174,14 @@ run_locale_gen() {
locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \
--destdir "${root}"
- popd
+ popd >/dev/null
}
glibc_do_src_install() {
local builddir=$(builddir nptl)
cd "${builddir}"
- emake install_root="${D}$(build_eprefix)$(alt_prefix)" install || die
+ 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
@@ -1172,13 +1194,20 @@ glibc_do_src_install() {
# '#define VERSION "2.26.90"' -> '2.26.90'
local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
- if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+ # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
# Move versioned .a file out of libdir to evade portage QA checks
# instead of using gen_usr_ldscript(). We fix ldscript as:
# "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
- sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die
+ 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
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
fi
# We'll take care of the cache ourselves
@@ -1336,7 +1365,7 @@ glibc_do_src_install() {
# 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}"
+ run_locale_gen --inplace-glibc "${ED}/"
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
fi
}
@@ -1344,7 +1373,7 @@ glibc_do_src_install() {
glibc_headers_install() {
local builddir=$(builddir "headers")
cd "${builddir}"
- emake install_root="${D}$(build_eprefix)$(alt_prefix)" install-headers
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
insinto $(alt_headers)/gnu
doins "${S}"/include/gnu/stubs.h
@@ -1415,7 +1444,7 @@ pkg_preinst() {
einfo "Defaulting /etc/host.conf:multi to on"
fi
- [[ ${ROOT} != "/" ]] && return 0
+ [[ -n ${ROOT} ]] && return 0
[[ -d ${ED}/$(get_libdir) ]] || return 0
[[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
}
@@ -1426,15 +1455,11 @@ pkg_postinst() {
if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
# Generate fastloading iconv module configuration file.
- "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/"
fi
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ... if in a chroot or a diff init package, ignore
- # errors from this step #253697
- /sbin/telinit U 2>/dev/null
-
- use compile-locales || run_locale_gen "${EROOT}"
+ if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
+ use compile-locales || run_locale_gen "${EROOT}/"
fi
# Check for sanity of /etc/nsswitch.conf, take 2
diff --git a/sys-libs/glibc/glibc-2.30-r1.ebuild b/sys-libs/glibc/glibc-2.30-r1.ebuild
index b3da5c0345ed..958a2c87cde9 100644
--- a/sys-libs/glibc/glibc-2.30-r1.ebuild
+++ b/sys-libs/glibc/glibc-2.30-r1.ebuild
@@ -61,6 +61,28 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we disable stripping
+# entirely.
+RESTRICT=strip
+
# We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS,
# and that gcc already contains the hardened patches.
diff --git a/sys-libs/glibc/glibc-2.30.ebuild b/sys-libs/glibc/glibc-2.30-r2.ebuild
index 5a8933d5d964..238a82906316 100644
--- a/sys-libs/glibc/glibc-2.30.ebuild
+++ b/sys-libs/glibc/glibc-2.30-r2.ebuild
@@ -1,11 +1,11 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
PYTHON_COMPAT=( python3_{5,6,7} )
-inherit python-any-r1 prefix eutils eapi7-ver toolchain-funcs flag-o-matic gnuconfig usr-ldscript \
+inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig usr-ldscript \
multilib systemd multiprocessing
DESCRIPTION="GNU libc C library"
@@ -19,7 +19,7 @@ if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
inherit git-r3
else
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
KEYWORDS=""
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
fi
@@ -29,9 +29,9 @@ RELEASE_VER=${PV}
GCC_BOOTSTRAP_VER=20180511
# Gentoo patchset
-PATCH_VER=1
+PATCH_VER=3
-SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
+SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz"
SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
IUSE="audit caps cet compile-locales custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs suid systemtap test vanilla"
@@ -61,9 +61,39 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we strip selectively.
+
# We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS,
# and that gcc already contains the hardened patches.
+BDEPEND="
+ ${PYTHON_DEPS}
+ >=app-misc/pax-utils-0.1.10
+ sys-devel/bison
+ !<sys-apps/sandbox-1.6
+ !<sys-apps/portage-2.1.2
+ !<sys-devel/bison-2.7
+ !<sys-devel/make-4
+ doc? ( sys-apps/texinfo )
+"
COMMON_DEPEND="
nscd? ( selinux? (
audit? ( sys-process/audit )
@@ -74,14 +104,6 @@ COMMON_DEPEND="
systemtap? ( dev-util/systemtap )
"
DEPEND="${COMMON_DEPEND}
- ${PYTHON_DEPS}
- >=app-misc/pax-utils-0.1.10
- sys-devel/bison
- !<sys-apps/sandbox-1.6
- !<sys-apps/portage-2.1.2
- !<sys-devel/bison-2.7
- !<sys-devel/make-4
- doc? ( sys-apps/texinfo )
test? ( >=net-dns/libidn2-2.0.5 )
"
RDEPEND="${COMMON_DEPEND}
@@ -91,17 +113,17 @@ RDEPEND="${COMMON_DEPEND}
"
if [[ ${CATEGORY} == cross-* ]] ; then
- DEPEND+=" !headers-only? (
+ BDEPEND+=" !headers-only? (
>=${CATEGORY}/binutils-2.24
>=${CATEGORY}/gcc-6
)"
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
else
- DEPEND+="
+ BDEPEND+="
>=sys-devel/binutils-2.24
>=sys-devel/gcc-6
- virtual/os-headers
"
+ DEPEND+=" virtual/os-headers "
RDEPEND+="
>=net-dns/libidn2-2.0.5
vanilla? ( !sys-libs/timezone-data )
@@ -521,7 +543,7 @@ check_devpts() {
[[ ${MERGE_TYPE} == "buildonly" ]] && return
# Only sanity check when installing the native glibc.
- [[ ${ROOT} != "/" ]] && return
+ [[ -n ${ROOT} ]] && return
# If they're opting in to the old suid code, then no need to check.
use suid && return
@@ -609,7 +631,7 @@ sanity_prechecks() {
# Prevent native builds from downgrading
if [[ ${MERGE_TYPE} != "buildonly" ]] && \
- [[ ${ROOT} == "/" ]] && \
+ [[ -z ${ROOT} ]] && \
[[ ${CBUILD} == ${CHOST} ]] && \
[[ ${CHOST} == ${CTARGET} ]] ; then
@@ -1101,7 +1123,7 @@ src_configure() {
}
do_src_compile() {
- emake -C "$(builddir nptl)" || die "make nptl for ${ABI} failed"
+ emake -C "$(builddir nptl)"
}
src_compile() {
@@ -1166,7 +1188,7 @@ glibc_do_src_install() {
local builddir=$(builddir nptl)
cd "${builddir}"
- emake install_root="${D}$(build_eprefix)$(alt_prefix)" install || die
+ 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
@@ -1179,13 +1201,20 @@ glibc_do_src_install() {
# '#define VERSION "2.26.90"' -> '2.26.90'
local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
- if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+ # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+
+ if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
# Move versioned .a file out of libdir to evade portage QA checks
# instead of using gen_usr_ldscript(). We fix ldscript as:
# "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..."
- sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die
+ 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
+ mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die
fi
# We'll take care of the cache ourselves
@@ -1343,7 +1372,7 @@ glibc_do_src_install() {
# 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}"
+ run_locale_gen --inplace-glibc "${ED}/"
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die
fi
}
@@ -1351,7 +1380,7 @@ glibc_do_src_install() {
glibc_headers_install() {
local builddir=$(builddir "headers")
cd "${builddir}"
- emake install_root="${D}$(build_eprefix)$(alt_prefix)" install-headers
+ emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers
insinto $(alt_headers)/gnu
doins "${S}"/include/gnu/stubs.h
@@ -1427,7 +1456,7 @@ pkg_preinst() {
einfo "Defaulting /etc/host.conf:multi to on"
fi
- [[ ${ROOT} != "/" ]] && return 0
+ [[ -n ${ROOT} ]] && return 0
[[ -d ${ED}/$(get_libdir) ]] || return 0
[[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
}
@@ -1438,11 +1467,11 @@ pkg_postinst() {
if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
# Generate fastloading iconv module configuration file.
- "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/"
fi
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- use compile-locales || run_locale_gen "${EROOT}"
+ if ! is_crosscompile && [[ -z ${ROOT} ]] ; then
+ use compile-locales || run_locale_gen "${EROOT}/"
fi
# Check for sanity of /etc/nsswitch.conf, take 2
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index d529e346178e..4ff0c140c457 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -19,7 +19,7 @@ if [[ ${PV} == 9999* ]]; then
EGIT_REPO_URI="https://sourceware.org/git/glibc.git"
inherit git-r3
else
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86"
KEYWORDS=""
SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
fi
@@ -61,6 +61,26 @@ if [[ ${CTARGET} == ${CHOST} ]] ; then
fi
fi
+# Note [Disable automatic stripping]
+# Disabling automatic stripping for a few reasons:
+# - portage's attempt to strip breaks non-native binaries at least on
+# arm: bug #697428
+# - portage's attempt to strip libpthread.so.0 breaks gdb thread
+# enumeration: bug #697910. This is quite subtle:
+# * gdb uses glibc's libthread_db-1.0.so to enumerate threads.
+# * libthread_db-1.0.so needs access to libpthread.so.0 local symbols
+# via 'ps_pglobal_lookup' symbol defined in gdb.
+# * 'ps_pglobal_lookup' uses '.symtab' section table to resolve all
+# known symbols in 'libpthread.so.0'. Specifically 'nptl_version'
+# (unexported) is used to sanity check compatibility before enabling
+# debugging.
+# Also see https://sourceware.org/gdb/wiki/FAQ#GDB_does_not_see_any_threads_besides_the_one_in_which_crash_occurred.3B_or_SIGTRAP_kills_my_program_when_I_set_a_breakpoint
+# * normal 'strip' command trims '.symtab'
+# Thus our main goal here is to prevent 'libpthread.so.0' from
+# losing it's '.symtab' entries.
+# As Gentoo's strip does not allow us to pass less aggressive stripping
+# options and does not check the machine target we strip selectively.
+
# We need a new-enough binutils/gcc to match upstream baseline.
# Also we need to make sure our binutils/gcc supports TLS,
# and that gcc already contains the hardened patches.
@@ -1181,6 +1201,13 @@ glibc_do_src_install() {
# '#define VERSION "2.26.90"' -> '2.26.90'
local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
+ # Avoid stripping binaries not targeted by ${CHOST}. Or else
+ # ${CHOST}-strip would break binaries build for ${CTARGET}.
+ is_crosscompile && dostrip -x /
+ # gdb thread introspection relies on local libpthreas symbols. stripping breaks it
+ # See Note [Disable automatic stripping]
+ dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so
+
if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
# Move versioned .a file out of libdir to evade portage QA checks
# instead of using gen_usr_ldscript(). We fix ldscript as: