summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2014-11-25 00:36:13 +0900
committerBenda Xu <heroxbd@gentoo.org>2014-11-25 00:41:45 +0900
commitdfa928e8f09cb249faba9ebc431a953ad4065a7a (patch)
tree5c0787a998a9fb085f2a3d78a9677b2b22184b64 /sys-libs/glibc
parentsys-libs/glibc: import eblits from gx86 (diff)
downloadandroid-dfa928e8f09cb249faba9ebc431a953ad4065a7a.tar.gz
android-dfa928e8f09cb249faba9ebc431a953ad4065a7a.tar.bz2
android-dfa928e8f09cb249faba9ebc431a953ad4065a7a.zip
sys-libs/glibc version bump for RAP
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r--sys-libs/glibc/Manifest33
-rw-r--r--sys-libs/glibc/files/2.20/glibc-2.20-gentoo-chk_fail.c299
-rw-r--r--sys-libs/glibc/files/2.20/glibc-2.20-gentoo-stack_chk_fail.c2
-rw-r--r--sys-libs/glibc/files/2.20/glibc-2.20-hardened-inittls-nosysenter.patch306
-rw-r--r--sys-libs/glibc/files/2.20/glibc-2.20-shadow-prefix.patch24
-rw-r--r--sys-libs/glibc/files/2.20/glibc-2.20-vdso-disable.patch20
-rw-r--r--sys-libs/glibc/files/eblits/common.eblit37
-rw-r--r--sys-libs/glibc/files/eblits/pkg_postinst.eblit8
-rw-r--r--sys-libs/glibc/files/eblits/pkg_preinst.eblit2
-rw-r--r--sys-libs/glibc/files/eblits/src_configure.eblit18
-rw-r--r--sys-libs/glibc/files/eblits/src_install.eblit40
-rw-r--r--sys-libs/glibc/glibc-2.20.ebuild209
12 files changed, 952 insertions, 46 deletions
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index b4bb0c4..11a8036 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -12,6 +12,11 @@ AUX 2.17/glibc-2.17-shadow-prefix.patch 950 SHA256 36fa45e0e2642c6ce8809341b69e9
AUX 2.17/locale-gen_prefix.patch 2704 SHA256 0807c8979b7a1a63b48d155417ff8ecc7e14773e928a0d1fe6c349a36fcdadef SHA512 d6b41b953713f7fe0ba14af6d045fc0e6b649f278da691ca5f021d95be5cdabfc87de399880cf988fec2b189fac22864d004ec8d159e59a2348b41945de1d5db WHIRLPOOL 3c7d6b4e789ae494cebea620ed64a6ba8dd401837914f4ead72c7b2d6af94538c9a28f65781db7e6ae0d21c7fac13c531b71147fdb5456ffd39ae1246b331069
AUX 2.17/vdso-disable.patch 1136 SHA256 49006855c1ba3ae3d3aa5ed71787056dc64e993eec70a4bef05bcc9f4d824014 SHA512 6eeb6eae8b8c1777ebd18170a7651b9e95297125cfc3829786c4d02887cad4a5d768fc2950723d1d040d16d15d72491d7443a3c14ca9f20eb2adb1ba6d1649ca WHIRLPOOL 80367da491b958d0b7855d23d3225a5c17a3a7a1b1f9a54ebc093c53823a5ef1642b974b45e079aec0abff0476494368ed9afcaed83b87576ed8458b8348e41e
AUX 2.17/vdso.patch 697 SHA256 26f2089344709de9c1bdd2f974d02ff5d4c465f6ebebd5d1ac2cd72b732de201 SHA512 a303a6828ed001b16f2f5c3532890cff66a50259c2e2aa2843e992f2bed5e6141abc9e120afed25f2e1f30d77bc218c3940d680c3d73c227d2056370d5e6b806 WHIRLPOOL edcaa815b8f86e17d77f0582453a717fbbd848400bfdbd302730fec20a952a584ea8f5ba4f7175b25d84752bc895519d7baa55664073cae5037962b0c1825aa3
+AUX 2.20/glibc-2.20-gentoo-chk_fail.c 8978 SHA256 f9cc426b0fb21de1dc11bb36e43bca8e1b3114fe78f8b343f672a951a82c742e SHA512 5cb529ac9d18a315f25fd48a3a80a529924bee0588074c97e6df7dbe8568a67f786363c41da6300ea55818369e3609ed4315b2e2104f8a8b4f1266ba43076eda WHIRLPOOL 2d38c19a20226fc4687037b8bb19025065f039ddaa62466879ca98765c8899e64b147dd148565304419ed1a98fbe1f8403710b22c930b08a19bddba7e79b0f1d
+AUX 2.20/glibc-2.20-gentoo-stack_chk_fail.c 55 SHA256 ec73e74297b5eade591bfb3a2999989e2a7aa80752140048ffa67349635f05e7 SHA512 4dfec1bd17007b826110dcb73d09331a58b7a892c87de55b94480b14c28686442c567725b610082813411cf9911e180835a400a54ea704fe80f81cfba966a989 WHIRLPOOL b2b338a50f7895c530a71a19e4582bd0116a0b9d13b2e1505f0566924557493849f93cefb2c0ad1719ef684321e145129e0f72cfc9aa85a44ea7ebf910e7304c
+AUX 2.20/glibc-2.20-hardened-inittls-nosysenter.patch 9951 SHA256 992fb70b9b62674d94ef8938297a3f2591b3121495987d927f5a44c1d8788658 SHA512 a8302ee2963bd791be859233223b17cd154afbf04c13c046956bb1140d748272d7bcb3a6167ce8b61573ebcffe906dff064308374d2910656b8fad18480fe422 WHIRLPOOL b8753d6f1301650b91b5cf4f342de22010d819deb2bf4da27aac33d7540e15a140b8a7a4c5e111faba320873ed5784b22f6add29181fbaef14c3e9504b1b838f
+AUX 2.20/glibc-2.20-shadow-prefix.patch 749 SHA256 354583917144a16fcf4bd986521d345b8f45ad6c1b13443d578ab6627e46b597 SHA512 eb0a7f19448fed82efdb7972fa23be0a341d005d47395915c0b963d2b4d807fae446660d4903aa2547e9044802294c65120ab22fe35137754db33e6f941b71e4 WHIRLPOOL 7be293997a47e9c58a6d8f3192ad302066a424c5f8a03097756f8897a0008a1ec63da62d4b94e4d6a6cf5f36313a6ddd474cb0fe6dd9eea42511418da03c7c6d
+AUX 2.20/glibc-2.20-vdso-disable.patch 725 SHA256 476d1198e990a0beb42a7350c52c34783de33d0364ab3e11d9b74a81e027977b SHA512 2c47efc06aa93eea18e6d407c2b1cfdaa80b374bdaf7ad257ca02857aab53d7a6ec46092872d3affff2ec800f6937012571115b8c83d116084c21f8130c4fdd6 WHIRLPOOL fb919be2a23f5a240817dc8540582915cb0e0497196237a7bcd891113738b81072e96f4af4668d0ebd05094c2983c411265267bbcfc2be96c5ff33f37fe7f936
AUX 2.3.3/glibc-2.3.3-localedef-fix-trampoline.patch 2329 SHA256 b5cf51d1ff5479d09fbc82992f126ca4969006c90c3a2ae94ad586d4902d791b SHA512 939ec7da977837ef46aa8894f99ac06b3fccfc36dd672889b85ae8cbbfc9a963c5d0c031d776aa2feee29ddf8341b4cc7a50ea19b7c6f7e80df74eef5f1fd977 WHIRLPOOL 47d248ddba815a517aed9b7dbfa247bdedf293cb5adad8079be803ea4a682136f01b47fd3817a1696b3758c4631d1a25376bf58ef039998ace4a6b65807fe75e
AUX 2.5/glibc-2.5-gentoo-stack_chk_fail.c 9058 SHA256 067fba2a36d2630d50198c44395ef208cdf080508f1b716bd3d079f7b964e2df SHA512 2d404bec1e009d111b775fde620102b3d0ea7614d07ba31350940f2693e937e825acc43d1ab94bad2eecac61d47c696098327096dff8f08b4b7312d0873d71a6 WHIRLPOOL bb27ef90afb256d3822787b93574d4f4f5632995663e08b7201db17a4f38f6e2a8fd6368aaf699a808cd8f7acc346625b5607dcbf1e88f8b28dcc6d3dba92399
AUX 2.5/glibc-2.5-hardened-configure-picdefault.patch 794 SHA256 0c0359f567e4ad2d3184618bf6ac7e6102b703eab6227c7e9a4ff4dcdeed2c91 SHA512 99caace6c3528db400f8039c3f5aa65a2d5088d9758894c8a49df2b5045226a4056972de2d162411617162edd9023b6c6f80d85509638b5d68a8d0cda40adafe WHIRLPOOL 1271cea2155149e789f1242759e516443c5cf152ae9612d91d2a25a727952684eb043fbcfb38186a31fc6a1568201de5ef40af45436b137453e0582f2f6facde
@@ -20,16 +25,27 @@ AUX 2.5/glibc-2.5-hardened-pie.patch 1569 SHA256 ff9cde8857c5da89faa4039e2a81748
AUX 2.6/glibc-2.6-gentoo-stack_chk_fail.c 9545 SHA256 1410ded812be80d452eada5f9d6b9bd7bdb504c14f01cc27dce3e36b6f92b92a SHA512 360b77df2d19d14060e19e763878297bf042eccd5206ce4829a33c78c982b59b46144116d237a7cac73a22dd6cb4987c8dd50f1d16003baa22c2cb2942d2cbdf WHIRLPOOL 44e14dacdd258c46201a44c2c6aae4d975b960a914c24e49f2b39dae960636512049daa052d3cd8e8d93819d263327c28eac947efdb5d9e240d1bc6e9964016f
AUX 2.6/glibc-2.6-hardened-inittls-nosysenter.patch 8674 SHA256 cf58ded8fbe9fcb3dc094521feec2588c1520ff2c632b20c69d6a210325c4fcf SHA512 094b24474e42a9714f5298b0768d44f2c0e01b7d8c3b0a754bb16caa6c024106e8c0b1acbce670bacec1ead6653f8365397173d62cb8168b946c8f521ca155d2 WHIRLPOOL 9fa16256f9d3bd2f38023549c0bd4c932d3173b6c3f4ef66e19cdb3eff5cb2def6ec02fa72a7e57ba74da6d5f29b82ddb9692d59f6c694d45b5989fa0bfa6057
AUX 2.7/glibc-2.7-hardened-inittls-nosysenter.patch 8755 SHA256 b0b1bf0746f7160b89cf281502b95c38dec9cb948d6a50a907b84fd6230a2dc3 SHA512 50563c26e1fd2e71cb034c8a1b85e0e4075ac6467bae46d4cba0c105c940c5aa6531c39cf00c63ebf94be4e290ee485d7bd8239ff08dbc781db605b45c4aa38f WHIRLPOOL 2047148b53073bae4031ad864fc360112e2812115ec455142c82d4694a57387b49b36c98f400dd6f77f5dab3d419303faabe8183a16f0fd68387996c95888a43
-AUX eblits/common.eblit 10936 SHA256 f2ce0cc64cee2efadd2428be4fe7ddb1507f21a05286e1ba19ebbc1dd6052e38 SHA512 cde7f8c639598fc469587c9a31ad1146c734c2ffcd242d3083edafeeefe522caabed228a005360b69d2a01da59994b4443323e62f5ca3820da0e4c41cd3c35e8 WHIRLPOOL 204eb9a3d0be28c764251fa71b56fb6c8f9882a54f4b1eca76bafbecf5459b7a6789da12c8cd77540ce7b7e93fb0d0406cf43f164e8fdea40ed684ecfdd50a89
+AUX eblits.old/common.eblit 10936 SHA256 f2ce0cc64cee2efadd2428be4fe7ddb1507f21a05286e1ba19ebbc1dd6052e38 SHA512 cde7f8c639598fc469587c9a31ad1146c734c2ffcd242d3083edafeeefe522caabed228a005360b69d2a01da59994b4443323e62f5ca3820da0e4c41cd3c35e8 WHIRLPOOL 204eb9a3d0be28c764251fa71b56fb6c8f9882a54f4b1eca76bafbecf5459b7a6789da12c8cd77540ce7b7e93fb0d0406cf43f164e8fdea40ed684ecfdd50a89
+AUX eblits.old/pkg_postinst.eblit 1085 SHA256 71b7a853cd825ed7044e69c8a76b6ee3e00d46614015960d411941c4d12f5d20 SHA512 fc39960f370f0a4d5ef4d794f6de14594a53730ec0b3a49956cfddced17196f485337b9cb29759f232ccd33b4e9af7affe92aac93752397aa2e29ff0c1e36809 WHIRLPOOL 22936beba3ab465ef32717c1659dffa6ef7094d59d0c8ce2455563d56ce371598deac783f365abe2c55a527e7bdb28d07733ee3ea0858e2df86c65d66d729031
+AUX eblits.old/pkg_preinst.eblit 2289 SHA256 b99f883d8c8ac31ebc81f0ea3239a1f0bddfb49bdd7ddfa97e45bbfb4b3b5ebb SHA512 ea80538692db8492b75e84b39bab88d0a51faabba70f4f5a9d610af61a488cbd3cb9c74e532544d8a541c73059af1133d4d6e68fef95012ef9c6f19fd424cecc WHIRLPOOL 0e8cb61657b7af02a41c20da1dc23a8ca24ed29795eee2a70f78d134d5f7ad29b1a99f6fb2a414bf18db6d2ad550b0db9c85ff4e1c10e8fe3e1e7942b4354365
+AUX eblits.old/pkg_setup.eblit 3897 SHA256 eb384c601e2a48edd1f2e3ad591847d65c88d9560ce24efa69502ad75fc7350c SHA512 7af588bfdf9ac0c7042ca96578b7c1c9f67abfbf7d653d9ec1a811addafc9a800cc89d250f44a0570f9c02e8294a28b330eb278c020de7eed4c181e44ecbe57e WHIRLPOOL 271229a58dd9498bcaab420f4d5ab2648122c81b39e6611551cbd3f693fddbc9ae44787c34b7b68644d8cab270147c716a362fbe414602d8938d0166f2b5a99b
+AUX eblits.old/src_compile.eblit 7157 SHA256 5ebcc1598badba5e6beed22754e5f36f6a9420efac45b488ce84e67e83ce256a SHA512 720ddbfaa13848bf53be41d92b6e6c8c4f4dbadd253733e463c3df3971cc57815b66cb50cd89ef03901d78deb7580f0c7c3a1e2b9a2d287205ac85657de83330 WHIRLPOOL 40d1cf7e2f7f630671f22b03e7815c4644287561d7de00d98e8a82c164ff97139b763b2fff1dba081de2e17d510e686ea55ddaa1367307a9bf22063b05645964
+AUX eblits.old/src_install.eblit 8242 SHA256 ea8d3afa5c76db97322a1108ba18c203be7d0b6994df146b65748045f1530f70 SHA512 1da934c4b9fc40549af5406eab7ae51c897ecd6f1c2305cdbc8a88ceaa55769adadacdec7398d2692b06c196ea15f689912a31b488c74a69d0bdccc20ca54c89 WHIRLPOOL cbf185343cbfe0e9cdf6b16d1726b112bd164bf5641847a123edc76039af3934d9659395ec2c333835bb4d83bf1afe507cfbecbd69c51de12fd1b8c9ca070956
+AUX eblits.old/src_test.eblit 1278 SHA256 4cc565c9688292f1a195b4d9a5ba2d1b90ccc505e62229fc21d9fdf67d9655d5 SHA512 b058884a9ec43f047f10b6d61338366388dfb58c920e3f55baa85a9795750af7b8eafba427bb8ec59b1269853a4e4135b86a951f6513f64304461364b6f36a6f WHIRLPOOL 50b798092b0a9734767a8f9b7d3e1dc087d76e60f1dc83d6d5dde8aba48b992fb1b6eb6f07a9259b6fc4dac9bb391ab8972fd705be91ca15033d4d4144044e93
+AUX eblits.old/src_unpack.eblit 5166 SHA256 69712fe1caba29da644aa73d251d8574baf8b4cb240cefdb66947c88c7f6a59f SHA512 91a323ed15cdd31182d5fa01ef3bc2ba2ca4d35b3bdaaa00628ad7b8f6c9d93e9f3189332511cb689c3ed246054c461313853986148567dd71ebd3790e0e69ba WHIRLPOOL 10f9b5bda4e468b6ac111eecd7193fd8dcea3d9f4a3ba5339bcb53baba926075ab7f62f58ee979968de9246925217b621ccaa53ed7edf399a6174c869087b061
+AUX eblits/common.eblit 12329 SHA256 dfa8671295a7aaaec16ce5a30132fbe1612b063eeedbebbe6cd1fa2a2bbfd24e SHA512 fb5042a8ea4a2816359df4513c215a80a989304ed94fed177ab35697b429ea4b1e7ecb6def92307932ddfa8337f766f0b634ea985382ecf02f124ba87a78dfb3 WHIRLPOOL 8e7ab80f3918ab8c6a94f3fc85cfd72ba9fdbb5baa9f9c331d75baf63fe421a0be5cdeb6d3c90dd700ed2fd17c039e0ed33628226cdc132f7a61743430580b92
AUX eblits/pkg_postinst.eblit 1085 SHA256 71b7a853cd825ed7044e69c8a76b6ee3e00d46614015960d411941c4d12f5d20 SHA512 fc39960f370f0a4d5ef4d794f6de14594a53730ec0b3a49956cfddced17196f485337b9cb29759f232ccd33b4e9af7affe92aac93752397aa2e29ff0c1e36809 WHIRLPOOL 22936beba3ab465ef32717c1659dffa6ef7094d59d0c8ce2455563d56ce371598deac783f365abe2c55a527e7bdb28d07733ee3ea0858e2df86c65d66d729031
-AUX eblits/pkg_preinst.eblit 2289 SHA256 b99f883d8c8ac31ebc81f0ea3239a1f0bddfb49bdd7ddfa97e45bbfb4b3b5ebb SHA512 ea80538692db8492b75e84b39bab88d0a51faabba70f4f5a9d610af61a488cbd3cb9c74e532544d8a541c73059af1133d4d6e68fef95012ef9c6f19fd424cecc WHIRLPOOL 0e8cb61657b7af02a41c20da1dc23a8ca24ed29795eee2a70f78d134d5f7ad29b1a99f6fb2a414bf18db6d2ad550b0db9c85ff4e1c10e8fe3e1e7942b4354365
-AUX eblits/pkg_setup.eblit 3897 SHA256 eb384c601e2a48edd1f2e3ad591847d65c88d9560ce24efa69502ad75fc7350c SHA512 7af588bfdf9ac0c7042ca96578b7c1c9f67abfbf7d653d9ec1a811addafc9a800cc89d250f44a0570f9c02e8294a28b330eb278c020de7eed4c181e44ecbe57e WHIRLPOOL 271229a58dd9498bcaab420f4d5ab2648122c81b39e6611551cbd3f693fddbc9ae44787c34b7b68644d8cab270147c716a362fbe414602d8938d0166f2b5a99b
-AUX eblits/src_compile.eblit 7157 SHA256 5ebcc1598badba5e6beed22754e5f36f6a9420efac45b488ce84e67e83ce256a SHA512 720ddbfaa13848bf53be41d92b6e6c8c4f4dbadd253733e463c3df3971cc57815b66cb50cd89ef03901d78deb7580f0c7c3a1e2b9a2d287205ac85657de83330 WHIRLPOOL 40d1cf7e2f7f630671f22b03e7815c4644287561d7de00d98e8a82c164ff97139b763b2fff1dba081de2e17d510e686ea55ddaa1367307a9bf22063b05645964
-AUX eblits/src_install.eblit 8242 SHA256 ea8d3afa5c76db97322a1108ba18c203be7d0b6994df146b65748045f1530f70 SHA512 1da934c4b9fc40549af5406eab7ae51c897ecd6f1c2305cdbc8a88ceaa55769adadacdec7398d2692b06c196ea15f689912a31b488c74a69d0bdccc20ca54c89 WHIRLPOOL cbf185343cbfe0e9cdf6b16d1726b112bd164bf5641847a123edc76039af3934d9659395ec2c333835bb4d83bf1afe507cfbecbd69c51de12fd1b8c9ca070956
-AUX eblits/src_test.eblit 1278 SHA256 4cc565c9688292f1a195b4d9a5ba2d1b90ccc505e62229fc21d9fdf67d9655d5 SHA512 b058884a9ec43f047f10b6d61338366388dfb58c920e3f55baa85a9795750af7b8eafba427bb8ec59b1269853a4e4135b86a951f6513f64304461364b6f36a6f WHIRLPOOL 50b798092b0a9734767a8f9b7d3e1dc087d76e60f1dc83d6d5dde8aba48b992fb1b6eb6f07a9259b6fc4dac9bb391ab8972fd705be91ca15033d4d4144044e93
-AUX eblits/src_unpack.eblit 5166 SHA256 69712fe1caba29da644aa73d251d8574baf8b4cb240cefdb66947c88c7f6a59f SHA512 91a323ed15cdd31182d5fa01ef3bc2ba2ca4d35b3bdaaa00628ad7b8f6c9d93e9f3189332511cb689c3ed246054c461313853986148567dd71ebd3790e0e69ba WHIRLPOOL 10f9b5bda4e468b6ac111eecd7193fd8dcea3d9f4a3ba5339bcb53baba926075ab7f62f58ee979968de9246925217b621ccaa53ed7edf399a6174c869087b061
+AUX eblits/pkg_preinst.eblit 2607 SHA256 4a6aadb05d7d9fd864011de5e42f7fcf94d03cd4e92c533d4d09c6279f74d354 SHA512 0e882b3e706d828e32d6fba78623241f9216c7070da7bc47c5eff923bbfa4815132d65f8983fb2d14a6a6f60b7bcecd7cbf4bd975f76fa3bc2fad22114368364 WHIRLPOOL bbf347d3389a82b94833dc4ae58138cffc265965f507f9c3d0e8eea42062ca04cd558ede5cff220ce8f52b0d43e90ffde9d33eda0b14021c4585293215792f86
+AUX eblits/pkg_setup.eblit 3963 SHA256 385b1315ef36265375d4a552687437a59cade4dbc937aa99a313002abea63736 SHA512 db970d0bf24182993f10713234316f7a4392859a3d8eff419a2ed7220f4e159daf1b6944888d34bc777587b2e9160a1bd911526fc28512d47aa60ebe3029d4da WHIRLPOOL 8a00c72f2d81e39de89e43f0eb973315035702357aec986032af7085bc1e5ad02ba2c6341c22f1e967219e239de3e5c714a156117141f875821e116bc78de4cc
+AUX eblits/src_compile.eblit 712 SHA256 2f7250659b1ea316dd67a0baa229b9248693b55738416e242bcacbd6efec96b2 SHA512 f812075621013eb9db7748e16997f7785e6029f691147ef63c9c5e4c0ec98ca47cad81a9aa135e69dd57296454d158191deced0cb47201343698d9495b8dd34e WHIRLPOOL 0692b14ac23a7f995e68c15fc91643bd72707f4072e319460a31014a91fe789794b10ac155021b48f02b9bea636305408ec56bb161664a21ec7f5ff86ccff7fe
+AUX eblits/src_configure.eblit 7271 SHA256 736610669ac20a00cd5cd42f5d669c69f744398394bdd680cd9665284bd9dbc1 SHA512 eefc27858f5d9f2d3be8ba72ae451ac445b0db053963005175517e6c0d6c23dc53c1d167369c6729e61d518bc595ad8c006670ce5e5779845917eb187db6ec83 WHIRLPOOL 2db45c1561dd30c3a45baeb0a50a92977397b59732ae1eb443643e836f29c4ec510c3a9ad664d3513871914d141769606a21e7b337f1b236a1a7759a128bf583
+AUX eblits/src_install.eblit 7995 SHA256 87d461c083c280061880a41526ae2756051889f99a60f3a9d770e437b6d14541 SHA512 d0e9f9d5cf2febadc2e10dd59104ee8cc7175e619cb771f5283504598c617433458fd4337233da6042ddef34013008a2e47e5d576e04388a1dbf3f0e6cf50efe WHIRLPOOL 3645fc7c8ee062a99337e22df3abd70decc42b715ae8c77fd7508fe83a0d43c5972a5069994da828a379becc4947d4ca9af5ca0d8e438e917cf26e71b517ce12
+AUX eblits/src_prepare.eblit 2344 SHA256 7898682539bc85f126e491bc9c9a727cc5d922680f91dd409aec50c068ca93aa SHA512 30d706f26475db2dfe8cfaaa003c3a21988328ba0cc7cdca439d248c968430308d8d0afefa60302315d4c76011e4de51925307ee19d15eba10e24f1ede2b956f WHIRLPOOL 3a5ad0de18649805d97b0d78ea33e52608e7b6694ac567313db9e09da18a0bca9b95a027fe0181b50738b5bfe83ac49254d29b077cef36fb311a9707683261b5
+AUX eblits/src_test.eblit 808 SHA256 8a652acb87e941fe767ddfbe0e0a42e3b5f208f5408606c5d9de22a85b1f8ebe SHA512 b8a37cd8294f5b6d2735d9971e7bc4bde1a7671540d6f76764d06203f5f179c143c487f57c57747c8e72e7a1d89d05928df51331a44f46d4290e9b89449eed63 WHIRLPOOL c33b33b71431f3438fbe350c8c1d3c67d17fdccef61687bc645397635875d09af8b4e2b545a4405429c2b8ee4a012fd753205e4b5ce3bb2f93e4341d34a18eb4
+AUX eblits/src_unpack.eblit 3209 SHA256 82b23ecfe2fc3b7e93545af4b67e2525e1ee3c9f2d4eac3af435cf44e8254da4 SHA512 4f9cb34be2869864c0f814141bf1b6504b4138c3c672dd1fef9c5ad448c6fabab98445551cb364035978898c9e7829168ef702b068b4dadf325cf925c70ab42f WHIRLPOOL bdcf238477e6148dcdb8371eee40cb8ee920e039848e1088923922e615529fea70089fb5f1094630269d3a876c4752f41d0433b2948f5b5283a532938c9858df
AUX nscd 1621 SHA256 6165db3a2fcb251d4f3655c0461e018ce9c92a37f7f22a8fd2b75178b5435bc8 SHA512 3e1255ab014b3806112120000c3d2189a7c1c69dcd6639d5ce55e96bec721683a22b141982f6a6c6d44b14481c33fbbaa470863bef04e9b9eab7ccad1ddd5d95 WHIRLPOOL b7152f8d888fca13a16ea403c44eadbf1da2249dae3add11f73999259061824460a5479aa7e58c012bd737b62ecc81814109832cee33638279d90d4c08bfdbdc
AUX nsswitch.conf 503 SHA256 6c38b8642d5da884327ad678d0351d57be3621562253bd9711394bad87e45e2d SHA512 c13714110f3ccc9a2270f51d0da9293ab19b9df368092d19b1a84d5051d888297bd9439a322eca1ea60d6d5e58952797d803a368a295f2db6d5e97e173907373 WHIRLPOOL 0d37755ba5928ff894c355b3fdcf7079f19c1cb7a4f3676634084da89c74d7175823a4659b8c66d8dc1395d086991857162822ddf977dbe8dff9a59bccab821e
+DIST gcc-4.7.3-r1-multilib-bootstrap.tar.bz2 8064097 SHA256 34aec5a59bb4d0ecf908c62fd418461d0f3793238296897687305fd7a1f27299 SHA512 40b93e194ad41a75d649d84d1c49070680f253a13f0617803243bc61c44fed1ca2d0a7572a97ebb79353f312b58b5f6360be916dd7435928cc53935082e15269 WHIRLPOOL bbce19e7fe5c30faa55ddd4e29070f0d1fdfca3a04e8d68e0772260fa9be89ccde63ec92badb490209008df5fee6e53dfdeec4ae51857b90ba298a79315a199f
DIST glibc-2.10.1-patches-7.tar.bz2 113612 SHA256 6c94493e08c13072c94c967f55b659e6c950ec470c9677c43cfab10e24a88370 SHA512 6f1d575273ee354e6b9fb85d1a25b660e52fc77ed50bbe0a2c25f60d4ad11ed4560b27358d1b7a5412d5f1fafac2dd83b7ce5b1420205ef2d4906e4c99b610ba WHIRLPOOL 70efe90ab258bf15cf6c0b2ec826aacf25d4cab0d0e09b8883ecfdc34bdc54072bcd3330dd622b8f12ee6a1c74928ecd022e844a351717b53397f056b376992a
DIST glibc-2.10.1.tar.bz2 16106243 SHA256 cbad3e637eab613184405a87a2bf08a41991a0e512a3ced60d120effc73de667 SHA512 3933f69884862b38999b25af60b66c3d887bb022a26bf72e69ca17f2733e37017329d085b4ebca56dfad265906748b83535ccc41df034a867d76a62025c86df2 WHIRLPOOL afffcf139b78643822e6c89f6d6748161bd8c9043e5337d7b057fcedc4ba4e07572c6548c0288bd1bac10bdb63bf69c5eee1047750511ed814c150179ec34f8c
DIST glibc-2.11.3-patches-3.tar.bz2 112513 SHA256 e3b3a256151d86fec9a2625f29ea1486a3e770a0df8e5a803f4914da50e582e7 SHA512 a6f980c91e4fa40ec466cabdc666ccdf78b017f16d2e454d6b3bdbdbe32ad4ae316b9f8f5865ea8f0aeb5081319793fa569029f5aca536f40ce82dc1df629b67 WHIRLPOOL 58b10e2aa5691ada1f504ca192329cef8ac0babb98d21bc54436c7b0218979703aa3f525611b8016a11dbf9551b3bc443e5a17c49481518709322c01fda0b5b1
@@ -54,6 +70,8 @@ DIST glibc-2.16.0-patches-11.tar.bz2 90997 SHA256 4a1abb359e6e73b36eeb21286780fc
DIST glibc-2.16.0.tar.xz 9990512 SHA256 1edc36aa2a6cb7127971fce8e02eecffe9c7956297ad3ef10dd4c09f486d5924 SHA512 be9acc11b77ab3c01d5766fe626a6a51bc3192ac98f9554fbb5c37120cfc6f636c0b7a80beddc180f13b32ad06051d24c1999fa2e64eeb724d55a9498f0f634e WHIRLPOOL 9bfd4358a4488080e12e08deca5fca59c1555853d1c1978b7d1bb3b480eb8fb125dccab38c55644248ae5e18b0167aec85f8a7850bab9e11f980aae6f171eac3
DIST glibc-2.17-patches-7.tar.bz2 79288 SHA256 8000409d072571d2d5119d4dd538e3a3ea39213407e202ea10033bf6aed516af SHA512 c6de4d7754cec6e7a9e36d56eadc6605ba6fcfac116eb50553503738873659977beb935112d361620c35e7b15e86f845a49fd13269ffbf98c72f54dffade19f7 WHIRLPOOL 259e938e8f4ca6b7296db4982748429f00135f80cd03965da589e4318134aeddb5acdfa0f8f61871e46330a0c96eb8e734a3c2f50d564882ba37f13f722b78c5
DIST glibc-2.17.tar.xz 10981956 SHA256 6914e337401e0e0ade23694e1b2c52a5f09e4eda3270c67e7c3ba93a89b5b23e SHA512 384e54037daaa344a26ce58242acc3f9a249d0765088d18a540a305745afa33ae6dec4024adae958eacd7100be9c713d117260ace8340f6d8c8396dbde4868d2 WHIRLPOOL 9b98c1c298aeff607aaa554341c300c15491b7314f127524fc5c048c67c5059daaf706e6cf206bb69213d5307e37bed87137ab46f504d8072bb778310081fc23
+DIST glibc-2.20-patches-1.tar.bz2 78477 SHA256 b3b1c4022503dc433cc4969534f27ee019ab695aed8b722e914d7fb864db5606 SHA512 56e954f11610fa4f9fffc68bdad98114bed7592f5a4f8bd81a0306ee99311db8cb4dd4469a6f2a5a60ff4a9e6d172e49971d389f1b2911df7a408571737c1ee1 WHIRLPOOL 02aeda854ca220ed3b4fe41510d918a8fc4fb9e95a3761a3884e2d2d3c0a515c82e835d7a74e41dc0a20c865de120b60ea4e561cd3f25534568981c8084dce00
+DIST glibc-2.20.tar.xz 12283992 SHA256 f84b6d42aecc288d593c397b0a3d02260a33ee686bce0c634eb9b32798f36ba5 SHA512 7a8eea8b71d3ccba766c3f304cab61055446d451ef063309476b26dc40d880562dc33b1b68fbedeedb4b55b84c26415b9202311aaa71ef8c141b6849a814d2fa WHIRLPOOL 042f74d75c62a655ae35348c9cd0bed0845ab199e37a76635eb74c04ed927b5eca77723c38d2dc46f12fca62c1004001887b43946a914b079ad22f6a9cc8daaa
DIST glibc-2.9-20081201.tar.bz2 16430489 SHA256 6f8e515775e20ed48610860d10315adda418a3649b3465f36ee5cd467364a8f6 SHA512 bdd3f5b61f741f09da21020ceef95e8e4f22574d11f8f2341f573ab2225baaf68698446ec26cbc4a63a21a8a400eaf5820fce4bd89c3e1dcf52172a62df561f4 WHIRLPOOL 37e4875e450e8a4067f657b4d71be184844cd45c0d7dbd9242e8f998aab4e15c732fc64ba148c5782078873182d4b132c911da9242b0513eea96a2338aa04722
DIST glibc-2.9-patches-8.tar.bz2 106638 SHA256 5f1f8b569ac02c2f538bebd64d137bccb442ddfcb28b3ef17b86134edd8e3f6c SHA512 f5070bf45c28bcf455f53bee85414e6efa1da3cdbc51425a1bc67fb92ff793d1416d5743a48e69080e636d80e41463c5897d437190d496c0b34f7dcf158e8d9c WHIRLPOOL f15b98a7bd6a8cbfaa9c6e1ad7204de875876bf1640c2a008532537cf65b811b42c45446dba846f6e572e9d763cb6afbe878920a51f772c7367cc7a6f615f4b7
DIST glibc-2.9-ports-20081201.tar.bz2 487663 SHA256 19bb6e89855171d7ae01aef92054dfe4524521fbc13c67bfaa3ee81944210744 SHA512 8bc400fe1f8213908c96fa8c1060a360c4ed83fdb21ba6ffb7b6dc0232216ea23217d0c165336603a8969cca89e8b3edc7d32a38516f2c27114368682d06e6b6 WHIRLPOOL 917d6b77a3d999cb7eca7c9b8bb8d6838a109c609ef8bd3aabb3afa04755c142e4dde352c5c62561a8b39581295eb48b23192b52d1d9f1916454c4cf39db702d
@@ -80,6 +98,7 @@ EBUILD glibc-2.15-r2.ebuild 7692 SHA256 1ee891da4bbb450ce16318877a9043773c34a741
EBUILD glibc-2.15-r3.ebuild 7764 SHA256 17540bbede72db02e113f556cd3c4a6873c45be1191bade644b5a78d2557c673 SHA512 b9f856356a1dad8f51a62610defce3984477e7f8265427c7e6d21c7868bb6756de4f66b16d3184fd51180155112339e33547a2348d55a2cf1059ccbdf68f0c3f WHIRLPOOL 9c36e9f55427b2cf0180db983446d572d63be309e64b42bbe3571105446f4eddaa815081faf79fe6fc639e3ddf3e3720f11e7af2e85ea19125ef561176eaeff5
EBUILD glibc-2.16.0.ebuild 7495 SHA256 d498eb21c832602c2711b4fd8607bbb36cbbbcd701405c5f84e2dbbe9ac81774 SHA512 caa429992f3510b4a530fb7d700ba8e67664d5df406ecd198bb7481009e4413cbf9a8f366b77f0e4949670f56dd5e21d7fccee13aa4d13684cfdb8ccf6054aa9 WHIRLPOOL 1f3a56785e164b4d2f8f258bc44b6a324dee3cecd8231b030ac68efdcc007c7cc906519d4f3f3585ed327bc572b8a2ded827afdeed9aaad1b81aeeca915571f7
EBUILD glibc-2.17.ebuild 7660 SHA256 2c8265a15c54486846ad9928aef4de401470b8874c501c4d8120246a8c8d7900 SHA512 31ed1869e4f8f586edf928973eed5ae7f8ca10ad1fad9edeb58e4fcf65a7b1a76e257559627e88ca37047f067fe33dae3d69a24b3da7954af93209a5ae8c5253 WHIRLPOOL f09a27c5d118d182533deb68d84c3708329cbc6d844bc78ac28036858f0e625294d21cce645808326c84b9b98d25726a79c29818a938bf023bdb1cccd43f7bf2
+EBUILD glibc-2.20.ebuild 6980 SHA256 27188d7556269073cc6d074b6d67f93aec9eb9bfb5e488b88e6140cb5e02ecc5 SHA512 ae9cd6c83087d5a9c5b37afb5dd06ab41f964e6976ba555934225b30c527d77f132cd7b376d90763d1e288f735650e54a561748e8b168860042c57b06769353f WHIRLPOOL 9ae6a441359452780ced5757ffd3a662241019c3177b623f462609bad35de0950e1bcdffa91110bc8f9dda4e33a329a8faa7551e9d6c531dc5039a48be92a539
EBUILD glibc-2.9_p20081201-r3.ebuild 6770 SHA256 87e75b306b69d170c7fd6083c7a40303ea292616a810c3e5302eb13ff72932b8 SHA512 3dc0d6f0b99a1e83caa8a152bb7752b8b504324876bed83657b683c73f8a3432150cb5d3b42aea11d064ee9d1a4d1788dab6c9da11cfc5cf716c214ec145e177 WHIRLPOOL 9fec37815cd88eab81f4452e02e13b96e13b1ad8284b1be7f77213280da54a9de85275cf665307d3920e36c3bc02f6005acd5316f6f2ed3dac5b3b60a80690b0
EBUILD glibc-9999.ebuild 6619 SHA256 523f30d0bd4fb9aef983b7e62e57239d089251d0f3907b6dfb70a00cbc0c2e6c SHA512 2d875c8434720b700bfc99836870e625b7c3010178a4a501e435832e826e7008764878d1e4f88d9f568d21f97de56589bff7984b37d3e9840f19492585cfe16f WHIRLPOOL 7da4b26e63d4f79592891ebd1cf1fb915d40049e8feeb61d9c55f7af601bfe2b7f1a03b1aed51f95be0451c90e93992920949c92ccd2401a0c129b600f5afdb9
MISC ChangeLog 59116 SHA256 c145cda049346dfd34078de4c7b7823136c0f4a25aab7bf2c479481966b74de2 SHA512 e2d51f169bde9d5c9ba4cd85857717b8d2fdc81e8f50fad9be9a9e426efd721de0523038960b1ea615b32d6d61a5bcc929d42a18d2db3732e008548ff3b3250e WHIRLPOOL 9bc612e38b91c84c3de5dbee260207321fdc0069c64851be83f294ecec0391ddf399a7ebe8d45a4ba5169b099597fed4edf9023541f95355028f37a01f79cda1
diff --git a/sys-libs/glibc/files/2.20/glibc-2.20-gentoo-chk_fail.c b/sys-libs/glibc/files/2.20/glibc-2.20-gentoo-chk_fail.c
new file mode 100644
index 0000000..a8ab9d8
--- /dev/null
+++ b/sys-libs/glibc/files/2.20/glibc-2.20-gentoo-chk_fail.c
@@ -0,0 +1,299 @@
+/* Copyright (C) 2004-2014 Free Software Foundation, Inc.
+ Copyright (C) 2006-2014 Gentoo Foundation Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* Hardened Gentoo SSP and FORTIFY handler
+
+ A failure handler that does not use functions from the rest of glibc;
+ it uses the INTERNAL_SYSCALL methods directly. This helps ensure no
+ possibility of recursion into the handler.
+
+ Direct all bug reports to http://bugs.gentoo.org/
+
+ People who have contributed significantly to the evolution of this file:
+ Ned Ludd - <solar[@]gentoo.org>
+ Alexander Gabert - <pappy[@]gentoo.org>
+ The PaX Team - <pageexec[@]freemail.hu>
+ Peter S. Mazinger - <ps.m[@]gmx.net>
+ Yoann Vandoorselaere - <yoann[@]prelude-ids.org>
+ Robert Connolly - <robert[@]linuxfromscratch.org>
+ Cory Visi <cory[@]visi.name>
+ Mike Frysinger <vapier[@]gentoo.org>
+ Magnus Granberg <zorry[@]gentoo.org>
+ Kevin F. Quinn - <kevquinn[@]gentoo.org>
+ */
+
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+
+#include <sys/types.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+
+#include <kernel-features.h>
+
+#include <alloca.h>
+/* from sysdeps */
+#include <socketcall.h>
+/* for the stuff in bits/socket.h */
+#include <sys/socket.h>
+#include <sys/un.h>
+
+/* Sanity check on SYSCALL macro names - force compilation
+ * failure if the names used here do not exist
+ */
+#if !defined __NR_socketcall && !defined __NR_socket
+# error Cannot do syscall socket or socketcall
+#endif
+#if !defined __NR_socketcall && !defined __NR_connect
+# error Cannot do syscall connect or socketcall
+#endif
+#ifndef __NR_write
+# error Cannot do syscall write
+#endif
+#ifndef __NR_close
+# error Cannot do syscall close
+#endif
+#ifndef __NR_getpid
+# error Cannot do syscall getpid
+#endif
+#ifndef __NR_kill
+# error Cannot do syscall kill
+#endif
+#ifndef __NR_exit
+# error Cannot do syscall exit
+#endif
+#ifdef SSP_SMASH_DUMPS_CORE
+# define ENABLE_SSP_SMASH_DUMPS_CORE 1
+# if !defined _KERNEL_NSIG && !defined _NSIG
+# error No _NSIG or _KERNEL_NSIG for rt_sigaction
+# endif
+# if !defined __NR_sigaction && !defined __NR_rt_sigaction
+# error Cannot do syscall sigaction or rt_sigaction
+# endif
+/* Although rt_sigaction expects sizeof(sigset_t) - it expects the size
+ * of the _kernel_ sigset_t which is not the same as the user sigset_t.
+ * Most arches have this as _NSIG bits - mips has _KERNEL_NSIG bits for
+ * some reason.
+ */
+# ifdef _KERNEL_NSIG
+# define _SSP_NSIG _KERNEL_NSIG
+# else
+# define _SSP_NSIG _NSIG
+# endif
+#else
+# define _SSP_NSIG 0
+# define ENABLE_SSP_SMASH_DUMPS_CORE 0
+#endif
+
+/* Define DO_SIGACTION - default to newer rt signal interface but
+ * fallback to old as needed.
+ */
+#ifdef __NR_rt_sigaction
+# define DO_SIGACTION(signum, act, oldact) \
+ INLINE_SYSCALL(rt_sigaction, 4, signum, act, oldact, _SSP_NSIG/8)
+#else
+# define DO_SIGACTION(signum, act, oldact) \
+ INLINE_SYSCALL(sigaction, 3, signum, act, oldact)
+#endif
+
+/* Define DO_SOCKET/DO_CONNECT functions to deal with socketcall vs socket/connect */
+#if defined(__NR_socket) && defined(__NR_connect)
+# define USE_OLD_SOCKETCALL 0
+#else
+# define USE_OLD_SOCKETCALL 1
+#endif
+
+/* stub out the __NR_'s so we can let gcc optimize away dead code */
+#ifndef __NR_socketcall
+# define __NR_socketcall 0
+#endif
+#ifndef __NR_socket
+# define __NR_socket 0
+#endif
+#ifndef __NR_connect
+# define __NR_connect 0
+#endif
+#define DO_SOCKET(result, domain, type, protocol) \
+ do { \
+ if (USE_OLD_SOCKETCALL) { \
+ socketargs[0] = domain; \
+ socketargs[1] = type; \
+ socketargs[2] = protocol; \
+ socketargs[3] = 0; \
+ result = INLINE_SYSCALL(socketcall, 2, SOCKOP_socket, socketargs); \
+ } else \
+ result = INLINE_SYSCALL(socket, 3, domain, type, protocol); \
+ } while (0)
+#define DO_CONNECT(result, sockfd, serv_addr, addrlen) \
+ do { \
+ if (USE_OLD_SOCKETCALL) { \
+ socketargs[0] = sockfd; \
+ socketargs[1] = (unsigned long int)serv_addr; \
+ socketargs[2] = addrlen; \
+ socketargs[3] = 0; \
+ result = INLINE_SYSCALL(socketcall, 2, SOCKOP_connect, socketargs); \
+ } else \
+ result = INLINE_SYSCALL(connect, 3, sockfd, serv_addr, addrlen); \
+ } while (0)
+
+#ifndef _PATH_LOG
+# define _PATH_LOG "/dev/log"
+#endif
+
+static const char path_log[] = _PATH_LOG;
+
+/* For building glibc with SSP switched on, define __progname to a
+ * constant if building for the run-time loader, to avoid pulling
+ * in more of libc.so into ld.so
+ */
+#ifdef IS_IN_rtld
+static const char *__progname = "<ldso>";
+#else
+extern const char *__progname;
+#endif
+
+#ifdef GENTOO_SSP_HANDLER
+# define ERROR_MSG "stack smashing"
+#else
+# define ERROR_MSG "buffer overflow"
+#endif
+
+/* Common handler code, used by chk_fail
+ * Inlined to ensure no self-references to the handler within itself.
+ * Data static to avoid putting more than necessary on the stack,
+ * to aid core debugging.
+ */
+__attribute__ ((__noreturn__, __always_inline__))
+static inline void
+__hardened_gentoo_fail(void)
+{
+#define MESSAGE_BUFSIZ 512
+ static pid_t pid;
+ static int plen, i, hlen;
+ static char message[MESSAGE_BUFSIZ];
+ /* <11> is LOG_USER|LOG_ERR. A dummy date for loggers to skip over. */
+ static const char msg_header[] = "<11>" __DATE__ " " __TIME__ " glibc-gentoo-hardened-check: ";
+ static const char msg_ssd[] = "*** " ERROR_MSG " detected ***: ";
+ static const char msg_terminated[] = " terminated; ";
+ static const char msg_report[] = "report to " REPORT_BUGS_TO "\n";
+ static const char msg_unknown[] = "<unknown>";
+ static int log_socket, connect_result;
+ static struct sockaddr_un sock;
+ static unsigned long int socketargs[4];
+
+ /* Build socket address */
+ sock.sun_family = AF_UNIX;
+ i = 0;
+ while (path_log[i] != '\0' && i < sizeof(sock.sun_path) - 1) {
+ sock.sun_path[i] = path_log[i];
+ ++i;
+ }
+ sock.sun_path[i] = '\0';
+
+ /* Try SOCK_DGRAM connection to syslog */
+ connect_result = -1;
+ DO_SOCKET(log_socket, AF_UNIX, SOCK_DGRAM, 0);
+ if (log_socket != -1)
+ DO_CONNECT(connect_result, log_socket, &sock, sizeof(sock));
+ if (connect_result == -1) {
+ if (log_socket != -1)
+ INLINE_SYSCALL(close, 1, log_socket);
+ /* Try SOCK_STREAM connection to syslog */
+ DO_SOCKET(log_socket, AF_UNIX, SOCK_STREAM, 0);
+ if (log_socket != -1)
+ DO_CONNECT(connect_result, log_socket, &sock, sizeof(sock));
+ }
+
+ /* Build message. Messages are generated both in the old style and new style,
+ * so that log watchers that are configured for the old-style message continue
+ * to work.
+ */
+#define strconcat(str) \
+ ({ \
+ i = 0; \
+ while ((str[i] != '\0') && ((i + plen) < (MESSAGE_BUFSIZ - 1))) { \
+ message[plen + i] = str[i]; \
+ ++i; \
+ } \
+ plen += i; \
+ })
+
+ /* Tersely log the failure */
+ plen = 0;
+ strconcat(msg_header);
+ hlen = plen;
+ strconcat(msg_ssd);
+ if (__progname != NULL)
+ strconcat(__progname);
+ else
+ strconcat(msg_unknown);
+ strconcat(msg_terminated);
+ strconcat(msg_report);
+
+ /* Write out error message to STDERR, to syslog if open */
+ INLINE_SYSCALL(write, 3, STDERR_FILENO, message + hlen, plen - hlen);
+ if (connect_result != -1) {
+ INLINE_SYSCALL(write, 3, log_socket, message, plen);
+ INLINE_SYSCALL(close, 1, log_socket);
+ }
+
+ /* Time to kill self since we have no idea what is going on */
+ pid = INLINE_SYSCALL(getpid, 0);
+
+ if (ENABLE_SSP_SMASH_DUMPS_CORE) {
+ /* Remove any user-supplied handler for SIGABRT, before using it. */
+#if 0
+ /*
+ * Note: Disabled because some programs catch & process their
+ * own crashes. We've already enabled this code path which
+ * means we want to let core dumps happen.
+ */
+ static struct sigaction default_abort_act;
+ default_abort_act.sa_handler = SIG_DFL;
+ default_abort_act.sa_sigaction = NULL;
+ __sigfillset(&default_abort_act.sa_mask);
+ default_abort_act.sa_flags = 0;
+ if (DO_SIGACTION(SIGABRT, &default_abort_act, NULL) == 0)
+#endif
+ INLINE_SYSCALL(kill, 2, pid, SIGABRT);
+ }
+
+ /* SIGKILL is only signal which cannot be caught */
+ INLINE_SYSCALL(kill, 2, pid, SIGKILL);
+
+ /* In case the kill didn't work, exit anyway.
+ * The loop prevents gcc thinking this routine returns.
+ */
+ while (1)
+ INLINE_SYSCALL(exit, 1, 137);
+}
+
+__attribute__ ((__noreturn__))
+#ifdef GENTOO_SSP_HANDLER
+void __stack_chk_fail(void)
+#else
+void __chk_fail(void)
+#endif
+{
+ __hardened_gentoo_fail();
+}
diff --git a/sys-libs/glibc/files/2.20/glibc-2.20-gentoo-stack_chk_fail.c b/sys-libs/glibc/files/2.20/glibc-2.20-gentoo-stack_chk_fail.c
new file mode 100644
index 0000000..4a537bb
--- /dev/null
+++ b/sys-libs/glibc/files/2.20/glibc-2.20-gentoo-stack_chk_fail.c
@@ -0,0 +1,2 @@
+#define GENTOO_SSP_HANDLER
+#include <debug/chk_fail.c>
diff --git a/sys-libs/glibc/files/2.20/glibc-2.20-hardened-inittls-nosysenter.patch b/sys-libs/glibc/files/2.20/glibc-2.20-hardened-inittls-nosysenter.patch
new file mode 100644
index 0000000..35eabe9
--- /dev/null
+++ b/sys-libs/glibc/files/2.20/glibc-2.20-hardened-inittls-nosysenter.patch
@@ -0,0 +1,306 @@
+When building glibc PIE (which is not something upstream support),
+several modifications are necessary to the glibc build process.
+
+First, any syscalls in PIEs must be of the PIC variant, otherwise
+textrels ensue. Then, any syscalls made before the initialisation
+of the TLS will fail on i386, as the sysenter variant on i386 uses
+the TLS, giving rise to a chicken-and-egg situation. This patch
+defines a PIC syscall variant that doesn't use sysenter, even when the sysenter
+version is normally used, and uses the non-sysenter version for the brk
+syscall that is performed by the TLS initialisation. Further, the TLS
+initialisation is moved in this case prior to the initialisation of
+dl_osversion, as that requires further syscalls.
+
+csu/libc-start.c: Move initial TLS initialization to before the
+initialisation of dl_osversion, when INTERNAL_SYSCALL_PRE_TLS is defined
+
+csu/libc-tls.c: Use the no-sysenter version of sbrk when
+INTERNAL_SYSCALL_PRE_TLS is defined.
+
+misc/sbrk.c: Define a no-sysenter version of sbrk, using the no-sysenter
+version of brk - if INTERNAL_SYSCALL_PRE_TLS is defined.
+
+misc/brk.c: Define a no-sysenter version of brk if
+INTERNAL_SYSCALL_PRE_TLS is defined.
+
+sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_PRE_TLS
+Make INTERNAL_SYSCALL always use the PIC variant, even if not SHARED.
+
+Patch by Kevin F. Quinn <kevquinn@gentoo.org>
+Fixed for 2.10 by Magnus Granberg <zorry@ume.nu>
+Fixed for 2.18 by Magnus Granberg <zorry@gentoo.org>
+Fixed for 2.20 by Francisco Blas Izquierdo Riera <klondike@gentoo.org>
+
+--- a/csu/libc-start.c
++++ b/csu/libc-start.c
+@@ -28,6 +28,7 @@
+ extern int __libc_multiple_libcs;
+
+ #include <tls.h>
++#include <sysdep.h>
+ #ifndef SHARED
+ # include <dl-osinfo.h>
+ extern void __pthread_initialize_minimal (void);
+@@ -170,6 +171,11 @@ LIBC_START_MAIN (int (*main) (int, char
+ }
+ }
+
++# ifdef INTERNAL_SYSCALL_PRE_TLS
++ /* Do the initial TLS initialization before _dl_osversion,
++ since the latter uses the uname syscall. */
++ __pthread_initialize_minimal ();
++# endif
+ # ifdef DL_SYSDEP_OSCHECK
+ if (!__libc_multiple_libcs)
+ {
+@@ -138,10 +144,12 @@
+ }
+ # endif
+
++# ifndef INTERNAL_SYSCALL_PRE_TLS
+ /* Initialize the thread library at least a bit since the libgcc
+ functions are using thread functions if these are available and
+ we need to setup errno. */
+ __pthread_initialize_minimal ();
++# endif
+
+ /* Set up the stack checker's canary. */
+ uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard ();
+--- a/csu/libc-tls.c
++++ b/csu/libc-tls.c
+@@ -22,12 +22,17 @@
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <sys/param.h>
++#include <sysdep.h>
+
+
+ #ifdef SHARED
+ #error makefile bug, this file is for static only
+ #endif
+
++#ifdef INTERNAL_SYSCALL_PRE_TLS
++extern void *__sbrk_nosysenter (intptr_t __delta);
++#endif
++
+ dtv_t _dl_static_dtv[2 + TLS_SLOTINFO_SURPLUS];
+
+
+@@ -139,20 +144,29 @@ __libc_setup_tls (size_t tcbsize, size_t
+
+ The initialized value of _dl_tls_static_size is provided by dl-open.c
+ to request some surplus that permits dynamic loading of modules with
+- IE-model TLS. */
++ IE-model TLS.
++
++ Where the normal sbrk would use a syscall that needs the TLS (i386)
++ use the special non-sysenter version instead. */
++#ifdef INTERNAL_SYSCALL_PRE_TLS
++# define __sbrk __sbrk_nosysenter
++#endif
+ #if TLS_TCB_AT_TP
+ tcb_offset = roundup (memsz + GL(dl_tls_static_size), tcbalign);
+ tlsblock = __sbrk (tcb_offset + tcbsize + max_align);
+ #elif TLS_DTV_AT_TP
+ tcb_offset = roundup (tcbsize, align ?: 1);
+ tlsblock = __sbrk (tcb_offset + memsz + max_align
+ + TLS_PRE_TCB_SIZE + GL(dl_tls_static_size));
+ tlsblock += TLS_PRE_TCB_SIZE;
+ #else
+ /* In case a model with a different layout for the TCB and DTV
+ is defined add another #elif here and in the following #ifs. */
+ # error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
+ #endif
++#ifdef INTERNAL_SYSCALL_PRE_TLS
++# undef __sbrk
++#endif
+
+ /* Align the TLS block. */
+ tlsblock = (void *) (((uintptr_t) tlsblock + max_align - 1)
+--- a/misc/sbrk.c
++++ b/misc/sbrk.c
+@@ -18,6 +18,7 @@
+ #include <errno.h>
+ #include <stdint.h>
+ #include <unistd.h>
++#include <sysdep.h>
+
+ /* Defined in brk.c. */
+ extern void *__curbrk;
+@@ -29,6 +30,35 @@
+ /* Extend the process's data space by INCREMENT.
+ If INCREMENT is negative, shrink data space by - INCREMENT.
+ Return start of new space allocated, or -1 for errors. */
++#ifdef INTERNAL_SYSCALL_PRE_TLS
++/* This version is used by csu/libc-tls.c whem initialising the TLS
++ if the SYSENTER version requires the TLS (which it does on i386).
++ Obviously using the TLS before it is initialised is broken. */
++extern int __brk_nosysenter (void *addr);
++void *
++__sbrk_nosysenter (intptr_t increment)
++{
++ void *oldbrk;
++
++ /* If this is not part of the dynamic library or the library is used via
++ dynamic loading in a statically linked program update __curbrk from the
++ kernel's brk value. That way two separate instances of __brk and __sbrk
++ can share the heap, returning interleaved pieces of it. */
++ if (__curbrk == NULL || __libc_multiple_libcs)
++ if (__brk_nosysenter (0) < 0) /* Initialize the break. */
++ return (void *) -1;
++
++ if (increment == 0)
++ return __curbrk;
++
++ oldbrk = __curbrk;
++ if (__brk_nosysenter (oldbrk + increment) < 0)
++ return (void *) -1;
++
++ return oldbrk;
++}
++#endif
++
+ void *
+ __sbrk (intptr_t increment)
+ {
+--- a/sysdeps/unix/sysv/linux/i386/brk.c
++++ b/sysdeps/unix/sysv/linux/i386/brk.c
+@@ -31,6 +31,30 @@
+ linker. */
+ weak_alias (__curbrk, ___brk_addr)
+
++#ifdef INTERNAL_SYSCALL_PRE_TLS
++/* This version is used by csu/libc-tls.c whem initialising the TLS
++ if the SYSENTER version requires the TLS (which it does on i386).
++ Obviously using the TLS before it is initialised is broken. */
++int
++__brk_nosysenter (void *addr)
++{
++ void *newbrk;
++
++ INTERNAL_SYSCALL_DECL (err);
++ newbrk = (void *) INTERNAL_SYSCALL_PRE_TLS (brk, err, 1, addr);
++
++ __curbrk = newbrk;
++
++ if (newbrk < addr)
++ {
++ __set_errno (ENOMEM);
++ return -1;
++ }
++
++ return 0;
++}
++#endif
++
+ int
+ __brk (void *addr)
+ {
+--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
++++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
+@@ -187,7 +187,7 @@
+ /* The original calling convention for system calls on Linux/i386 is
+ to use int $0x80. */
+ #ifdef I386_USE_SYSENTER
+-# ifdef SHARED
++# ifdef __PIC__
+ # define ENTER_KERNEL call *%gs:SYSINFO_OFFSET
+ # else
+ # define ENTER_KERNEL call *_dl_sysinfo
+@@ -358,7 +358,7 @@
+ possible to use more than four parameters. */
+ #undef INTERNAL_SYSCALL
+ #ifdef I386_USE_SYSENTER
+-# ifdef SHARED
++# ifdef __PIC__
+ # define INTERNAL_SYSCALL(name, err, nr, args...) \
+ ({ \
+ register unsigned int resultvar; \
+@@ -384,6 +384,18 @@
+ : "0" (name), "i" (offsetof (tcbhead_t, sysinfo)) \
+ ASMFMT_##nr(args) : "memory", "cc"); \
+ (int) resultvar; })
++# define INTERNAL_SYSCALL_PRE_TLS(name, err, nr, args...) \
++ ({ \
++ register unsigned int resultvar; \
++ EXTRAVAR_##nr \
++ asm volatile ( \
++ LOADARGS_NOSYSENTER_##nr \
++ "movl %1, %%eax\n\t" \
++ "int $0x80\n\t" \
++ RESTOREARGS_NOSYSENTER_##nr \
++ : "=a" (resultvar) \
++ : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \
++ (int) resultvar; })
+ # else
+ # define INTERNAL_SYSCALL(name, err, nr, args...) \
+ ({ \
+@@ -447,12 +459,20 @@
+
+ #define LOADARGS_0
+ #ifdef __PIC__
+-# if defined I386_USE_SYSENTER && defined SHARED
++# if defined I386_USE_SYSENTER && defined __PIC__
+ # define LOADARGS_1 \
+ "bpushl .L__X'%k3, %k3\n\t"
+ # define LOADARGS_5 \
+ "movl %%ebx, %4\n\t" \
+ "movl %3, %%ebx\n\t"
++# define LOADARGS_NOSYSENTER_1 \
++ "bpushl .L__X'%k2, %k2\n\t"
++# define LOADARGS_NOSYSENTER_2 LOADARGS_NOSYSENTER_1
++# define LOADARGS_NOSYSENTER_3 LOADARGS_3
++# define LOADARGS_NOSYSENTER_4 LOADARGS_3
++# define LOADARGS_NOSYSENTER_5 \
++ "movl %%ebx, %3\n\t" \
++ "movl %2, %%ebx\n\t"
+ # else
+ # define LOADARGS_1 \
+ "bpushl .L__X'%k2, %k2\n\t"
+@@ -474,11 +494,18 @@
+
+ #define RESTOREARGS_0
+ #ifdef __PIC__
+-# if defined I386_USE_SYSENTER && defined SHARED
++# if defined I386_USE_SYSENTER && defined __PIC__
+ # define RESTOREARGS_1 \
+ "bpopl .L__X'%k3, %k3\n\t"
+ # define RESTOREARGS_5 \
+ "movl %4, %%ebx"
++# define RESTOREARGS_NOSYSENTER_1 \
++ "bpopl .L__X'%k2, %k2\n\t"
++# define RESTOREARGS_NOSYSENTER_2 RESTOREARGS_NOSYSENTER_1
++# define RESTOREARGS_NOSYSENTER_3 RESTOREARGS_3
++# define RESTOREARGS_NOSYSENTER_4 RESTOREARGS_3
++# define RESTOREARGS_NOSYSENTER_5 \
++ "movl %3, %%ebx"
+ # else
+ # define RESTOREARGS_1 \
+ "bpopl .L__X'%k2, %k2\n\t"
+--- a/sysdeps/i386/nptl/tls.h
++++ b/sysdeps/i386/nptl/tls.h
+@@ -189,6 +189,15 @@
+ desc->vals[3] = 0x51;
+ }
+
++/* We have no sysenter until the tls is initialized which is a
++ problem for PIC. Thus we need to do the right call depending
++ on the situation. */
++#ifndef INTERNAL_SYSCALL_PRE_TLS
++# define TLS_INIT_SYSCALL INTERNAL_SYSCALL
++#else
++# define TLS_INIT_SYSCALL INTERNAL_SYSCALL_PRE_TLS
++#endif
++
+ /* Code to initially initialize the thread pointer. This might need
+ special attention since 'errno' is not yet available and if the
+ operation can cause a failure 'errno' must not be touched. */
+@@ -209,7 +218,7 @@
+ \
+ /* Install the TLS. */ \
+ INTERNAL_SYSCALL_DECL (err); \
+- _result = INTERNAL_SYSCALL (set_thread_area, err, 1, &_segdescr.desc); \
++ _result = TLS_INIT_SYSCALL (set_thread_area, err, 1, &_segdescr.desc); \
+ \
+ if (_result == 0) \
+ /* We know the index in the GDT, now load the segment register. \
diff --git a/sys-libs/glibc/files/2.20/glibc-2.20-shadow-prefix.patch b/sys-libs/glibc/files/2.20/glibc-2.20-shadow-prefix.patch
new file mode 100644
index 0000000..e85848f
--- /dev/null
+++ b/sys-libs/glibc/files/2.20/glibc-2.20-shadow-prefix.patch
@@ -0,0 +1,24 @@
+Index: shadow/Makefile
+===================================================================
+--- shadow/Makefile.orig
++++ shadow/Makefile
+@@ -36,5 +36,6 @@ CFLAGS-fgetspent_r.c = -fexceptions $(li
+ CFLAGS-putspent.c = -fexceptions $(libio-mtsafe)
+ CFLAGS-getspnam.c = -fexceptions
+ CFLAGS-getspnam_r.c = -fexceptions
++CPPFLAGS-lckpwdf.c = -DSYSCONFDIR='"$(sysconfdir)"'
+
+ include ../Rules
+Index: shadow/lckpwdf.c
+===================================================================
+--- shadow/lckpwdf.c.orig
++++ shadow/lckpwdf.c
+@@ -29,7 +29,7 @@
+
+
+ /* Name of the lock file. */
+-#define PWD_LOCKFILE "/etc/.pwd.lock"
++#define PWD_LOCKFILE SYSCONFDIR "/.pwd.lock"
+
+ /* How long to wait for getting the lock before returning with an
+ error. */
diff --git a/sys-libs/glibc/files/2.20/glibc-2.20-vdso-disable.patch b/sys-libs/glibc/files/2.20/glibc-2.20-vdso-disable.patch
new file mode 100644
index 0000000..2b2de6b
--- /dev/null
+++ b/sys-libs/glibc/files/2.20/glibc-2.20-vdso-disable.patch
@@ -0,0 +1,20 @@
+disable vdso loading in ELF handler unconditionally for some buggy kernel
+like that shipped with RHEL(likely CentOS and SL) 5.6
+
+ https://bugzilla.redhat.com/show_bug.cgi?id=673616
+
+Benda Xu <heroxbd@gentoo.org> (24 Nov, 2014)
+
+Index: work/glibc-2.20/sysdeps/unix/sysv/linux/dl-sysdep.h
+===================================================================
+--- work.orig/glibc-2.20/sysdeps/unix/sysv/linux/dl-sysdep.h
++++ work/glibc-2.20/sysdeps/unix/sysv/linux/dl-sysdep.h
+@@ -23,7 +23,7 @@
+ machines, we should look at it for unwind information even if
+ we aren't making direct use of it. So enable this across the board. */
+
+-#define NEED_DL_SYSINFO_DSO 1
++#define NEED_DL_SYSINFO_DSO 0
+
+
+ #ifndef __ASSEMBLER__
diff --git a/sys-libs/glibc/files/eblits/common.eblit b/sys-libs/glibc/files/eblits/common.eblit
index 2f7471e..6dd5d29 100644
--- a/sys-libs/glibc/files/eblits/common.eblit
+++ b/sys-libs/glibc/files/eblits/common.eblit
@@ -2,8 +2,35 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.45 2014/10/18 23:09:51 vapier Exp $
+# There are many directory offsets here that can lead to confusion. We summarize the senarios in this table
+# P:=Prefix X:=Cross-Triplet
+# example of configure host: --with-headers
+# example of configure target: --libdir
+#
+# variation phase PX X P solution
+# -----------+-------------------+-----------------------+---------------+---------+----------------------------------------
+# host configure EPREFIX/usr/CTARGET/TPREFIX /usr/CTARGET TPREFIX $(alt_prefix)
+# target configure TPREFIX NULL TPREFIX $TPREFIX
+# -----------+-------------------+-----------------------+---------------+---------+----------------------------------------
+# host install_root D/EPREFIX/usr/CTARGET D/usr/CTARGET D ${D}/$(alt_prefix no-tp)
+# -----------+-------------------+-----------------------+---------------+---------+----------------------------------------
+# host ebuild helper ED/ /usr/CTARGET/TPREFIX /usr/CTARGET NULL $(alt_prefix no-ep)
+# host file D/EPREFIX/usr/CTARGET/TPREFIX D/usr/CTARGET D/TPREFIX $(alt_prefix)
+#
+# alt_prefix and TPREFIX in the table are defined as followed
+
+: ${TPREFIX:=${EPREFIX}}
+
alt_prefix() {
- is_crosscompile && echo /usr/${CTARGET}
+ # EPREFIX needs to be stripped before passing to portage helpers
+ local prefix tprefix
+ if is_crosscompile; then
+ prefix=$([[ $1 == no-ep ]] || echo ${EPREFIX})/usr/${CTARGET}
+ [[ $1 == no-tp ]] || tprefix=${TPREFIX}
+ else
+ [[ $1 == no-tp ]] || [[ $1 == no-ep ]] || tprefix=${TPREFIX}
+ fi
+ echo ${prefix}${tprefix}
}
if [[ ${EAPI:-0} == [012] ]] ; then
@@ -23,7 +50,7 @@ fi
# the whole system.
# note: intentionally undocumented.
alt_headers() {
- echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
+ echo ${ALT_HEADERS:=$(alt_prefix $@)/usr/include}
}
alt_build_headers() {
if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
@@ -40,10 +67,10 @@ alt_build_headers() {
}
alt_libdir() {
- echo $(alt_prefix)/$(get_libdir)
+ echo $(alt_prefix $@)/$(get_libdir)
}
alt_usrlibdir() {
- echo $(alt_prefix)/usr/$(get_libdir)
+ echo $(alt_prefix $@)/usr/$(get_libdir)
}
builddir() {
@@ -281,8 +308,8 @@ setup_env() {
unset LD_RUN_PATH
unset LD_ASSUME_KERNEL
- multilib_env ${CTARGET_OPT:-${CTARGET}}
if is_crosscompile || tc-is-cross-compiler ; then
+ multilib_env ${CTARGET_OPT:-${CTARGET}}
if ! use multilib ; then
MULTILIB_ABIS=${DEFAULT_ABI}
else
diff --git a/sys-libs/glibc/files/eblits/pkg_postinst.eblit b/sys-libs/glibc/files/eblits/pkg_postinst.eblit
index 9e5447d..10bed71 100644
--- a/sys-libs/glibc/files/eblits/pkg_postinst.eblit
+++ b/sys-libs/glibc/files/eblits/pkg_postinst.eblit
@@ -6,9 +6,9 @@ eblit-glibc-pkg_postinst() {
# nothing to do if just installing headers
just_headers && return
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
+ if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
# Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
fi
if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
@@ -17,10 +17,10 @@ eblit-glibc-pkg_postinst() {
/sbin/telinit U 2>/dev/null
# if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}etc/locale.gen"
+ local locale_list="${EROOT}etc/locale.gen"
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
- locale_list="${ROOT}usr/share/i18n/SUPPORTED"
+ locale_list="${EROOT}usr/share/i18n/SUPPORTED"
fi
locale-gen -j $(makeopts_jobs) --config "${locale_list}"
fi
diff --git a/sys-libs/glibc/files/eblits/pkg_preinst.eblit b/sys-libs/glibc/files/eblits/pkg_preinst.eblit
index 0fcb24a..f932b37 100644
--- a/sys-libs/glibc/files/eblits/pkg_preinst.eblit
+++ b/sys-libs/glibc/files/eblits/pkg_preinst.eblit
@@ -18,7 +18,7 @@ glibc_sanity_check() {
# 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
+ pushd "${D}"/$(get_libdir) >/dev/null
local x striptest
for x in cal date env free ls true uname uptime ; do
diff --git a/sys-libs/glibc/files/eblits/src_configure.eblit b/sys-libs/glibc/files/eblits/src_configure.eblit
index e0fc185..4c1e305 100644
--- a/sys-libs/glibc/files/eblits/src_configure.eblit
+++ b/sys-libs/glibc/files/eblits/src_configure.eblit
@@ -106,12 +106,12 @@ glibc_do_configure() {
--host=${CTARGET_OPT:-${CTARGET}}
$(use_enable profile)
$(use_with gd)
- --with-headers=$(alt_build_headers)
- --prefix=/usr
- --libdir=/usr/$(get_libdir)
- --mandir=/usr/share/man
- --infodir=/usr/share/info
- --libexecdir=/usr/$(get_libdir)/misc/glibc
+ --with-headers="$(alt_build_headers)"
+ --prefix="${TPREFIX}"/usr
+ --libdir="${TPREFIX}"/usr/$(get_libdir)
+ --mandir="${TPREFIX}"/usr/share/man
+ --infodir="${TPREFIX}"/usr/share/info
+ --libexecdir="${TPREFIX}"/usr/$(get_libdir)/misc/glibc
--with-bugurl=http://bugs.gentoo.org/
--with-pkgversion="$(glibc_banner)"
$(use_multiarch || echo --disable-multi-arch)
@@ -123,7 +123,7 @@ glibc_do_configure() {
# 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_slibdir=/$(get_libdir)
+ export libc_cv_slibdir=${TPREFIX}/$(get_libdir)
# We take care of patching our binutils to use both hash styles,
# and many people like to force gnu hash style only, so disable
@@ -219,8 +219,8 @@ toolchain-glibc_headers_configure() {
--enable-bind-now
--build=${CBUILD_OPT:-${CBUILD}}
--host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(alt_build_headers)
- --prefix=/usr
+ --with-headers="$(alt_build_headers)"
+ --prefix="${TPREFIX}"/usr
${EXTRA_ECONF}
)
diff --git a/sys-libs/glibc/files/eblits/src_install.eblit b/sys-libs/glibc/files/eblits/src_install.eblit
index 8030d93..8df531d 100644
--- a/sys-libs/glibc/files/eblits/src_install.eblit
+++ b/sys-libs/glibc/files/eblits/src_install.eblit
@@ -6,12 +6,12 @@ toolchain-glibc_src_install() {
local builddir=$(builddir $(want_linuxthreads && echo linuxthreads || echo nptl))
cd "${builddir}"
- emake install_root="${D}$(alt_prefix)" install || die
+ emake install_root="${D}$(alt_prefix no-tp)" install || die
if want_linuxthreads && want_nptl ; then
einfo "Installing NPTL to $(alt_libdir)/tls/..."
cd "$(builddir nptl)"
- dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl
+ dodir $(alt_libdir no-ep)/tls $(alt_usrlibdir no-ep)/nptl
local l src_lib
for l in libc libm librt libpthread libthread_db ; do
@@ -22,33 +22,33 @@ toolchain-glibc_src_install() {
else
src_lib=$(eval echo */${l})
fi
- cp -a ${src_lib} "${ED}"$(alt_libdir)/tls/${l} || die "copying nptl ${l}"
- fperms a+rx $(alt_libdir)/tls/${l}
- dosym ${l} $(alt_libdir)/tls/$(scanelf -qSF'%S#F' ${src_lib})
+ cp -a ${src_lib} "${D}"$(alt_libdir)/tls/${l} || die "copying nptl ${l}"
+ fperms a+rx $(alt_libdir no-ep)/tls/${l}
+ dosym ${l} $(alt_libdir no-ep)/tls/$(scanelf -qSF'%S#F' ${src_lib})
# then grab the linker script or the symlink ...
- if [[ -L ${ED}$(alt_usrlibdir)/${l} ]] ; then
- dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l}
+ if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then
+ dosym $(alt_libdir no-ep)/tls/${l} $(alt_usrlibdir no-ep)/nptl/${l}
else
sed \
-e "s:/${l}:/tls/${l}:g" \
-e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \
- "${ED}"$(alt_usrlibdir)/${l} > "${ED}"$(alt_usrlibdir)/nptl/${l}
+ "${D}"$(alt_usrlibdir)/${l} > "${D}"$(alt_usrlibdir)/nptl/${l}
fi
# then grab the static lib ...
src_lib=${src_lib/%.so/.a}
[[ ! -e ${src_lib} ]] && src_lib=${src_lib/%.a/_pic.a}
- cp -a ${src_lib} "${ED}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}"
+ cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}"
src_lib=${src_lib/%.a/_nonshared.a}
if [[ -e ${src_lib} ]] ; then
- cp -a ${src_lib} "${ED}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}"
+ cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}"
fi
done
# use the nptl linker instead of the linuxthreads one as the linuxthreads
# one may lack TLS support and that can be really bad for business
- cp -a elf/ld.so "${ED}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp"
+ cp -a elf/ld.so "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp"
fi
# We'll take care of the cache ourselves
@@ -94,14 +94,14 @@ toolchain-glibc_src_install() {
)
;;
esac
- if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
- dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${D}/$(alt_prefix)/lib ]] ; then
+ dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix no-tp)/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]}"
+ ldso_name="$(alt_prefix no-ep)${ldso_abi_list[i+1]}"
if [[ ! -L ${D}/${ldso_name} && ! -e ${D}/${ldso_name} ]] ; then
dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
fi
@@ -124,12 +124,12 @@ toolchain-glibc_src_install() {
# gcc likes to use relative paths to get to its multilibs like
# /usr/lib/../lib64/. So while we don't install any files into
# /usr/lib/, we do need it to exist.
- cd "${ED}"$(alt_libdir)/..
+ cd "${D}"$(alt_libdir)/..
[[ -e lib ]] || mkdir lib
- cd "${ED}"$(alt_usrlibdir)/..
+ cd "${D}"$(alt_usrlibdir)/..
[[ -e lib ]] || mkdir lib
- dosym usr/include $(alt_prefix)/sys-include
+ dosym usr/include $(alt_prefix no-ep)/sys-include
return 0
fi
@@ -202,12 +202,12 @@ toolchain-glibc_src_install() {
toolchain-glibc_headers_install() {
local builddir=$(builddir "headers")
cd "${builddir}"
- emake install_root="${D}$(alt_prefix)" install-headers || die
+ emake install_root="${D}$(alt_prefix no-tp)" install-headers || die
if ! version_is_at_least 2.16 ; then
- insinto $(alt_headers)/bits
+ insinto $(alt_headers no-ep)/bits
doins bits/stdio_lim.h || die
fi
- insinto $(alt_headers)/gnu
+ insinto $(alt_headers no-ep)/gnu
doins "${S}"/include/gnu/stubs.h || die "doins include gnu"
# Make sure we install the sys-include symlink so that when
# we build a 2nd stage cross-compiler, gcc finds the target
diff --git a/sys-libs/glibc/glibc-2.20.ebuild b/sys-libs/glibc/glibc-2.20.ebuild
new file mode 100644
index 0000000..dbd20d1
--- /dev/null
+++ b/sys-libs/glibc/glibc-2.20.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.20.ebuild,v 1.6 2014/11/11 02:08:50 vapier Exp $
+
+EAPI="4"
+
+inherit eutils versionator toolchain-funcs flag-o-matic gnuconfig multilib systemd unpacker multiprocessing
+
+DESCRIPTION="GNU libc6 (also called glibc2) C library"
+HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
+
+LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 -hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+RESTRICT="strip" # strip ourself #46186
+EMULTILIB_PKG="true"
+
+# Configuration variables
+RELEASE_VER=""
+case ${PV} in
+9999*)
+ EGIT_REPO_URIS="git://sourceware.org/git/glibc.git"
+ EGIT_SOURCEDIRS="${S}"
+ inherit git-2
+ ;;
+*)
+ RELEASE_VER=${PV}
+ ;;
+esac
+GCC_BOOTSTRAP_VER="4.7.3-r1"
+PATCH_VER="1" # Gentoo patchset
+: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires
+
+IUSE="debug gd hardened multilib nscd selinux systemtap profile suid vanilla crosscompile_opts_headers-only rap"
+
+# Here's how the cross-compile logic breaks down ...
+# CTARGET - machine that will target the binaries
+# CHOST - machine that will host the binaries
+# CBUILD - machine that will build the binaries
+# If CTARGET != CHOST, it means you want a libc for cross-compiling.
+# If CHOST != CBUILD, it means you want to cross-compile the libc.
+# CBUILD = CHOST = CTARGET - native build/install
+# CBUILD != (CHOST = CTARGET) - cross-compile a native build
+# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
+# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
+# For install paths:
+# CHOST = CTARGET - install into /
+# CHOST != CTARGET - install into /usr/CTARGET/
+
+export CBUILD=${CBUILD:-${CHOST}}
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY} == cross-* ]] ; then
+ export CTARGET=${CATEGORY#cross-}
+ fi
+fi
+
+is_crosscompile() {
+ [[ ${CHOST} != ${CTARGET} ]]
+}
+
+# Why SLOT 2.2 you ask yourself while sippin your tea ?
+# Everyone knows 2.2 > 0, duh.
+SLOT="2.2"
+
+# General: We need a new-enough binutils/gcc to match upstream baseline.
+# arch: we need to make sure our binutils/gcc supports TLS.
+DEPEND=">=app-misc/pax-utils-0.1.10
+ !<sys-apps/sandbox-1.6
+ !<sys-apps/portage-2.1.2
+ selinux? ( sys-libs/libselinux )"
+RDEPEND="!sys-kernel/ps3-sources
+ selinux? ( sys-libs/libselinux )
+ !sys-libs/nss-db"
+
+if [[ ${CATEGORY} == cross-* ]] ; then
+ DEPEND+=" !crosscompile_opts_headers-only? (
+ >=${CATEGORY}/binutils-2.24
+ >=${CATEGORY}/gcc-4.4
+ )"
+ [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
+else
+ DEPEND+="
+ >=sys-devel/binutils-2.24
+ >=sys-devel/gcc-4.4
+ virtual/os-headers"
+ RDEPEND+=" vanilla? ( !sys-libs/timezone-data )"
+ PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
+fi
+
+upstream_uris() {
+ echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1
+}
+gentoo_uris() {
+ local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI"
+ devspace=${devspace//HTTP/http://dev.gentoo.org/}
+ echo mirror://gentoo/$1 ${devspace//URI/$1}
+}
+SRC_URI=$(
+ [[ -z ${EGIT_REPO_URIS} ]] && upstream_uris ${P}.tar.xz
+ [[ -n ${PATCH_VER} ]] && gentoo_uris ${P}-patches-${PATCH_VER}.tar.bz2
+)
+SRC_URI+=" ${GCC_BOOTSTRAP_VER:+multilib? ( $(gentoo_uris gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2) )}"
+
+# eblit-include [--skip] <function> [version]
+eblit-include() {
+ local skipable=false
+ [[ $1 == "--skip" ]] && skipable=true && shift
+ [[ $1 == pkg_* ]] && skipable=true
+
+ local e v func=$1 ver=$2
+ [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ source "${e}"
+ return 0
+ fi
+ done
+ ${skipable} && return 0
+ die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe <function>
+# run the specified function if it is defined
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run <function> [version]
+# aka: src_unpack() { eblit-run src_unpack ; }
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+src_unpack() { eblit-run src_unpack ; }
+src_prepare() { eblit-run src_prepare ; }
+src_configure() { eblit-run src_configure ; }
+src_compile() { eblit-run src_compile ; }
+src_test() { eblit-run src_test ; }
+src_install() { eblit-run src_install ; }
+
+# FILESDIR might not be available during binpkg install
+for x in setup {pre,post}inst ; do
+ e="${FILESDIR}/eblits/pkg_${x}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ eval "pkg_${x}() { eblit-run pkg_${x} ; }"
+ fi
+done
+
+eblit-src_unpack-pre() {
+ [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
+}
+
+eblit-src_prepare-post() {
+ cd "${S}"
+
+ if use hardened ; then
+ einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
+ gcc-specs-pie && epatch "${FILESDIR}"/2.17/glibc-2.17-hardened-pie.patch
+ epatch "${FILESDIR}"/2.20/glibc-2.20-hardened-inittls-nosysenter.patch
+
+ # We don't enable these for non-hardened as the output is very terse --
+ # it only states that a crash happened. The default upstream behavior
+ # includes backtraces and symbols.
+ einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
+ cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die
+ cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-chk_fail.c debug/chk_fail.c || die
+
+ if use debug ; then
+ # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested.
+ sed -i \
+ -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
+ -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
+ debug/Makefile || die
+ fi
+
+ # Build various bits with ssp-all
+ sed -i \
+ -e 's:-fstack-protector$:-fstack-protector-all:' \
+ */Makefile || die
+ fi
+
+ if use rap; then
+ if type -p lsb_release > lsb-loc; then
+ local lsb-id=$(lsb_release -i)
+ local lsb-rel=$(lsb_release -r)
+ fi
+
+ if [[ ${lsb-id} == *CentOS ]] || [[ ${lsb-id} == *RedHat* ]]; then
+ if [[ ${lsb-rel} == 5.6 ]]; then
+ elog "Your kernel is known to have vdso bug, disabling this feature"
+ epatch "${FILESDIR}"/${PV}/${P}-vdso-disable.patch
+ fi
+ fi
+
+ epatch "${FILESDIR}"/2.17/${PN}-2.17-runtime-prefix.patch
+ eprefixify glibc-compat/nss_{compat/compat-{grp,{,s}pwd},files/files-netgrp}.c \
+ nis/nss_compat/compat-{grp,initgroups,{,s}pwd}.c \
+ nss/{db-Makefile,{bug-erange,nss_files/files-init{,groups}}.c} \
+ resolv/{netdb,resolv}.h sysdeps/{{generic,unix/sysv/linux}/paths.h,posix/system.c} \
+ libio/iopopen.c
+ epatch "${FILESDIR}"/${PV}/${P}-shadow-prefix.patch
+ fi
+}