summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-12-14 14:44:12 +0000
committerMike Frysinger <vapier@gentoo.org>2009-12-14 14:44:12 +0000
commit28fb024b010f916d830e3c488178ea468d1cf1ee (patch)
treecf78058e8dc2edce2172a9ad813901c45f3fe201 /sys-libs
parentFix QA warnings (missing IUSE) (diff)
downloadhistorical-28fb024b010f916d830e3c488178ea468d1cf1ee.tar.gz
historical-28fb024b010f916d830e3c488178ea468d1cf1ee.tar.bz2
historical-28fb024b010f916d830e3c488178ea468d1cf1ee.zip
old
Package-Manager: portage-2.2_rc55/cvs/Linux x86_64
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/Manifest155
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat-v3.patch66
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-fpu-cw-mips.patch12
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-libc_wait-compat.patch32
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-libgcc-compat-mips.patch173
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-librt-mips.patch15
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc-2.3.1-stack_end-compat.patch22
-rw-r--r--sys-libs/glibc/files/2.3.1/glibc23-07-hppa-atomicity.dpatch81
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-crti.patch10
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-pwrite.patch13
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-sysdeps.patch24
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-amd64-nomultilib.patch11
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-arm-bus-defines.patch11
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-armformat.patch11
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-assert.patch44
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-cispeed-cospeed-fix.patch67
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-decc-compaq.patch28
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-dl-reloc-calc-fix.patch44
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-dl_execstack-PaX-support.patch59
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-fix-omitted-operand-in-mathinline_h.patch17
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-framestate-USING_SJLJ_EXCEPTIONS.patch14
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-frandom-detect.patch52
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-gcc33-sscanf.patch21
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-got-fix.diff22
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-ia64-LOAD_ARGS-fixup.patch96
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-iconvconfig-name_insert.patch78
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-ipv6-bytestring-fix.patch112
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-add-n32-n64-sysdep-cancel.patch153
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-configure-for-n64-symver.patch20
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-fix-n32-n64-sysdep-headers.patch132
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-fix-nested-entend-pairs.patch21
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-pread-linux2.5.patch137
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-nptl-fix-include.patch10
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-owl-malloc-unlink-sanity-check.diff29
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions-v2.patch144
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions-v3.patch43
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions.patch144
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-pt_pax.diff29
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-redhat-linuxthreads-fixes.patch58
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-redhat-nptl-fixes.patch25
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-rtld-assert-fix.patch23
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-s390-deprecated-ustat-fixup.patch149
-rw-r--r--sys-libs/glibc/files/2.3.2/glibc-2.3.2-signal-ssp.diff40
-rw-r--r--sys-libs/glibc/files/2.3.2/posix_fadvise64.c90
-rw-r--r--sys-libs/glibc/files/2.3.2/ssp.c160
-rw-r--r--sys-libs/glibc/files/2.3.2/sysmacros.h69
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.2-propolice-guard-functions-v3.patch43
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3-dl_execstack-PaX-support.patch70
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3-frandom-detect.patch52
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-addabi.diff52
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-nolib3264.diff32
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-semtimedop.diff12
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-syscall.h.diff30
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-sysify.diff52
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3-owl-malloc-unlink-sanity-check.diff29
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3-tempfile.patch53
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-got-fix.diff22
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-pt_pax.diff29
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-signal-ssp.diff40
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040420-mips-dl-machine-calls.diff39
-rw-r--r--sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040420-mips-incl-sgidefs.diff252
-rw-r--r--sys-libs/glibc/files/2.3.3/ssp.c166
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.3-mdns-resolver2.diff460
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-arm-ioperm.patch81
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-dl_execstack-PaX-support.patch50
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-features-header-fix.patch11
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-no-force-nontls.patch57
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-no-libnoversion.patch70
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-nomalloccheck.patch11
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-fix-_dl_next_tls_modid-assert.patch268
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-getcontext.patch358
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-hardened-sysdep-shared.patch11
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-hppa-hardened-disable__init_arrays.patch69
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-ld.so-brk-fix.patch60
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-mdns-resolver-20041102.diff463
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-add-missing-sgidefs_h.patch36
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-generate-syscall_h.patch254
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-prot_grows-undefined.patch32
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-rtld_deepbind-undefined.patch31
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-sysdep-cancel.diff54
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-update-__throw.patch44
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-nptl-altivec.patch229
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-nptl-pthread.h-g++-fix.patch96
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4-res_init.patch120
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-2.3.4.20040808-i386-got-fix.diff129
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-gentoo-libdir.patch36
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc-sec-hotfix-20040916.patch95
-rw-r--r--sys-libs/glibc/files/2.3.4/glibc234-alpha-xstat.patch231
-rw-r--r--sys-libs/glibc/files/2.3.4/host.conf33
-rw-r--r--sys-libs/glibc/files/2.3.4/hppa-no-pie.patch44
-rw-r--r--sys-libs/glibc/files/2.3.5/glibc-2.3.5-frandom-detect.patch102
-rw-r--r--sys-libs/glibc/files/2.3.5/glibc-2.3.5-propolice-guard-functions.patch138
-rw-r--r--sys-libs/glibc/files/2.3.5/ssp.c155
-rw-r--r--sys-libs/glibc/files/2.3.6/glibc-2.3.6-propolice-guard-functions.patch138
-rw-r--r--sys-libs/glibc/files/2.3.6/host.conf24
-rw-r--r--sys-libs/glibc/files/2.4/glibc-gentoo-libdir.patch28
-rw-r--r--sys-libs/glibc/files/2.4/ssp_simple.c25
-rw-r--r--sys-libs/glibc/files/fix-sysctl_h.patch13
-rw-r--r--sys-libs/glibc/files/glibc-2.2.2-test-lfs-timeout.patch11
-rw-r--r--sys-libs/glibc/files/glibc-sec-hotfix-20040804.patch128
-rw-r--r--sys-libs/glibc/files/glibc-sec-hotfix-20040916.patch95
-rw-r--r--sys-libs/glibc/files/locales.build25
-rw-r--r--sys-libs/glibc/files/nscd.conf45
-rw-r--r--sys-libs/glibc/files/test-__thread.c7
-rw-r--r--sys-libs/glibc/files/test-sysctl_h.c7
-rw-r--r--sys-libs/glibc/glibc-2.3.2-r12.ebuild726
-rw-r--r--sys-libs/glibc/glibc-2.3.5-r3.ebuild1285
-rw-r--r--sys-libs/glibc/glibc-2.3.6-r4.ebuild1225
-rw-r--r--sys-libs/glibc/glibc-2.3.6-r5.ebuild1230
-rw-r--r--sys-libs/glibc/glibc-2.4-r4.ebuild1267
-rw-r--r--sys-libs/glibc/glibc-2.5-r2.ebuild1250
-rw-r--r--sys-libs/glibc/glibc-2.5-r3.ebuild1250
-rw-r--r--sys-libs/glibc/glibc-2.6.ebuild1273
-rw-r--r--sys-libs/glibc/glibc-2.8_p20080602.ebuild378
-rw-r--r--sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild378
-rw-r--r--sys-libs/glibc/glibc-2.9_p20081201.ebuild375
116 files changed, 3 insertions, 18747 deletions
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
index 6097333b25e9..dcd3d656f021 100644
--- a/sys-libs/glibc/Manifest
+++ b/sys-libs/glibc/Manifest
@@ -6,103 +6,7 @@ AUX 2.10/glibc-2.10-hardened-configure-picdefault.patch 865 RMD160 744bdbfb73f1d
AUX 2.10/glibc-2.10-hardened-inittls-nosysenter.patch 8823 RMD160 163e53f0f4f0bd003ef1c50a4eaaa8f4a82695fe SHA1 df23c6756114e1451e6f120723af1b621037c28e SHA256 dcf78c6524c222dbee907200a8878aff727e29d43a4962b977a16d85752e5c10
AUX 2.10/glibc-2.10-hardened-ssp-compat.patch 4802 RMD160 02bd17455d64b6661ae5f44329357dc254cdf118 SHA1 b40cf1a8f17e448861746ba39aa20afd66a47b2d SHA256 bd6f0aa8eace0a935731749e101d5fe30210f9edb65f2f5ccd425cef581ddce4
AUX 2.11/glibc-2.11-hardened-pie.patch 1492 RMD160 dacf988364e3eeeaa2bd588420a19db373347678 SHA1 f44b4389d031bc618c83a2f196c4e2afa647a68a SHA256 74277f76ace9cb6b408ef7c1d43a3604ae0d6c1af539055aeaeb542d2bfa2a46
-AUX 2.3.1/glibc-2.3.1-ctype-compat-v3.patch 2823 RMD160 f1162b7f313f7ea18fb178157d3bd6205d818e3a SHA1 d1dceb79689e9c627ebd630389ec1948d7a0a6e4 SHA256 0bc07eb47578d5bfb98774b18bf07aee2af44a7ccd947602c223b34e0d88394a
-AUX 2.3.1/glibc-2.3.1-fpu-cw-mips.patch 433 RMD160 4eda3122052714ea216ab402ea5a3a7f4654f48e SHA1 afb44c9a12e3d4ee28c61dd62522244c09776da4 SHA256 8e68949febc8b14941d15b9afd914b158db11d282d19c528f75a0b58c379dcce
-AUX 2.3.1/glibc-2.3.1-libc_wait-compat.patch 1053 RMD160 429e2065d45c4c68aa5f39eacf6d8ae5fbda63c8 SHA1 001a4af11de2029bcbb01a0afc4051cb4119807a SHA256 db4c92f86d3404ba4cc2f4d28e17517ed09124efcb518394d9c1df27d8540962
-AUX 2.3.1/glibc-2.3.1-libgcc-compat-mips.patch 5222 RMD160 96fff2e999e03dded0624205ece4ede76fce103d SHA1 f745f534032e44e927b56c39523a9996ab3c3670 SHA256 bae5b0e114e78e6c5bfc4f0f1d22b6eb18eb2dbf61f973a3b70a199fe3732872
-AUX 2.3.1/glibc-2.3.1-librt-mips.patch 396 RMD160 98e5d050cc4ffb81177bb75211bddee51577e15c SHA1 751b2fb92bd2d622ce1a2bcd22639f6ebdbe66b8 SHA256 34602422eaeff7aa6f237e1b5d6510c3bc0a6dfa7ed98db3a98a77ed602474a2
-AUX 2.3.1/glibc-2.3.1-stack_end-compat.patch 751 RMD160 44bab511adb3c1280e394d46eeaa481156527279 SHA1 6e45a7080903670a845091227ff0f1faedcf833e SHA256 75bbe459830bc15ba7a4a11369d425e96ddfbde20a74566272e0ccefe2336021
-AUX 2.3.1/glibc23-07-hppa-atomicity.dpatch 2519 RMD160 0cb103e3d870ae0c2c19ad412e586abb07a0fb83 SHA1 ef282b4b2625675498694529c11235fc672fe155 SHA256 4d82ab616cdfc617bd0a1aa0e58577c1dfa098c842cd44e3d464ade9c685fe6b
-AUX 2.3.2/glibc-2.3.2-alpha-crti.patch 378 RMD160 cbf3783316c54696fa6f06cfe80a127a703081e8 SHA1 d1302f16b58141c6fabe36b013559c33b1526934 SHA256 41b6ea3f2916cbfa13e53f5638f79de3f841f78237113949c77999c689a4c2bc
-AUX 2.3.2/glibc-2.3.2-alpha-pwrite.patch 918 RMD160 215e52ac558c1dc0755378241f18378f5399f5ce SHA1 9704ddb18411838c7800bebea33b45a8c2b9a842 SHA256 465cf1778398cf8ccb2d890060b81d2aa0ad12bbdc488c850304b8ea06646cf2
-AUX 2.3.2/glibc-2.3.2-alpha-sysdeps.patch 939 RMD160 e374abb899168a146cbb6e314d5b4cb0a026e8c1 SHA1 54aaad0a92fce9886cd4de2ae4498943c9f93f41 SHA256 9550d9c7302e3b36cd58a355961534a0bed359a760a95b3cdd32aa1365783047
-AUX 2.3.2/glibc-2.3.2-amd64-nomultilib.patch 506 RMD160 66039aba71e565b42c6a11fb1b4fe84f57608c6d SHA1 a46e9c2f989d75687bd3ad0dbee7f9e9315fb44e SHA256 11d597671ca97e12025889e50e67a8164b3b690bfa8c62fb0a577a60cf7f8bc3
-AUX 2.3.2/glibc-2.3.2-arm-bus-defines.patch 276 RMD160 5b59f475a1b4b7552bae2a9f36a31f964796b105 SHA1 40d672db6cb73973bd136420f406c7227b06f9b9 SHA256 a229585089f00361627a7073780a33a3e00a4e1cd6531bea70365383312b46ea
-AUX 2.3.2/glibc-2.3.2-armformat.patch 416 RMD160 16c89ed087a2dc63c5e34b7f43093d26af5bce5e SHA1 be5f32787f7f34b4b5d0f2e8e0077c5c18d3ca3d SHA256 9cc953a60de08b4c8493a1319d251c29681ac161098abd55cde3620ec8490595
-AUX 2.3.2/glibc-2.3.2-assert.patch 1596 RMD160 bd09cff097118e9c3822a29e3c4c6bd3dc604658 SHA1 c945b7004e5d57f418103dcfab75d3f4c9d58708 SHA256 d89c1a8b7cc7a502c6e059c039a41e9da294958eaa9242e6b96f1e56203c8a28
-AUX 2.3.2/glibc-2.3.2-cispeed-cospeed-fix.patch 2424 RMD160 0ef2658017b182a78c8f10e8209afe4a34354556 SHA1 3e15261dcff48cadb5f281523bea44753a8639f5 SHA256 3bf1d4d59fadf21ef3e034d0ad40e8408061fa1637af9008df1bec9485b7c805
-AUX 2.3.2/glibc-2.3.2-decc-compaq.patch 1422 RMD160 29f46fc5dba4f8b7b8638e73193a88e893b730cd SHA1 9d1dda111ac5680247b695aeeb1f4297e7da7eeb SHA256 7f6834ec4ba96d7ddd07d758361373506cd064b6b6d88342057a6845fe62ac72
-AUX 2.3.2/glibc-2.3.2-dl-reloc-calc-fix.patch 1405 RMD160 8469c60cf082525619bfeeadeedd41287c8348a2 SHA1 0a5653e665c64b14c6c2709fd2de56eee5add4df SHA256 6d9bb28882b1a574494ab1da5ee74aa7be004a55a4663a03971fdd6d1aeb65fc
-AUX 2.3.2/glibc-2.3.2-dl_execstack-PaX-support.patch 1945 RMD160 99a52e18df5ff6eb4733509f12636baa2194c0b5 SHA1 2144ac7a126596f2d4d6be8af16a3b989c0815dd SHA256 6d1ecc01d018ff78f3b59a7fc68ee1eb29f55793003c6e47ee96b103d18de486
-AUX 2.3.2/glibc-2.3.2-fix-omitted-operand-in-mathinline_h.patch 680 RMD160 9b122e59fccca53a447ee1d7126ad1bfc731f0b3 SHA1 763dfdb288cff424d7feb0fb8899378362a3dc27 SHA256 deae90efe1892b8e69f2ee88586cc4b134405cbe42ae0590bb2bc53afca034f5
-AUX 2.3.2/glibc-2.3.2-framestate-USING_SJLJ_EXCEPTIONS.patch 440 RMD160 3c963846f8dadad6376043819ac7d8e07e221f43 SHA1 411f2d6980775a368b7cda850041fa84aa9954c6 SHA256 7d7090fc4a62aa97e2a61661f02fb06bf581a0c49dc9cb6d3199c462ec6eff80
-AUX 2.3.2/glibc-2.3.2-frandom-detect.patch 1770 RMD160 58794c72a6257a4cebc66f7ae5e910451c22e3fa SHA1 07660c642ba1af9462b7d3f58ed77141c6f1e007 SHA256 c8eaf1e3e8c56e9d5189da18b5604bb8e92b646d3a0ee614da904ab75cc81a25
-AUX 2.3.2/glibc-2.3.2-gcc33-sscanf.patch 671 RMD160 953876f55be0eda6789afe6ef48d9a2f51b7fbf2 SHA1 7f9ab3721147ea5e03698f2e1732469e6c034f94 SHA256 ec44d5302063203b09455af8d704a0280f8956abbd3f0956415f27904d34bff3
-AUX 2.3.2/glibc-2.3.2-got-fix.diff 752 RMD160 addd458c45c4a781563a92e67f2b806de8f051b9 SHA1 229db39b5e5eb58971f809ae8ea75c320538b93b SHA256 f4abc4d6d12afb15bff78aefdf95d19633a1977b1651f9dcc675197e8a5c03df
-AUX 2.3.2/glibc-2.3.2-ia64-LOAD_ARGS-fixup.patch 4445 RMD160 97f4f3b012a137525e35c6bf927ab4136866acb1 SHA1 17ea521bb91e337485d36ac5d439bd0be791da2e SHA256 4393c4c37ba88dfa2cfcf149df6ce231d46412048f9d4c106fb9ef1b26507700
-AUX 2.3.2/glibc-2.3.2-iconvconfig-name_insert.patch 2262 RMD160 73a12aaf43f064002d2d04dc4410b6bafffc214c SHA1 83d6a14bb8c3475bcc5a64e7fa206a786fdc2d7b SHA256 7a051f53bf632ee2f2686dcf01c39e07013e8f273a60bdd41bdc9aabd5f2f555
-AUX 2.3.2/glibc-2.3.2-ipv6-bytestring-fix.patch 4088 RMD160 f0e4a8fbc3ec5e5740f2003d1afdb3fd53c1e7f4 SHA1 6e991958cefb70b94722f51f4dd9faf037524548 SHA256 8d7c3cec4d5247cc07f5054c70bd0430c6d29a18419bb301fcc9019a9fa370d5
-AUX 2.3.2/glibc-2.3.2-mips-add-n32-n64-sysdep-cancel.patch 6344 RMD160 f2b87f81b46c965fbb1b2aa369805fe2a74617f2 SHA1 69f9d0e785a520e0264194eeaeb7b40007c0d835 SHA256 51920083d34e36d60f275fa1cba2cf6fec2457b2cadace8d873edadab5a2d81e
-AUX 2.3.2/glibc-2.3.2-mips-configure-for-n64-symver.patch 741 RMD160 02c73f356c0b13e8f95c664556c46e76c072545c SHA1 1b2c4ee140f704ed0857b940461e7b44591c9ef7 SHA256 6ba3f58d3ffb3feda338555144cc253a0517827c8d0476f623da409cea225e6c
-AUX 2.3.2/glibc-2.3.2-mips-fix-n32-n64-sysdep-headers.patch 4398 RMD160 3c480d14054fe3c9aefec8a29ada460f34cb709d SHA1 0f0217a60d38224046c04b727ed7e73012d61d67 SHA256 5ad8fa08003e6745ea0dfb9406d6cb22c789512b81c9fe262df1adf4a01ac23d
-AUX 2.3.2/glibc-2.3.2-mips-fix-nested-entend-pairs.patch 612 RMD160 9eaa7d6b257a8c198e240495db32542de37ac9ab SHA1 b97c841a50f013213cbd13abff6def3091c01e70 SHA256 5b58552b5cbbe2d9171f55590df31e110a61dfffd9c659c724e9106de57aa327
-AUX 2.3.2/glibc-2.3.2-mips-pread-linux2.5.patch 5310 RMD160 43e97ec565eabdec535e45dc79338cb8e101ca71 SHA1 46a46b143c723dd47c13c0db3a5df904c1463b5c SHA256 506d256a7531bc3729a396d05846b4bfecc7a24f2930e64ca317fded66c3bc19
-AUX 2.3.2/glibc-2.3.2-nptl-fix-include.patch 247 RMD160 52fed74abfb434ee3077afa3ed836c784462a429 SHA1 f751cec5449f347cc6d9ef9d1af9c7a926535170 SHA256 fad574563c3c714cc31c50237b90be423531318ccada0d02cb5cbdda64b8bcd2
-AUX 2.3.2/glibc-2.3.2-owl-malloc-unlink-sanity-check.diff 1425 RMD160 354715c62330b52d917b8af226fe4111f2764817 SHA1 25d5b6763893c1c383664c7332a27701efaf7fbf SHA256 4832ae591e07c028996911e486205ddca9323ab0967f5a197c63150456b640d5
-AUX 2.3.2/glibc-2.3.2-propolice-guard-functions-v2.patch 5107 RMD160 1b90c60b37301619e2e570de93b4f65bb4ceeffd SHA1 11cf6dc40b1b3c72680130fd7ade8427a9cb3f6e SHA256 48a37c8415359dbc3423d79b8e404cd8a4b327ef6a3d18cb86cae68df1a32764
-AUX 2.3.2/glibc-2.3.2-propolice-guard-functions-v3.patch 1986 RMD160 bc170f598926964188d1a3c00fbd97bfcd07bf6a SHA1 549afaf6b879836b949e57d668de9c3f7d60bfcd SHA256 aeb4ccfce4283951d3bbdd4ec582d6901416fbaceb9fc899795758937007618c
-AUX 2.3.2/glibc-2.3.2-propolice-guard-functions.patch 5069 RMD160 ee713cf1a15f80462799736fa20a40438b75a270 SHA1 de85375938a394bc06cd09f3c1e877a19fedc26b SHA256 d233ffde002735447e9a440716036a66ba305026edc3f9b512b4609ec8c58695
-AUX 2.3.2/glibc-2.3.2-pt_pax.diff 1470 RMD160 db0fc8e78f65e88886331aa0cbb7e7c5b2a51eca SHA1 c6d53462588c4c9a717a1dcc3665f7c1b1e2ce8f SHA256 8133d90ef77d54b3dc2711bec836881da5081d724c192cdb7dc1ac8cfbd66115
-AUX 2.3.2/glibc-2.3.2-redhat-linuxthreads-fixes.patch 2532 RMD160 81b4ffe919e9dad5111f87421a6f6345d2de42c8 SHA1 20dd6a17ba46e5ff0dbc31474f66d7fe221dea12 SHA256 14c04633d168ae4bf3d440719898b10adf8b09517004f2b62d1a7f8665dc1ace
-AUX 2.3.2/glibc-2.3.2-redhat-nptl-fixes.patch 1077 RMD160 44e4c6249321d7d0776600a5a356d3b0f0c5e746 SHA1 40ce5d282f1fa3ace73da06f9627f5ffff7ee6df SHA256 90c66ab0ec9afe72b377762ab399bc840970ead67ced8402100083bcadac5696
-AUX 2.3.2/glibc-2.3.2-rtld-assert-fix.patch 1153 RMD160 8b2b8fd03c26e61c6a07d8f6b7cee911b75f130e SHA1 d0fc4838c748a2e6bcebbcb8e5a4b925bfb9429f SHA256 12ca6b529a7da9f3dd1076a8b8e8ac89b51bc34d49123966ca9e23361a6239e9
-AUX 2.3.2/glibc-2.3.2-s390-deprecated-ustat-fixup.patch 6638 RMD160 ca1ee40cd6552ea85182678a226e86b4a9332c58 SHA1 f61049b99b1d2df54931094ef6fa2e5edae92b6d SHA256 26f4664cf67b70cb5c4675f0c9e03feae3a5c49d6992c5d6abbd8f66495b334d
-AUX 2.3.2/glibc-2.3.2-signal-ssp.diff 1431 RMD160 fa128a533a0b2faf0395b5fa99898d669755aae9 SHA1 31935dccd26221642681ee43a5c2d152fc7b9af9 SHA256 e6c4f3f5bf458b79cb6f51ff56d49b188e6c2bc6d0b6c09294f4054bbdb05598
-AUX 2.3.2/posix_fadvise64.c 2752 RMD160 9e478c37513997fdf7fad5578805d27335e97eb1 SHA1 6c8e5d8fb23e079e0d50153f4cf592190a63c158 SHA256 a67e1672df99b8955c80fd2ac46992e972a7552ea58126261e0f2660c8dd9b78
-AUX 2.3.2/ssp.c 3935 RMD160 48acf2f8607b750e56745836af7fdebbfa603aa7 SHA1 2e5fe75a8119f2669c9782ce11cfa9068c0c79cb SHA256 7c0db663bc8f55d27cbcab117731dc7b72a33b1a25fbc00e36bc273e31a42b9d
-AUX 2.3.2/sysmacros.h 2443 RMD160 53418fd7a312fee1a131be935dc8a2359b4dd84d SHA1 3cdfa1ad2a5e77b9d56800289c6073750c5635b8 SHA256 bcf0f0ee379f08f63e3f9c5804ab6346af39b89a80009823d46bf3fcf6c2955b
-AUX 2.3.3/glibc-2.3.2-propolice-guard-functions-v3.patch 1986 RMD160 bc170f598926964188d1a3c00fbd97bfcd07bf6a SHA1 549afaf6b879836b949e57d668de9c3f7d60bfcd SHA256 aeb4ccfce4283951d3bbdd4ec582d6901416fbaceb9fc899795758937007618c
-AUX 2.3.3/glibc-2.3.3-dl_execstack-PaX-support.patch 1791 RMD160 5181360f36dc34acbf4dcb701cf36daa93b0e554 SHA1 3868a78c27f26a5503ef5ef9a4b7652a6de1417e SHA256 f713681ec83c4aa359911fb2c8c1d813233647168b34b16db14efd49e98a123d
-AUX 2.3.3/glibc-2.3.3-frandom-detect.patch 1770 RMD160 58794c72a6257a4cebc66f7ae5e910451c22e3fa SHA1 07660c642ba1af9462b7d3f58ed77141c6f1e007 SHA256 c8eaf1e3e8c56e9d5189da18b5604bb8e92b646d3a0ee614da904ab75cc81a25
AUX 2.3.3/glibc-2.3.3-localedef-fix-trampoline.patch 2329 RMD160 de6ba25b8330e6ee720355e8541235d265a461cd SHA1 cf869cbd74793cb579b42d734884f10d4cadcdde SHA256 b5cf51d1ff5479d09fbc82992f126ca4969006c90c3a2ae94ad586d4902d791b
-AUX 2.3.3/glibc-2.3.3-mips-addabi.diff 1720 RMD160 c099261c359635046121718ade146d76a9410fa9 SHA1 493f17eaa26082a992654ea874f9bb01c2cab0d2 SHA256 6536add1d26ceee20f59245eeea372ceb19beecfe1fa559738f0fbd8457671ef
-AUX 2.3.3/glibc-2.3.3-mips-nolib3264.diff 1166 RMD160 8a9db675ad7e6e08f29e62b41756d4e3525d3121 SHA1 ad735ee79c37c65c405812c1d23ad17fa65db3c4 SHA256 ad932aecfb8031b0f721576bb7f76473fed91a05892bd5dc91d77dd5d77a90a9
-AUX 2.3.3/glibc-2.3.3-mips-semtimedop.diff 602 RMD160 ccd60a0996c37599c761bda8b421135da45e1336 SHA1 0f965ca6bdec14fb664d82179807ea9ac1dbb6dd SHA256 4822fda370fe74b9f6af402869236ad55e47ad26a4efed7bf39f244dc9da92b1
-AUX 2.3.3/glibc-2.3.3-mips-syscall.h.diff 1199 RMD160 2b41b0c5eda1d8c01d1053538c0a43ac102f75d4 SHA1 34d4c05e2f826f1cde268e4f2375ea6d92969aa7 SHA256 223d7c37dc342577b88281385087ec01f35ea506cbc2b4768033c686b8f16686
-AUX 2.3.3/glibc-2.3.3-mips-sysify.diff 2138 RMD160 205aa658400c4d1b1403f1dc0b79c5216b42f8e1 SHA1 03e9099ecdc86e313139211b8cefeacd553a6e77 SHA256 638768e4f5a56bbc9bbe39b0cd17e54a3aab78d58d2682048b709f871f029731
-AUX 2.3.3/glibc-2.3.3-owl-malloc-unlink-sanity-check.diff 1425 RMD160 354715c62330b52d917b8af226fe4111f2764817 SHA1 25d5b6763893c1c383664c7332a27701efaf7fbf SHA256 4832ae591e07c028996911e486205ddca9323ab0967f5a197c63150456b640d5
-AUX 2.3.3/glibc-2.3.3-tempfile.patch 1787 RMD160 7009918fb18ec7bf138d0c67fe7b0c149a5e76fe SHA1 bd6fe6a7198ea9d94449d4313ce6ba9470af506f SHA256 6e8245494f8cb4623f0911bc24b192748d0f2763a7935970621a38f72f6b3a9c
-AUX 2.3.3/glibc-2.3.3_pre20040117-got-fix.diff 752 RMD160 addd458c45c4a781563a92e67f2b806de8f051b9 SHA1 229db39b5e5eb58971f809ae8ea75c320538b93b SHA256 f4abc4d6d12afb15bff78aefdf95d19633a1977b1651f9dcc675197e8a5c03df
-AUX 2.3.3/glibc-2.3.3_pre20040117-pt_pax.diff 1470 RMD160 db0fc8e78f65e88886331aa0cbb7e7c5b2a51eca SHA1 c6d53462588c4c9a717a1dcc3665f7c1b1e2ce8f SHA256 8133d90ef77d54b3dc2711bec836881da5081d724c192cdb7dc1ac8cfbd66115
-AUX 2.3.3/glibc-2.3.3_pre20040117-signal-ssp.diff 1431 RMD160 fa128a533a0b2faf0395b5fa99898d669755aae9 SHA1 31935dccd26221642681ee43a5c2d152fc7b9af9 SHA256 e6c4f3f5bf458b79cb6f51ff56d49b188e6c2bc6d0b6c09294f4054bbdb05598
-AUX 2.3.3/glibc-2.3.3_pre20040420-mips-dl-machine-calls.diff 1497 RMD160 a84bc7c082643984ba61183548e34e9609ce602c SHA1 f5933d7e3339e51d42a8fea009f3c6826e1ddd01 SHA256 9d8078970c78f5b007bc0ee5dfdaf476d3700a54a0c718eb5e4537f3ab4db355
-AUX 2.3.3/glibc-2.3.3_pre20040420-mips-incl-sgidefs.diff 8287 RMD160 4638ea91406c9078d485cf7fc2c667250080338d SHA1 6f90285c9acac1a84e97e82c445675c44c3ee7db SHA256 d0155031d68a2d12ff958f78b442c73f0bcc017684d693b6749bc442d766c754
-AUX 2.3.3/ssp.c 4041 RMD160 7044685a01288ce54e06640f1f927db73c7d8280 SHA1 ba35ef21708ba7d67b33118b79371d907a0dc41c SHA256 398e397e4b2dde42ad85a740bf272a8d03cfdc675960de6405f5bd268a1311af
-AUX 2.3.4/glibc-2.3.3-mdns-resolver2.diff 12272 RMD160 d91f14f75a3ca86396242870dd2a5f5112a61bfc SHA1 2dc4ac0463aaba55a3d2842e33af739383853056 SHA256 186446593831bb62b92879d7dc6fda6ffff0fb53f3618b30cbeb5cba1558a08d
-AUX 2.3.4/glibc-2.3.4-arm-ioperm.patch 4037 RMD160 cd3831205bc59ecc1a47744164d16e280d3c1c93 SHA1 654682fbc865a2fc117d4763e124d3b3b955f06c SHA256 9146fd6eed255545501dce4c898d3c1a7bc158b5ae091e82f895245baef032dd
-AUX 2.3.4/glibc-2.3.4-dl_execstack-PaX-support.patch 1443 RMD160 f0027946dcd8da3a1bcd47ce872b20ee060e7d79 SHA1 e603c312908381a942151e8f367b96548040fbbe SHA256 8dad8afec4a9815d41466a01daf8af38c753eab8a8ed1ede61f86ca6b84ee8fc
-AUX 2.3.4/glibc-2.3.4-features-header-fix.patch 449 RMD160 622ee88546240628283dfafd2eb3694423b17a21 SHA1 1f0416dec77a4ee1dd4d80623054604dc3d1b91c SHA256 e3b634d450e7f6ad6aa2df221f3d28b3f4a58c7c2b29c4d2f331828c23dcadf1
-AUX 2.3.4/glibc-2.3.4-fedora-branch-no-force-nontls.patch 2337 RMD160 ade2e03e847f0b526764f8980f60484632182a9a SHA1 4ab729ee4200499a58909d60982078f1ec28c5ca SHA256 c1e36f67cf3f0123d6fd0c0ac4e80cc6fad9c5bcbd68e4148d8d1fc5347395d8
-AUX 2.3.4/glibc-2.3.4-fedora-branch-no-libnoversion.patch 2288 RMD160 bbc1498498eb5c4b321e9b9af2f49646271836a1 SHA1 7b85a4972ff4cbe2daddde20adb1afd9981c319f SHA256 6c6bbc17e9d5faa86d9ade82dcd07c2513d2c260537327b4ddf1030b3d5292de
-AUX 2.3.4/glibc-2.3.4-fedora-branch-nomalloccheck.patch 372 RMD160 5ffee93ba7acbc4ca9f5a76df1e99b322a89573f SHA1 3705d199f32872aea693344fac9097d0557a63b9 SHA256 9e6b3462c1c3fe0037485a7b894d80c6da4349fedc73586395c5032e8c60abd2
-AUX 2.3.4/glibc-2.3.4-fix-_dl_next_tls_modid-assert.patch 9140 RMD160 9d4a3fe184adeed5a8886efc110f46b4bc2f1464 SHA1 c5b351327fb7c5c6946de604ecb73a5240e8328c SHA256 285fca201ac16f3c7c1fe131d6f4f437bd8b5fb65c3f2720ab29704bd087e56f
-AUX 2.3.4/glibc-2.3.4-getcontext.patch 9854 RMD160 e7059e73595771bece8bded5074da749ffa5b0f9 SHA1 2789bdf10d3786f6462701f4dd0f94f891b95d70 SHA256 521dff9f4c3c81f88710abab72809bcac63f4c17bbc6c1ce9edac4757c124b7a
-AUX 2.3.4/glibc-2.3.4-hardened-sysdep-shared.patch 382 RMD160 c89d75606c14aaba32a13b307fd6f8d1e6bc8f6c SHA1 5bf11155da5f7d13d6d27523f35282076b6b3318 SHA256 580dc1a3967586541e78b7e1a5acba95834086c2fd790d766bff2138482b1820
-AUX 2.3.4/glibc-2.3.4-hppa-hardened-disable__init_arrays.patch 2310 RMD160 f000d2a35e5b852d9058c3a5f6a6302bda4134cf SHA1 74a85379871c98c13daf5acc784b1faf80c9c350 SHA256 1a7fa31a9efbdc742993b8ee46c14356659f29221127664dc08316d197d41e21
-AUX 2.3.4/glibc-2.3.4-ld.so-brk-fix.patch 2562 RMD160 fe646cc4527f5b608b0bacec8a61ea497405d156 SHA1 8a929a9e8d97a8757117575360bd5d220ec44e4a SHA256 29803fc15fc9214d7b536b9511c2413a1e7a09aafd70f523830f92fc4a2322c1
-AUX 2.3.4/glibc-2.3.4-mdns-resolver-20041102.diff 12809 RMD160 fabb6c145302f0cc66a18dbc02f70473cafcb59f SHA1 6e4a45d80c1c6ff8997975e81b6968650353848e SHA256 5c2b82b11e96f8535d3bcfb2c6cf791b7ccf1a52a17597642e83911564adc749
-AUX 2.3.4/glibc-2.3.4-mips-add-missing-sgidefs_h.patch 1196 RMD160 77acb28f5d63aa99dcad89e3174db9959213b201 SHA1 5481c6f108bda250afe1a2f44ce90c910074a318 SHA256 a5b19098aa74fa3830e8f783861ba293cb5b6b1655110578e6f2f6d2ef3b0ca8
-AUX 2.3.4/glibc-2.3.4-mips-generate-syscall_h.patch 8230 RMD160 bc10c04abb729811cadc663a14aed507672b1a31 SHA1 fc6ed283e15c95b8f7a95f1fb0ff0b15bcbf33a4 SHA256 00551e655acfa2d0748894cb56ef37d605adb18f412bfb9339eb5caab9555efe
-AUX 2.3.4/glibc-2.3.4-mips-prot_grows-undefined.patch 1410 RMD160 9ff69a319b6ec0b30c23ae27b40419fbb5aa61ec SHA1 487953182d9c642a1c50280aa4720c839da7bf60 SHA256 94d260e531eb057f714a852ae14a2d5b5af607010e697b65f4077b98f7b487c9
-AUX 2.3.4/glibc-2.3.4-mips-rtld_deepbind-undefined.patch 1425 RMD160 73ea789e48b0b0bbb67b2081b90d1ecf14ecdf81 SHA1 795062c851ebb4901445e4aa4fbdb0f971ee2bd0 SHA256 245b8b95d62a763a8111efba76bad2b749660c3a183088a81efd196ea5527c86
-AUX 2.3.4/glibc-2.3.4-mips-sysdep-cancel.diff 2402 RMD160 fc09a94a9f71eadb42e29620a285a4e78365bee9 SHA1 8f096a8b491f2523b7726b50d85f80371534e732 SHA256 14b507752480c2cbe2fc2caae0b358dfb3e8d568da979827ad56b54caacf2034
-AUX 2.3.4/glibc-2.3.4-mips-update-__throw.patch 1975 RMD160 bf96df13049983368abd5f60030ff0882f9f88fe SHA1 047e24610e66644dc97f7ba67dd4cc8b0f6333f4 SHA256 d0e6ac3dc3a59a55854553481e1ddf22025b1d91c0f1da10b87ef428da88f309
-AUX 2.3.4/glibc-2.3.4-nptl-altivec.patch 6140 RMD160 9d7257cfea2d3cb5ac91229c5f555db506707834 SHA1 6dd72f844d02fbed530828c8101e5c33e2946304 SHA256 aaf78f5378303443e1aaefb11db4bd312d91801753d66b9ade080611f1237e1b
-AUX 2.3.4/glibc-2.3.4-nptl-pthread.h-g++-fix.patch 3304 RMD160 bde103e605dd953baabab03b5aa31320462e2e3c SHA1 ede6ebddfd1bd748a20cd151b3174e976dcae6db SHA256 71efa50989d3c68c855ae6c8e0f686ba2d2b3418486da9924f3f365dd3783ea7
-AUX 2.3.4/glibc-2.3.4-res_init.patch 3417 RMD160 ed66680ef9bbdc9a1aaf22c7237778fb865f2a62 SHA1 9550b6ce63603fb689ccc3e4b2f5f0293cc7403c SHA256 928c7291094d59800823344a34c6aab6b25f921b53db64e8fe95bbc68e5b4c68
-AUX 2.3.4/glibc-2.3.4.20040808-i386-got-fix.diff 4203 RMD160 ffbf96d9d471ce6582c6e32db4a87446ba67d33e SHA1 cb3e4670de182b526ac4934fdc1f69961e73a8a4 SHA256 e634c0d04d6896650a62db2d5985b3728b32f406d907f022ef0ee642252b3e64
-AUX 2.3.4/glibc-gentoo-libdir.patch 1347 RMD160 7ca1a159d74a615246d2e1b45e0911ac463daa21 SHA1 1c62821482722c606426b2dbc286bd798debbc28 SHA256 f8e5729b904b7592897bfa11bc268d65c5689bdef83b74c572fbb1fbee2f826c
-AUX 2.3.4/glibc-sec-hotfix-20040916.patch 3080 RMD160 3419ab628d16045042f5df9e487386e03c8d979d SHA1 b69cfa5115746f2d38fa301a55d68efe88f7bcff SHA256 9f48a55f4207bdf4a9496680f09661a06d4a4bd11dad11cb0986949c0d3cc35d
-AUX 2.3.4/glibc234-alpha-xstat.patch 7653 RMD160 6264e9a9c7ff7a95120994985113fce0bd7b5f43 SHA1 c23097a40527399fd26128e7336ed00571a9d5d1 SHA256 541ac8a6532f7fd5a30b5c65451fe7122b4d04a3dd4dc85601216d6d185c3d70
-AUX 2.3.4/host.conf 1302 RMD160 84c89e4c5934b024a4a14c0e0d876600493cc7c8 SHA1 35aa49ce270c694bd1856e124dd294eff50cc5aa SHA256 83ede694aa7f4cd79b0c64592f0ef9d338ba1fed4b02f26ee1534372d19c0c7f
-AUX 2.3.4/hppa-no-pie.patch 1265 RMD160 a7b0b172f5d5269c980747c7fee0e5341306a402 SHA1 c90936a5f1fea9d925556e9f12e119d373bb11fc SHA256 c7c01f35eed933b63ed25061d617e414aeb0826ad100d78e5cd9b1e56461273b
-AUX 2.3.5/glibc-2.3.5-frandom-detect.patch 3080 RMD160 7d0824edc14f9bfdde07eb7d1ac0d0281e55e343 SHA1 d62af2e590920d8fb07a977ce3f2d5bf3a62c064 SHA256 910a95fe5cf46402fcf865c5d759002e4a54ec979e3a70147f5ac8620e01f3f1
-AUX 2.3.5/glibc-2.3.5-propolice-guard-functions.patch 8243 RMD160 7c9a503c63c9aacb391cd4d2965ef15ea9d93a5e SHA1 0c1996cf9283a0c42f70dfa5a62711d2a6c13b81 SHA256 b66912489b53eebbc21db2a85f72468e3be142c9bcd2686044b68131b83d1bcc
-AUX 2.3.5/ssp.c 4297 RMD160 cbedfaed1440e23c076dd8a883ea3c707623d61c SHA1 0700fe3a6a91d1c8fe08daf4ef04fbfbcb9db5cd SHA256 77367f274b85926791741d6014f3b068b31cb9c8dbf056716c972eae7cf03237
-AUX 2.3.6/glibc-2.3.6-propolice-guard-functions.patch 8273 RMD160 d062d48850928039562d0d2bb543e238f852dc75 SHA1 0f52d6bb75b5b1fe7322d28aa614d4397cb58e12 SHA256 34bb6a47b634bb19506f13b652ad24a9e8644369cdb7729d9ea32edcec969370
-AUX 2.3.6/host.conf 937 RMD160 8e5e0f24d65fa744c3d182344808766609cb2619 SHA1 101c76b043b1b86a8a4695b02c17f5d44b294be8 SHA256 0d30aa973b76d6b2c1bc947046978bd0a6f61d7aaf495caf361d14d16a932348
-AUX 2.4/glibc-gentoo-libdir.patch 991 RMD160 b68d1bb0fdbff82922905fff6a5d49301fa85c34 SHA1 9c65b4c3961b26b936ff244b5e0b2f9d9b7769b8 SHA256 2358695c5c0a1e324ebb9c4941fb043e07b5c98cca6ab0685e5412524f2b359c
-AUX 2.4/ssp_simple.c 914 RMD160 d9510f3b13f2fad4e2386c64644b592ef18efc7f SHA1 07cb2e617dbce313760380541e99c6d0677c4afa SHA256 57d6a3d25b24f13758637bc0b15dd9d0305a4178a5fe55b0bb14a1d2e49fd7c8
AUX 2.5/glibc-2.5-gentoo-stack_chk_fail.c 9058 RMD160 c98d7007857aeeea00e708e7989800dad9b07ae3 SHA1 ff92b7b6cb4a364dbe81c5110da79d1ad56a72ba SHA256 067fba2a36d2630d50198c44395ef208cdf080508f1b716bd3d079f7b964e2df
AUX 2.5/glibc-2.5-hardened-configure-picdefault.patch 794 RMD160 7ab81bac4b9625043b1e7edea6fb5707696c144d SHA1 25a0b018eb44f3c9818876a12e9ec817e305d80b SHA256 0c0359f567e4ad2d3184618bf6ac7e6102b703eab6227c7e9a4ff4dcdeed2c91
AUX 2.5/glibc-2.5-hardened-inittls-nosysenter.patch 9407 RMD160 352112bf4f2d8d58471f22f623784350baf0bc86 SHA1 ae244e9923c0a0e8be4121d593897530c0bf08e8 SHA256 2a912e82445815ae32744d990c59d8758ec74e482b856bd274c292848b9af1fd
@@ -119,16 +23,8 @@ AUX eblits/src_install-2.6.eblit 7946 RMD160 6cc258a316b78212777ab328a3c0cb73de1
AUX eblits/src_install.eblit 7994 RMD160 0f3fc3715f589ae485f730686acb69a11d31960a SHA1 51db782428290a5a641a48038e6436dd50efca5e SHA256 61ddbb1cf22f79662235a67c29c704059a6dbfaf6f501b6b12c3895c2593747b
AUX eblits/src_test.eblit 1162 RMD160 349db09c5f2c2e412a108b8c5371adf946e1a3f0 SHA1 357ef650e1dce62d5d688133426bc62b9085009d SHA256 bac1db2da478f6e6709275c36cc1f9a98fac7fcc2e80bd8831f2077207754962
AUX eblits/src_unpack.eblit 5148 RMD160 59fe45ab19ab005b9ad1fe1d5fcfa41cf3f3fdde SHA1 c8b0099903b1bc861bab0b9bf43cda2e4b5148e2 SHA256 28d475d0154ee2eb54eda4c0711accccbae80ce3c537470d076006734705e7dd
-AUX fix-sysctl_h.patch 376 RMD160 b5dd68158224b09ddc42986be02351c74f81e0a0 SHA1 5601fbea6961368bcc192aef78e96ee2c5310713 SHA256 3a589f63fd1f3f6c5a00c66a10943d3d64630aefb1eb5b37e7f2a856fcea234a
-AUX glibc-2.2.2-test-lfs-timeout.patch 320 RMD160 c8baab8326b4aebf642dd5ab512fbebf2371e9d9 SHA1 df2a868fba86adba184ae9750e9dee3b2ec300a5 SHA256 28e7ebc92ed93a12daf5357f07537be3daed5f4717a075c77a3ad248ec99dcf0
-AUX glibc-sec-hotfix-20040804.patch 4319 RMD160 6f7f58794273ed0736653a09e823e8ac3031ed29 SHA1 1d86c62d5c52b59881eab006b36e3a9891607887 SHA256 9d950b2f45cfbdae6df590137e4aae938380673449fe4507536557fb4c797393
-AUX glibc-sec-hotfix-20040916.patch 3080 RMD160 3419ab628d16045042f5df9e487386e03c8d979d SHA1 b69cfa5115746f2d38fa301a55d68efe88f7bcff SHA256 9f48a55f4207bdf4a9496680f09661a06d4a4bd11dad11cb0986949c0d3cc35d
-AUX locales.build 699 RMD160 2a186105be5b00ec48aedef734e9dba5aee19895 SHA1 02ce7b63d60da7bb4b936969721f78486ffe9788 SHA256 094a5e02148d522be5a5ec2b95fb7305d5503f6d13d1ffa9088e9dad21af1c8a
AUX nscd 1621 RMD160 f6d20c4c3814f70d7741f3fa2e0b53ba32c37960 SHA1 5751fe798024c2021b7b3ed3e798618e2a38244a SHA256 6165db3a2fcb251d4f3655c0461e018ce9c92a37f7f22a8fd2b75178b5435bc8
-AUX nscd.conf 1158 RMD160 50651e89a0cb206b1d37dae8840527694fe561b5 SHA1 5f5166aa6e0bffa57c52c39d3ec51ad3b0efa607 SHA256 378b7953adf5aa0e03bff49b7c654cae67b3efee7c92361b385fe7d3e9fb57c7
AUX nsswitch.conf 503 RMD160 f375f92f6b41029c93382c39cef896261b140cfc SHA1 42f7f5cc3de75c69bf60d806ac8490106ea63326 SHA256 6c38b8642d5da884327ad678d0351d57be3621562253bd9711394bad87e45e2d
-AUX test-__thread.c 53 RMD160 dcc9960f3bf26c935f41dc5c408613963885ad58 SHA1 dcb60595b2730a8a05eb045563f13cd615830acf SHA256 28a7836b810cf21f6071126d6b19dbdbf567f2544f9283700d125ad653d7519e
-AUX test-sysctl_h.c 54 RMD160 b7c2e5956e0a232193610701ccc57a8d56615a36 SHA1 d727fbe809fbec9157661fbdb6c8077a68d95044 SHA256 19337cae62f1ebc23ca8d8de8a98e7f03c9dd77a671100995d6e7c8a3833e759
DIST glibc-2.10.1-patches-5.tar.bz2 103325 RMD160 f823d0bc02c73d03dce4e7492c9e64bf0e7bb945 SHA1 d5b54772cc7379c282aa3087ff970753d5923308 SHA256 8e591e0e40fc3fba5e95ca87cdb8a25b3136412d4286e977b3cdf9ea9a2e05e9
DIST glibc-2.10.1-patches-6.tar.bz2 113352 RMD160 6874a93e993bb082fc4fd23582b5f6bd1044ec28 SHA1 2448fa11229deeaf7a2135510d35bbdbfe9f31e0 SHA256 36a838d5be4fb96f0471d288f172443df28867c301e7790667e1cb57615e6c04
DIST glibc-2.10.1.tar.bz2 16106243 RMD160 ca102519ab32714e788a0db5dd43c2f9962c86e9 SHA1 cb478cf9d6e2c905a1a4f4a2cae44a320b8dc50b SHA256 cbad3e637eab613184405a87a2bf08a41991a0e512a3ced60d120effc73de667
@@ -138,96 +34,51 @@ DIST glibc-2.11.tar.bz2 15684114 RMD160 817ed8febe8876602d6fe37983505908046d0925
DIST glibc-2.2.5-manpages.tar.bz2 14667 RMD160 4f6e1fde042c19aca4718c8e06e19dc2786a1334 SHA1 7bb5615af98a8b5fb2ef91a47148fedef227c544 SHA256 03850134bd0c670d8b5fe5e3bad0dac2efdb7078ddf69e0dbcdba380f4d5697c
DIST glibc-2.2.5-patches-1.0.tar.bz2 21176 RMD160 4575e4355a919b7865829d22ab86cbdcd53253ee SHA1 f8fa215694673c5ee69f00b3986bcd34d48c7d85 SHA256 39e20bbd032db00c3b0781a0055ed092e9ebcbc2f71e4c1930fd93cd67d374fd
DIST glibc-2.2.5.tar.bz2 12404613 RMD160 90e78da2f4c90f4b4476edb10ccc3fea150aeb4a SHA1 69f3d998a3dbf0868bcd523317f066ce3c5ccdf2 SHA256 4a63662ce8024583adeca1af2643acab6d895281112c492d6ef3b4f35e26893f
-DIST glibc-2.3.2-branch-update-20031115.patch.bz2 1692480 RMD160 3e0e33a2439e4c4ae6b61077ccd0dc41930c1e60 SHA1 344d486f2768e6a4e856a3231f7daf3b01678c58 SHA256 05f3d69f71b10b3197adbc3dd460d805b5f6ddf6d8123267eaa887fa4f3a9faf
-DIST glibc-2.3.2-hppa-patches-p1.tar.bz2 18793 RMD160 c91188b73d50263dac48f40343d606dc9262675c SHA1 23cdec2b2aeaa7a0f5c185691870170862d8d8ef SHA256 198f1dc1241e03249ef3932b7792b07cfbf3b9e54c491d8539962e7c0122a10e
-DIST glibc-2.3.2-manpages.tar.bz2 14700 RMD160 052f2203b7170034c07466d0d9f3a0688267f4c0 SHA1 c01ed962ef934b2ddf29776e6b9cbb9a1dd27a2e SHA256 6a410d295de9cd69560f1521f84b17c7ed678a2af3e53f6a077eb2c36c544f6a
-DIST glibc-2.3.2.tar.bz2 13377170 RMD160 3bedff29f64adc8037a821e23b48b0c7e0756e67 SHA1 e043e88d31891ca6dae9cd5b9e906ee1adbe8fc6 SHA256 f4c53b1aef2f622e5b70a94d33c318cc7fd6e074c11f4d36a5dfb7da5edff744
-DIST glibc-2.3.5-patches-1.16.tar.bz2 28401 RMD160 ef56df1c2ed60df01b027f805755463a834f3760 SHA1 bf72729c0b2c7deda2314e88d3b619d28a3d3b95 SHA256 371dfd8f8dfc90be4fdd8057fb58090119db95d26aa550ac1a7b3bcc828e754b
-DIST glibc-2.3.5.tar.bz2 13583139 RMD160 ebdda60cd848fd5b30b5e3345fb481d3c5663540 SHA1 465cb1f4708dfa88606379cc1ebecb724c65f027 SHA256 de97b9c15d75ac86b7a079a20315100a5c9833bb3c217b448913041a5bd988a5
-DIST glibc-2.3.6-patches-1.17.tar.bz2 215914 RMD160 2b1d1c63b3b8cd6105e9ad4675ee9565a89b8837 SHA1 6db16d3cda17b1979411eadf3b3a9c860c399b03 SHA256 5c09f3e3619281b7b533a6e564acefcdce159d665a06d011cc36e10978e1c9ca
-DIST glibc-2.3.6-patches-1.19.tar.bz2 216069 RMD160 1998c521c3799f5baa8cfa2510e2f127088cc5be SHA1 dd5e6fa4982b6b07430f2f83266019f17895dca8 SHA256 8aa924347c50bd721cc1dd8dc7b0c986136689346d4d78eaea4d9f15a4db2dea
-DIST glibc-2.3.6.tar.bz2 14014977 RMD160 04b4f71cc3e89581e02ee2dbf5ab05f61e868bf1 SHA1 82d0487419f1bdbf2dee439c344e89d6af47e558 SHA256 e73ff5eddea95d09238b41d3c9c4d9ccddcf99fcc93d04956599c91c704f4a8e
-DIST glibc-2.4-patches-1.19.tar.bz2 132880 RMD160 6df74db9b9e85220fba82658036ced5cdc16ae28 SHA1 b42dfd587fdf4df58c5f95853fc3dc4f8f51bee7 SHA256 9ec4cd3df3b8e7f294b3c93138d2f0fd7e8213b4981cfcc9cb58c25f934a23fa
-DIST glibc-2.4.tar.bz2 15202445 RMD160 ee2712a0e6fab8e086958c1f23221f8d07af3de1 SHA1 35c636e4b474cda0f06e361d5e9caec092fd73d3 SHA256 27aaaaa78b4ab5da76bb29385dc9be087ba7b855a9102eaaa78ce3ec5e2e7fcd
-DIST glibc-2.5-patches-1.6.tar.bz2 533385 RMD160 4568b467d225b9fc3b5f6cdb93418264271b5150 SHA1 7a8d7826b48219420f6070f763040a1a187de3cc SHA256 11cc15bcdf416f2ecfbee8b444c3485d59a368f02c3a5f7589fe579e12bc5fbe
-DIST glibc-2.5-patches-1.7.tar.bz2 535578 RMD160 090764d7267ab1023486d423fbaa00809597bcfd SHA1 718a27f6c9a9de95fa70a54af3bd33621ca7d8a2 SHA256 1f56ee67b56ffa57f3f15aeb75dd6b663187a1ec7958fc323de5d0c51347146c
DIST glibc-2.5-patches-1.8.tar.bz2 493626 RMD160 925758819ac682dcbcb38a1f3522cff6f3581e5b SHA1 ef09fd0ef5c609ac86c6cef23f377476d4c92fc7 SHA256 d71810e9e25a131633a5681b4a632f09caf4957451ee67f0514b7264314eeb84
DIST glibc-2.5.1-patches-1.0.tar.bz2 533092 RMD160 1081874bfba24d7e04c225a6ec3e7e7c18bb006e SHA1 969d32580ffa845f3411a043bbd498378f348842 SHA256 d54847e35b1533ac5eee0dac36cc358b75cdb85e90fa589cf4270e69338197b0
DIST glibc-2.5.1.tar.bz2 15421428 RMD160 06d234a70a240f9e344c36b6a9789019ca0bf571 SHA1 2b7da136df025bb8c787be3351cba58374226d9c SHA256 a29e0d149816364820512f71b9c9ebd0f8a148fbeaac42b79e2c342532e5bf8e
DIST glibc-2.5.tar.bz2 15321839 RMD160 25a0a460c0db1e5b7c570e5087461696f2096fd2 SHA1 ec9a007c4875062099a4701ac9137fcdb5a71447 SHA256 9b2e12bb1eafb55ab2e5a868532b8e6ec39216c66c25b8998d7474bc4d4eb529
-DIST glibc-2.6-patches-1.6.tar.bz2 90833 RMD160 27c026a10c9dcda00458f310d0c0085563ebb6d2 SHA1 439b1d4df8696ad51a850177852bf0882f96144d SHA256 34a864177b9d2cfb9021bf76ad373df5db1f2faec9828239d70a7305bf05a2ce
DIST glibc-2.6.1-patches-1.2.tar.bz2 89639 RMD160 6a5b91d73eecbed3a867ffc19272efcb82f20a54 SHA1 3d562945a61ca9b6854c6436ca9c68355af8671e SHA256 218b8491d6f0a3e550514fab5e6db60ab9a031f00e71ec3b9e7f5db5eacbc44c
DIST glibc-2.6.1.tar.bz2 15767401 RMD160 a58226e394780a6996d608febf5881134990919e SHA1 85573fee8d79180165e9466a1fc25133b5792190 SHA256 3ded3a3c3ba2cf02d72479a5cc0829c7c261a9d0934e49a79233de9fa276ec22
-DIST glibc-2.6.tar.bz2 15637436 RMD160 9f201f54d41941df299ab88722f4095dd417a5e4 SHA1 33a7d9aab6f0a76161d59341273e46d9aae8fc01 SHA256 f773ae5762c193091df46244ce355e38d358e8f8be088be0dbf934a193063bba
DIST glibc-2.7-patches-1.7.tar.bz2 97989 RMD160 f0404ab12f8ed7d6a42449e4366bc5555894fefb SHA1 b0e7b27fadb3c53069bb5568b93e833c0783f9d3 SHA256 4f71345bc2ef73975f921a5bdbc4841e8911a36fec7edc17f1e758a9688a7153
DIST glibc-2.7.tar.bz2 15976860 RMD160 c5c0b5a611d26956c46a289478b3349cea2ebf72 SHA1 ccc70e95db826e4b1fd3b484154402fdc3df88f7 SHA256 4224a522ac4ee0fd89eb337e7505e280dfb05e2fe1ad44339ba8874081c0451a
DIST glibc-2.8-20080602.tar.bz2 16235726 RMD160 8781f2b1dbd22c6579208a689be38a444b5242c7 SHA1 68c2bfcf5f385449c3cb7efbf1f0d425d14cdaad SHA256 142eaba19eb85121206ee034fd828ca5dcd1bf2bfa940fef92c37457c06a6d48
-DIST glibc-2.8-patches-3.tar.bz2 90849 RMD160 18d5b1abbe8f9f16978fa4f6cf648fccc2fe9fbe SHA1 4237bbd8a34211d5ea28d1b84e9d042e5d2e17d2 SHA256 22196b2c516a01ea7990752c58bcc7a9fff7e1be59161e157dd25a8eea63620c
DIST glibc-2.8-patches-6.tar.bz2 103171 RMD160 c6a9710e53fa6b3698aea1a5f0a497155cf2a1c5 SHA1 39fe516a150621fc34418e23ac1c38cb1f7c1406 SHA256 dc335095de83ff4ff405c9aaf5b3ee3d82148888c73b31081ae1c706510973c2
DIST glibc-2.8-ports-20080602.tar.bz2 469234 RMD160 57ae79a79c6f82f5ff217e9052f4569c136dca7d SHA1 c3a45ea27c9eb1bf99f1caafe085b50951089384 SHA256 1f3665e80b5832f7d281c109bc2f5412521cc9ccc3bd7b499fd493ff5eb9aa9b
DIST glibc-2.9-20081201.tar.bz2 16430489 RMD160 1e1feb4ee9c0892a0544c05adb6dd249544621cf SHA1 5756ca3b543a370c4ec9ffc8038b72bf0aa61c71 SHA256 6f8e515775e20ed48610860d10315adda418a3649b3465f36ee5cd467364a8f6
-DIST glibc-2.9-patches-1.tar.bz2 90506 RMD160 af77324b9ed996b5a810b47adc1ccafd8db8e866 SHA1 c0b379263591aeed7a37ed14cbf7afad092eaf59 SHA256 aa83340b5cdfb16f4605ec00f3b7cc6358167d0261b2b455351933aaf9e215a7
-DIST glibc-2.9-patches-2.tar.bz2 95889 RMD160 ec322f454862cacfdc6cc2a55da4e18a9b78b09a SHA1 df9beb6254767d1348537d004bd77f001985f95c SHA256 a2706c2562798b72a0b13ab4bf486b2a2f60afe2e83ea1302a925d34886d9d5f
DIST glibc-2.9-patches-5.tar.bz2 101693 RMD160 8cd377be020bf95a30862d77c215c16dc544602f SHA1 103839660f4e55871bf68835f8fec83d9afecdec SHA256 6f61c3e212c82eb118780573ac80d61835ff3a98fbea68b6f03a52009cce7d35
DIST glibc-2.9-patches-7.tar.bz2 106373 RMD160 06fcd1e07521942e3edb822719e398a5a45a0bf7 SHA1 a3c63e638b99a5b4422cc0ee54c0f75e62b59662 SHA256 165d7d9babd332b115ea7e72f879ffab6ee897b761aa052f1b409a028a731b53
DIST glibc-2.9-ports-20081201.tar.bz2 487663 RMD160 80eb0035ed2e021e79755d4151ccd6d73cd78d8d SHA1 90a6ecbce37aabe6093c4dd0c8817cbf86321627 SHA256 19bb6e89855171d7ae01aef92054dfe4524521fbc13c67bfaa3ee81944210744
-DIST glibc-fedora-20041219T2331.tar.bz2 761998 RMD160 cfc859a7e0a904cfb340c832267d3377e850cf6e SHA1 31e10b882bb9288831e1a1b2ed0ddece7099ffbd SHA256 e36ffa84388ebb746cb80c37d6fd1acc9e45e07b85c30b0a2ad9f511fae59cec
-DIST glibc-infopages-2.3.5.tar.bz2 1273846 RMD160 14a587e5df98ad113fa1499d2a958efbb47c437a SHA1 bb974b6dacd02161532717a9d8f97248acd6da14 SHA256 79a602955e3cf4288fa9967240b397281594acab18c263d2ef864e7d71aa54e1
-DIST glibc-infopages-2.3.6.tar.bz2 1298413 RMD160 5a83ca63c4153e5677797c0c0043aec0b55a6fe3 SHA1 8812dc121d24aad022e2aa4289dc75380e325d90 SHA256 651701bb5d8431401fa0f2252ad1cd37f69dc3a2aa28e4ce3405b4417b5e2c22
DIST glibc-libidn-2.10.1.tar.bz2 102248 RMD160 0fbb3ecc09f59f0b9e90e0669bd9cd6075164173 SHA1 50c1ac0d9ddff6eb83f75aa1c4cb84ba6fffa0cd SHA256 0fa72d1dd06a30642d3bb20a659f4ed0f4af54a205d7102896b68169b38676dc
-DIST glibc-libidn-2.3.5.tar.bz2 101118 RMD160 d54fd0351a4e0dc2c2ea1211bc94b04872addc48 SHA1 971638c53302ad4183cd79efb20ebf10e64b64ba SHA256 8e06f030b5980a285a33a2b2c0783c36afbf614d5d5925358112d288479275ec
-DIST glibc-libidn-2.3.6.tar.bz2 101041 RMD160 7bc8e8fa310d2ae543802ea036c036c60d09270d SHA1 95d3a98495d4bd7138149fd312db88da56e735db SHA256 99a20232c1ad994e8a6dcd15c34e413eed94e7dd558bed7b832649dce09fb4f2
-DIST glibc-libidn-2.4.tar.bz2 102305 RMD160 76b2e15e7613c4ac8db3bf90e90929c0e369ab04 SHA1 09981bb5f15812caa5824b3946b30cf030afc255 SHA256 2f29ec2b2b2f75f787a1eed8fdea20aff212dc3bad97651ca376914c49181977
DIST glibc-libidn-2.5.1.tar.bz2 102290 RMD160 683d557160b28a2369c9dd53ab36367e6641b6bb SHA1 6323f3533f734e8338fd21f9c878b870d6f79fdf SHA256 800e2b35443ffff200970df6d35a7afc2eb6e75c88a8074391867545e46d9f2e
DIST glibc-libidn-2.5.tar.bz2 102330 RMD160 e10e85e0ee7cdab2e5518a93978cb688ccabee88 SHA1 ee7e019e01aa338e28db1eeb34abb2cb09d2f30a SHA256 de77e49e0beee6061d4c6e480f322566ba25d4e5e018c456a18ea4a8da5c0ede
DIST glibc-libidn-2.6.1.tar.bz2 102319 RMD160 20b86f6c40365084898916fe614b210a7b0ec2e7 SHA1 5440648e71078ecb179c4501b5f6717b54294945 SHA256 67c98ca1299f5f25eaece256d033e0e63bcf6876b920ca62a1fe61ac62c5c451
-DIST glibc-libidn-2.6.tar.bz2 101974 RMD160 f4ee5fff7ff2c500c08e47390b88f77898314cf4 SHA1 a23fa4c6b9dd6e4413b43cd21c803039f7de3719 SHA256 25adf6cf0de727bf02978192baddf8cbc77adfbacf15e1428163fbeb267b1862
DIST glibc-libidn-2.7.tar.bz2 101939 RMD160 17a9692cc59d9f41d6b9fcd68f283f401e206483 SHA1 2338cc9b5795f5e97a19aac6d7d00ab750e81ac3 SHA256 07de78810a5320d696792b67131c4cf3d6654aee015a6b74820d66fb00799000
DIST glibc-linuxthreads-2.2.5.tar.bz2 168269 RMD160 4886cb3ccd1a05c48dafb2565b08835551033ecb SHA1 bb0137b2d80641c3caaba37571cebbbc5945e5a7 SHA256 c3d0fa7aa579537afb5087e058a9748db9ab0ffe5fdcf4330224e19c35c05cf5
-DIST glibc-linuxthreads-2.3.2.tar.bz2 216310 RMD160 9be07e5896f5e4e728bdbbebb00d78d8cf3ca5d3 SHA1 4676b3a59ec1c1f77be7669409aa835ad66f03d7 SHA256 529b34d1f859801b91b889a47feb4ba3cd4560ecb1dd9782486bc9198f7d3999
-DIST glibc-linuxthreads-2.3.5.tar.bz2 236946 RMD160 b86afc7e2359165704d09c4c3b0d84826c636890 SHA1 bfc44a76a708f905fe9c414162d5efcd3d47355f SHA256 3fec798bb944c2f89f1d95ec7bb38f60e1393c9db0da6bdbb922606e023108b5
-DIST glibc-linuxthreads-2.3.6.tar.bz2 243534 RMD160 bb89ac687419cede738314923bc952d191d8d252 SHA1 10190168bf948556afdfff46f87f9208402d810f SHA256 6c3bc4a247d1e5308fb14f81956802f09095d3683219859fcad5795aa3aea638
DIST glibc-linuxthreads-2.5.tar.bz2 242445 RMD160 788484d035d53ac39aac18f6e3409a912eea1cfa SHA1 eb7765e5c0a14c7475f1c8b92cbe1f625a8fd76f SHA256 ee27aeba6124a8b351c720eb898917f0f8874d9a384cc2f17aa111a3d679bd2c
-DIST glibc-linuxthreads-20060605.tar.bz2 247200 RMD160 aaa0a150eec4d63787f86ae04ded4d92a10c6f29 SHA1 1e0cf861de45f22d01d7d305482bacb0a869262f SHA256 1d15e236926fff6daa81e6af34e7903206b67f849f828ca976ab077b4677fb52
-DIST glibc-manpages-2.3.5.tar.bz2 22148 RMD160 ecd70af5f77deaa15a1f97df5c9ba6151e988d86 SHA1 a2872baf7c3123e8d4615a18b38104b84bbc5aca SHA256 b49a5cf3996e2671bc8246c9a077016b7d74cdbb8a4f6a6410247fcbe34d2b5a
-DIST glibc-manpages-2.3.6-1.tar.bz2 22216 RMD160 a69fc155366d1b263acecd026718dc536c2b12b8 SHA1 10b7914a57f6510354b8d325d6ae18ff3547ba79 SHA256 2ba9c7fff2f02f888160dbadd013356fe4a6e9f3d71ac583f5ba6a1d73cb2ab6
DIST glibc-ports-2.10.1.tar.bz2 584860 RMD160 1f094d4df18306ccb01037d07f0a0e3014fdfc60 SHA1 3cc9eff22d624c5fb6d951bbcb31b40112238fe7 SHA256 b1f1ec9720036a3a33598b8478eef102535444a083d5b5813a6981ed74ab4071
DIST glibc-ports-2.11.tar.bz2 599606 RMD160 e7262cb903b42d27bd0666fb170d2abb4c8b478f SHA1 76a0513c74b80e34f81abcaabbc538fa0f33b6a4 SHA256 38d212b1a22ed121c97f2827e7357e3e077084635ebc197246993d328b1b6589
-DIST glibc-ports-2.4.tar.bz2 381472 RMD160 72987098f9fbd5a1ad617bf2136081c0db80a429 SHA1 8b4d93bfbcd5b6a36e09ff08fe0c2a08adc1b886 SHA256 2fbbcaad8a9f8560485c398a9066959fe2713c8bc7e653ec476fb56fed21d19a
DIST glibc-ports-2.5.tar.bz2 409372 RMD160 e7e29df135a5f0f72760d10e5ad46de038e40725 SHA1 7da6257e641759ed29c4d316700fce6f604bc812 SHA256 80c38a005325e7539012bd665fb8e06af9ee9bfc74efb236ebff121265bfd463
DIST glibc-ports-2.6.1.tar.bz2 431292 RMD160 aa6ba7bc58932c81416c3407a8dd0b5e61f5454a SHA1 f620103c8b02ced80a425c79691573f949bf5d6b SHA256 d094028bc6d6691f56b4efeff7cd7e1c7ca10733e0cb5efc36e8fb08d8324bf1
-DIST glibc-ports-2.6.tar.bz2 431332 RMD160 275a10d95b5fa34a7c37469468eddbca928fa225 SHA1 ebc15149c8f6f492256cfab585f969a222e2f396 SHA256 398f56ad651939110ad6af88fdd3e92b5cb0583e6f612f2f12ba0134a22b1fac
DIST glibc-ports-2.7.tar.bz2 435392 RMD160 b9b96b357a394f29d5617aaa26a2c000bcf88874 SHA1 2186eac2248f1dd604f20a9dc8215ce12319d273 SHA256 3e481996259af87c3581da23481970a27de679e3c87cfa9a5a59751cd20c7b44
-DIST glibc-powerpc-cpu-addon-v0.01.tgz 22422 RMD160 3483c94ec55819b36aa66fc60462317f8d15e4df SHA1 fd30cde7c7cb42baa2c8fa1ac88eeeeb509cac29 SHA256 0ffa9a432fffb9bfed99c529b631a27534ba848c7ec1d707732338b73a4a8ce9
EBUILD glibc-2.10.1-r1.ebuild 8157 RMD160 ae3f13e36c71f3b3896b53ed2b9cb692ebf91a1c SHA1 679636da152484c64a5735ee80ef890c49c9532c SHA256 1786d44b2aebbaf9248b09ed2116a14a14cc2692eeec32b07fe6d387863df9a6
EBUILD glibc-2.10.1.ebuild 8154 RMD160 c472e03f438a3a3978596c93af0754bec0cd1f1f SHA1 45ced2ece1e6a9be74557d88d866baa61db42d31 SHA256 251ad9eb32579f172d17f7413f5c329e0b6eead6130eef4960bc52ca0e333d04
EBUILD glibc-2.11-r1.ebuild 8303 RMD160 723c04eb5ef3d9f1b978f4317e20a22e3442ec0d SHA1 0a4509a9cac8dd113513b3eab31839671ba36a55 SHA256 bd41d754728dacff4b7b24bb69d92afd74626af03734da62cc0998f01590139b
EBUILD glibc-2.11.ebuild 8284 RMD160 3efce41369d5a6091749a688449cb6988032bafa SHA1 52878745ad467b6dac9a26119a28100bbbc230e2 SHA256 eaca0fcca2a5999eb3bf3ca7868fe37c37a86f1e2daec8cd0076d23487d64904
EBUILD glibc-2.2.5-r10.ebuild 4847 RMD160 829dc6d11434ff2d8d202277595b0817b1a9ab28 SHA1 19523459701cabf750a777b17cbe0af34d4688dd SHA256 454a2b5d6201ab615f00c50987c7ac0328d22cc66db582851fcd27e2a967b17f
-EBUILD glibc-2.3.2-r12.ebuild 22127 RMD160 fc17469f16e734f60a6e46b2da1e377a92bb2bf0 SHA1 f4b179d87c5a9135cde1dba1dea53849c5c6d832 SHA256 023828d486f47ba352000b0c660256f284b1af9ad5f676fcbcea73c48a14d961
-EBUILD glibc-2.3.5-r3.ebuild 39061 RMD160 8d7c8d7c847aec8710f7819be01bf151da62bf18 SHA1 1c1efd41dc3c0c96cf3191e9a162d096a279f4cb SHA256 9c646b77063058446def0f41f1463da53553b7934499a3e490036a5b4a9a78cf
-EBUILD glibc-2.3.6-r4.ebuild 37423 RMD160 c5a812ac5395ed36e76e8fd8cf831f30338da56e SHA1 a45279238e691c0eb586344f7b4e77209714969a SHA256 82b8f141b5ec2b374876b955337296e5bfb833897ce9ec15f92b35c905545128
-EBUILD glibc-2.3.6-r5.ebuild 37752 RMD160 499729a76510846a45c400a67417e3de8e01164d SHA1 bb31a8e7e007d0fe728f6473106ea9c263fe5a83 SHA256 5044e4da01b89faf5dccb10546622148c03f431d2e7f7193f50e66dab22bf0e0
-EBUILD glibc-2.4-r4.ebuild 39211 RMD160 31481bcd9b8e24c4c412c577c54d44f431c5b35e SHA1 3f69d2da08d52613de44badaa15a4e1ddd755232 SHA256 33e9ceef407102afcd60693d2cf6fb16fb6b2cd9e97dcda1675610715aad0c0f
-EBUILD glibc-2.5-r2.ebuild 38681 RMD160 aac5e7b34905ba95c60c8b2c9cc852f82461715e SHA1 3b13a2e443722fe491c4cadd5a42daf7c7162b11 SHA256 79b787edbfa836f55a3015abb4b63a0a6e4425b341a7d7c17eb00058aadfdf20
-EBUILD glibc-2.5-r3.ebuild 38681 RMD160 857b472863854129c53305321879ff0eb700016f SHA1 1ceae3643e49fe09b6ba895d2cc2d7da197906f3 SHA256 855b9afc56801b7c22ac43ae7c79ab109ef4f3723002e27b5dc7fc376841ea64
EBUILD glibc-2.5-r4.ebuild 38681 RMD160 a41458b91a4f3af1d05dccf6d8025666ba87cc26 SHA1 bccdbb4e7e382844f6ffbf4228b389ebb11f9b23 SHA256 65123c476e732daf32917578c078ca1e89ed64b2891ff5270fbd6bce2899f3d0
EBUILD glibc-2.5.1.ebuild 38757 RMD160 5d6b25977ab8998b2135babb8194a21bd553bfa8 SHA1 c3662dfbab1a9dbb3c3107d61328ca8abc97f71d SHA256 56033b5927da0715158b1bce5769da9ac0ff00ce76d7de0a08bd8a60ac74a775
EBUILD glibc-2.6.1.ebuild 12433 RMD160 1470db9c694981e33c0d82e414ea6e85586001f4 SHA1 4f1d283713038df1d682f774f1e879ce94b48c2f SHA256 5e14ac3cb708c84a438fc21c8d5e623ed8a62765eded56607d57b42c1a06c263
-EBUILD glibc-2.6.ebuild 39508 RMD160 a5ed32701700b9a47e518fc21b7288f4ae27c615 SHA1 45c6b88b53b4f0f4268761a85b6b44c7142fd6f9 SHA256 5e2310d6c7119f228919c291615a395adc0192d1cc94a10afed5dbae46ff4191
EBUILD glibc-2.7-r2.ebuild 12942 RMD160 0b451bf4a43264029c663f309af95d5a0f34d41f SHA1 d816710c5b39cd5565593e916058defe80e7fd7e SHA256 c19bd29a3e7f20cd3c4e5d79ebf1081e88974225f642110ff9ff2cd75e49c35e
EBUILD glibc-2.8_p20080602-r1.ebuild 13485 RMD160 ea0806247d4ae3107b2d544dca55c164cb5271aa SHA1 20e6d2aa522e0421c4f5488d5f24ea34ce02d8b4 SHA256 532211b5b7a177bbcb8ba5a8b01523a9aae8d631a50f4dd7b1a5722a8e375f24
-EBUILD glibc-2.8_p20080602.ebuild 13590 RMD160 2b60f9a92edbadde475304073f38e655c8b02645 SHA1 7b2ba9cc7ff8ef7c1c17a1c480ba03ce5869d950 SHA256 70adfb08bbd94f7e34ab0588e749e18f3d9b0b0c70ab15beda849ea7bf11f847
-EBUILD glibc-2.9_p20081201-r1.ebuild 13675 RMD160 d3a1cf97bab777ed57d4ff43c8d466831439b785 SHA1 87eafc20ce3d6d6581a949c3339a4308c3da99c9 SHA256 5db02e1933417e655fe2620b551b5f58ab29cb339bc2f9ee03b70e8890db2d00
EBUILD glibc-2.9_p20081201-r2.ebuild 7771 RMD160 5e96c32ef0f330934755c3433caaff17f241e312 SHA1 9d0e2e13d4938657261f1c3a9e6d3c1b22deeb14 SHA256 1b7e3be124753462d7c4dad169e91ceb66341da86acac8c7789a3c1caf0d65d8
EBUILD glibc-2.9_p20081201-r3.ebuild 7803 RMD160 0ace363c7469985ef16fead41d6de975f221eda4 SHA1 3ea87286571e84036d7c231dd08a6836beece136 SHA256 55dd46fb4003aa70a554a0072f7550effef28f0ac13a12fefcbb26989465ca4c
-EBUILD glibc-2.9_p20081201.ebuild 13486 RMD160 1e16cc2c9a1cca291682b8b9379cf6d3572fea7f SHA1 da3bcd872981792336856891fb068062082918a5 SHA256 061e0973117e130158562f544faec74faf1989950cdfb4a88452b9cfaa6650a1
MISC ChangeLog 123231 RMD160 ebaa2b515009c35268c182cb9ec94a058e8085e0 SHA1 4536c6a0f5c2529a9c79a66bf1c5b88ec8721777 SHA256 2b1c83e4ea4a07ff7f572db3f365178abeb3af34a0beeb42150764a41d7e9442
MISC metadata.xml 1112 RMD160 1aa9770356149948593ebe35a1bd3940dd72fca2 SHA1 40514cc45c26bab671d78aa1567441bf72b0c6cc SHA256 4acea698dc4f66c17f4f3f81b28cd6b32f5425fd49f380df4a016489f786b1f5
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.13 (GNU/Linux)
-iEYEARECAAYFAksgT5YACgkQlPl3HsVfCDom6ACcDKqPymeu/MO/6eaDbSsp6z/f
-A2wAn21owghh9TBrZ/+hNhYPZjBRUTT2
-=keG+
+iEYEARECAAYFAksmT4gACgkQlPl3HsVfCDr3LACfUGVpZqGfIkqgSGzIhn8eCovx
+eSYAn0nYMhAPjeCnY0PvEztrfJu6Kcol
+=59bn
-----END PGP SIGNATURE-----
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat-v3.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat-v3.patch
deleted file mode 100644
index edf03e901307..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-ctype-compat-v3.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- glibc-2.3.1/ctype/ctype-info.c.orig 2002-11-07 15:58:39.000000000 +0200
-+++ glibc-2.3.1/ctype/ctype-info.c 2002-11-07 16:01:24.000000000 +0200
-@@ -48,6 +48,7 @@
-
- #define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
-
-+#if 0
- const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
- const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
- const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
-@@ -61,5 +62,23 @@
- compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
- compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
- compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
-+#endif
-
- #endif
-+
-+/* Temporarily exported until all .a libraries are recompiled. */
-+#undef b
-+#define b(t,x,o) (((const t *) _nl_C_LC_CTYPE_##x) + o)
-+
-+extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
-+extern const char _nl_C_LC_CTYPE_class32[] attribute_hidden;
-+extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
-+extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden;
-+
-+const unsigned short int *__ctype_b = b (unsigned short int, class, 128);
-+const __uint32_t *__ctype32_b = b (__uint32_t, class32, 0);
-+const __int32_t *__ctype_tolower = b (__int32_t, tolower, 128);
-+const __int32_t *__ctype_toupper = b (__int32_t, toupper, 128);
-+const __uint32_t *__ctype32_tolower = b (__uint32_t, tolower, 128);
-+const __uint32_t *__ctype32_toupper = b (__uint32_t, toupper, 128);
-+
---- glibc-2.3.1/locale/lc-ctype.c.orig 2002-12-30 11:43:39.000000000 +0200
-+++ glibc-2.3.1/locale/lc-ctype.c 2002-12-30 11:48:22.000000000 +0200
-@@ -75,6 +75,7 @@
- We need those relocations so that a versioned definition with a COPY
- reloc in an executable will override the libc.so definition. */
-
-+#if 0
- compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
- compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
- compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
-@@ -89,4 +90,21 @@
- __ctype32_toupper = current (uint32_t, TOUPPER32, 0);
- __ctype32_tolower = current (uint32_t, TOLOWER32, 0);
- #endif
-+
-+#endif
-+
-+ /* Temporary. */
-+ extern __const unsigned short int *__ctype_b; /* Characteristics. */
-+ extern __const __int32_t *__ctype_tolower; /* Case conversions. */
-+ extern __const __int32_t *__ctype_toupper; /* Case conversions. */
-+ extern const uint32_t *__ctype32_b;
-+ extern const uint32_t *__ctype32_toupper;
-+ extern const uint32_t *__ctype32_tolower;
-+
-+ __ctype_b = current (uint16_t, CLASS, 128);
-+ __ctype_toupper = current (uint32_t, TOUPPER, 128);
-+ __ctype_tolower = current (uint32_t, TOLOWER, 128);
-+ __ctype32_b = current (uint32_t, CLASS32, 0);
-+ __ctype32_toupper = current (uint32_t, TOUPPER32, 0);
-+ __ctype32_tolower = current (uint32_t, TOLOWER32, 0);
- }
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-fpu-cw-mips.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-fpu-cw-mips.patch
deleted file mode 100644
index 392b11648c72..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-fpu-cw-mips.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -u -r1.6 fpu_control.h
---- libc/sysdeps/mips/fpu_control.h 6 Jul 2001 04:56:00 -0000 1.6
-+++ libc/sysdeps/mips/fpu_control.h 19 Oct 2002 16:03:35 -0000
-@@ -74,7 +74,7 @@
- #define _FPU_RC_UP 0x2
- #define _FPU_RC_DOWN 0x3
-
--#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */
-+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */
-
-
- /* The fdlibm code requires strict IEEE double precision arithmetic,
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-libc_wait-compat.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-libc_wait-compat.patch
deleted file mode 100644
index d6f8bf51ab7b..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-libc_wait-compat.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- glibc-20020408/posix/Versions.bak 2002-02-04 12:42:40.000000000 +0100
-+++ glibc-20020408/posix/Versions 2002-04-19 01:01:00.000000000 +0200
-@@ -3,6 +3,9 @@
- # functions with special/multiple interfaces
- __bsd_getpgrp; __setpgid; __getpgid;
-
-+ # This will be GLIBC_PRIVATE, just give Sun JDK some time to catch up
-+ __libc_wait; __libc_waitpid;
-+
- # functions with required interface outside normal name space
- _exit;
-
-@@ -83,6 +86,9 @@
- GLIBC_2.1.2 {
- # functions used in other libraries
- __vfork;
-+
-+ # This will be GLIBC_PRIVATE, just give wine some time to catch up
-+ __libc_fork;
- }
- GLIBC_2.2 {
- # p*
-@@ -109,6 +115,7 @@
- GLIBC_PRIVATE {
- # functions which have an additional interface since they are
- # are cancelable.
-- __libc_wait; __libc_waitpid; __libc_pause; __libc_nanosleep; __libc_fork;
-+ # __libc_wait; __libc_waitpid;
-+ __libc_pause; __libc_nanosleep; # __libc_fork;
- __libc_pread; __libc_pread64; __libc_pwrite; __libc_pwrite64;
- __waitid; __pselect;
- }
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-libgcc-compat-mips.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-libgcc-compat-mips.patch
deleted file mode 100644
index cc8fabbb89cb..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-libgcc-compat-mips.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-# DP: Description: libgcc-compat symbols for mips
-# DP: Author: Guido Guenther
-# DP: thanks to Jack Howarth for explanations and help
-# DP: Upstream status: Not submitted
-# DP: Date: 2002-10-13, updated 2002-10-20
-
---- libc/sysdeps/mips/Makefile.orig Sun Oct 13 14:45:56 2002
-+++ libc/sysdeps/mips/Makefile Sun Oct 13 14:51:20 2002
-@@ -6,3 +6,15 @@
- ifeq ($(subdir),setjmp)
- sysdep_routines += setjmp_aux
- endif
-+
-+ifeq ($(subdir),csu)
-+ifeq (yes,$(build-shared))
-+# Compatibility
-+ifeq (yes,$(have-protected))
-+CPPFLAGS-divdi3.c = -DHAVE_DOT_HIDDEN
-+CPPFLAGS-libgcc-compat.c = -DHAVE_DOT_HIDDEN
-+endif
-+sysdep_routines += libgcc-compat
-+shared-only-routines += libgcc-compat
-+endif
-+endif
---- libc/sysdeps/mips/Dist.orig Sun Oct 13 15:07:31 2002
-+++ libc/sysdeps/mips/Dist Sun Oct 13 15:07:41 2002
-@@ -1,3 +1,5 @@
-+divdi3.c
-+libgcc-compat.c
- setjmp_aux.c
- regdef.h
- sgidefs.h
---- /dev/null Sat Mar 16 18:32:44 2002
-+++ libc/sysdeps/mips/divdi3.c Sun Oct 13 14:44:34 2002
-@@ -0,0 +1,43 @@
-+/* 64-bit multiplication and division libgcc routines for 32-bit mips
-+ Copyright (C) 2002 Free Software 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. */
-+
-+#define _DIVDI3_C
-+#include <sysdeps/wordsize-32/divdi3.c>
-+
-+INTDEF (__udivdi3);
-+INTDEF (__moddi3);
-+INTDEF (__umoddi3);
-+
-+#ifdef HAVE_DOT_HIDDEN
-+asm (".hidden __divdi3");
-+asm (".hidden __udivdi3");
-+asm (".hidden __moddi3");
-+asm (".hidden __umoddi3");
-+#endif
-+
-+#include <shlib-compat.h>
-+
-+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
-+
-+symbol_version (INTUSE (__divdi3), __divdi3, GLIBC_2.0);
-+symbol_version (INTUSE (__udivdi3), __udivdi3, GLIBC_2.0);
-+symbol_version (INTUSE (__moddi3), __moddi3, GLIBC_2.0);
-+symbol_version (INTUSE (__umoddi3), __umoddi3, GLIBC_2.0);
-+
-+#endif
---- /dev/null Sat Mar 16 18:32:44 2002
-+++ libc/sysdeps/mips/libgcc-compat.c Sun Oct 20 17:11:59 2002
-@@ -0,0 +1,81 @@
-+/* pre-.hidden libgcc compatibility
-+ Copyright (C) 2002 Free Software 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. */
-+
-+
-+#include <stdint.h>
-+#include <shlib-compat.h>
-+
-+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
-+
-+extern int32_t __cmpdi2 (int64_t, int64_t);
-+int32_t __cmpdi2_internal (int64_t u, int64_t v)
-+{
-+ return __cmpdi2 (u, v);
-+}
-+symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
-+
-+
-+extern int32_t __ucmpdi2 (int64_t, int64_t);
-+int32_t __ucmpdi2_internal (int64_t u, int64_t v)
-+{
-+ return __ucmpdi2 (u, v);
-+}
-+symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
-+
-+
-+extern int64_t __fixdfdi (double);
-+int64_t __fixdfdi_internal (double d)
-+{
-+ return __fixdfdi (d);
-+}
-+symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
-+
-+
-+extern int64_t __fixsfdi (float);
-+int64_t __fixsfdi_internal (float d)
-+{
-+ return __fixsfdi (d);
-+}
-+symbol_version (__fixsfdi_internal, __fixsfdi, GLIBC_2.0);
-+
-+
-+extern int64_t __fixunsdfdi (double);
-+int64_t __fixunsdfdi_internal (double d)
-+{
-+ return __fixunsdfdi (d);
-+}
-+symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
-+
-+
-+extern double __floatdidf (int64_t);
-+double __floatdidf_internal (int64_t u)
-+{
-+ return __floatdidf (u);
-+}
-+symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
-+
-+
-+floatdisf (int64_t);
-+float __floatdisf_internal (int64_t u)
-+{
-+ return __floatdisf (u);
-+}
-+symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
-+
-+#endif
---- /dev/null Sat Mar 16 18:32:44 2002
-+++ libc/sysdeps/mips/Versions Sun Oct 20 17:12:00 2002
-@@ -0,0 +1,8 @@
-+libc {
-+ GLIBC_2.0 {
-+ # Functions from libgcc.
-+ __cmpdi2; __ucmpdi2;
-+ __divdi3; __moddi3; __udivdi3; __umoddi3;
-+ __fixdfdi; __fixsfdi; __fixunsdfdi; __floatdidf; __floatdisf;
-+ }
-+}
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-librt-mips.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-librt-mips.patch
deleted file mode 100644
index 08fcc2ac6864..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-librt-mips.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-# DP: add clock_{get,set}time@@GLIBC_2.0
-# DP: although it should actually be @@GLIBC_2.2
-
---- libc/sysdeps/unix/sysv/linux/mips/Versions.orig Tue Sep 24 15:56:55 2002
-+++ libc/sysdeps/unix/sysv/linux/mips/Versions Tue Sep 24 15:49:27 2002
-@@ -34,3 +34,9 @@
- _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
- }
- }
-+librt {
-+ GLIBC_2.0 {
-+ # c*
-+ clock_gettime; clock_settime;
-+ }
-+}
diff --git a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-stack_end-compat.patch b/sys-libs/glibc/files/2.3.1/glibc-2.3.1-stack_end-compat.patch
deleted file mode 100644
index ad68ed7c5d5b..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc-2.3.1-stack_end-compat.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- glibc-2.3.1/elf/Versions.orig 2002-11-07 17:04:54.000000000 +0200
-+++ glibc-2.3.1/elf/Versions 2002-11-07 17:06:56.000000000 +0200
-@@ -32,6 +32,10 @@
- _r_debug;
- }
- GLIBC_2.1 {
-+ # This will be GLIBC_PRIVATE, just to give folks some time
-+ # to fix their stuff
-+ __libc_stack_end;
-+
- # functions used in other libraries
- _dl_mcount;
- }
-@@ -41,7 +45,7 @@
- }
- GLIBC_PRIVATE {
- # Those are in the dynamic linker, but used by libc.so.
-- __libc_enable_secure; __libc_stack_end;
-+ __libc_enable_secure; # __libc_stack_end;
- _dl_argv; _dl_catch_error; _dl_check_map_versions;
- _dl_debug_printf; _dl_debug_state; _dl_dst_count;
- _dl_dst_substitute; _dl_init; _dl_lookup_symbol; _dl_lookup_symbol_skip;
diff --git a/sys-libs/glibc/files/2.3.1/glibc23-07-hppa-atomicity.dpatch b/sys-libs/glibc/files/2.3.1/glibc23-07-hppa-atomicity.dpatch
deleted file mode 100644
index ef7b556df18d..000000000000
--- a/sys-libs/glibc/files/2.3.1/glibc23-07-hppa-atomicity.dpatch
+++ /dev/null
@@ -1,81 +0,0 @@
-#! /bin/sh -e
-
-# DP: Description: atomicity.h placeholder for HPPA
-# DP: Author: Carlos O'Donell <carlos@baldric.uwo.ca>
-# DP: Upstream status: Not submitted upstream
-# DP: Status Details: --
-# DP: Date: November 16, 2002
-
-if [ $# -ne 2 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch -d "$2" -f --no-backup-if-mismatch -p1 < $0;;
- -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p1 < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-esac
-exit 0
-
-# append the patch here and adjust the -p? flag in the patch calls.
-diff -urN glibc-2.3.1.orig/sysdeps/hppa/atomicity.h glibc-2.3.1/sysdeps/hppa/atomicity.h
---- glibc-2.3.1.orig/sysdeps/hppa/atomicity.h 1969-12-31 19:00:00.000000000 -0500
-+++ glibc-2.3.1/sysdeps/hppa/atomicity.h 2002-11-07 08:35:55.000000000 -0500
-@@ -0,0 +1,55 @@
-+/* Low-level functions for atomic operations. HP-PARISC version.
-+ Copyright (C) 1997,2001 Free Software 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. */
-+
-+#ifndef _ATOMICITY_H
-+#define _ATOMICITY_H 1
-+
-+#include <inttypes.h>
-+
-+#warning stub atomicity functions are not atomic
-+#warning CAO This will get implemented soon
-+
-+static inline int
-+__attribute__ ((unused))
-+exchange_and_add (volatile uint32_t *mem, int val)
-+{
-+ int result = *mem;
-+ *mem += val;
-+ return result;
-+}
-+
-+static inline void
-+__attribute__ ((unused))
-+atomic_add (volatile uint32_t *mem, int val)
-+{
-+ *mem += val;
-+}
-+
-+static inline int
-+__attribute__ ((unused))
-+compare_and_swap (volatile long int *p, long int oldval, long int newval)
-+{
-+ if (*p != oldval)
-+ return 0;
-+
-+ *p = newval;
-+ return 1;
-+}
-+
-+#endif /* atomicity.h */
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-crti.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-crti.patch
deleted file mode 100644
index 2ec179099bb7..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-crti.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- glibc-2.3.2/linuxthreads/sysdeps/alpha/elf/pt-initfini.c.old 2003-11-01 17:55:51.000000000 -0500
-+++ glibc-2.3.2/linuxthreads/sysdeps/alpha/elf/pt-initfini.c 2003-11-01 20:17:04.000000000 -0500
-@@ -75,7 +75,6 @@
- subq $30, 16, $30 \n\
- stq $26, 0($30) \n\
- stq $29, 8($30) \n\
-- .prologue 1 \n\
- .align 3 \n\
- /*@_fini_PROLOG_ENDS*/ \n\
- \n\
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-pwrite.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-pwrite.patch
deleted file mode 100644
index ab563aae6e13..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-pwrite.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/syscalls.list.old 2003-11-01 19:21:19.000000000 -0500
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/alpha/syscalls.list 2003-11-01 19:21:25.000000000 -0500
-@@ -22,8 +22,8 @@
- llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
- lseek llseek -
- posix_fadvise64 - fadvise64 Vi:iiii posix_fadvise64 posix_fadvise
--pread - pread64 C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
--pwrite - pwrite64 C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
-+pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
-+pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
- fstatfs - fstatfs i:ip __fstatfs fstatfs __fstatfs64 fstatfs64
- statfs - statfs i:sp __statfs statfs statfs64
- getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-sysdeps.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-sysdeps.patch
deleted file mode 100644
index f03dac68ed75..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-alpha-sysdeps.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/alpha/sysdep.h,v
-retrieving revision 1.16
-retrieving revision 1.17
-diff -u -r1.16 -r1.17
---- libc/sysdeps/unix/sysv/linux/alpha/sysdep.h 2003/06/20 16:24:36 1.16
-+++ libc/sysdeps/unix/sysv/linux/alpha/sysdep.h 2004/03/23 23:31:47 1.17
-@@ -65,6 +65,16 @@
- # define __NR_semtimedop 423
- #endif
-
-+/* This is a kludge to make syscalls.list find these under the names
-+ pread and pwrite, since some kernel headers define those names
-+ and some define the *64 names for the same system calls. */
-+#if !defined __NR_pread && defined __NR_pread64
-+# define __NR_pread __NR_pread64
-+#endif
-+#if !defined __NR_pwrite && defined __NR_pwrite64
-+# define __NR_pwrite __NR_pwrite64
-+#endif
-+
- /*
- * In order to get the hidden arguments for rt_sigaction set up
- * properly, we need to call the assembly version. This shouldn't
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-amd64-nomultilib.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-amd64-nomultilib.patch
deleted file mode 100644
index 119c8bc15c00..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-amd64-nomultilib.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- sysdeps/unix/sysv/linux/configure.orig 2003-06-28 01:51:12.000000000 +0000
-+++ sysdeps/unix/sysv/linux/configure 2003-06-28 01:51:23.000000000 +0000
-@@ -224,7 +224,7 @@
- /usr | /usr/)
- # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
- case $machine in
-- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
-+ sparc/sparc64 | powerpc/powerpc64 | s390/s390-64 | \
- mips/mips64/n64/* )
- libc_cv_slibdir="/lib64"
- if test "$libdir" = '${exec_prefix}/lib'; then
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-arm-bus-defines.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-arm-bus-defines.patch
deleted file mode 100644
index f1f20224916f..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-arm-bus-defines.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- sysdeps/unix/sysv/linux/arm/ioperm.c.orig Tue Apr 27 00:30:01 2004
-+++ sysdeps/unix/sysv/linux/arm/ioperm.c Tue Apr 27 00:29:57 2004
-@@ -41,6 +41,8 @@
- #include <string.h>
- #include <unistd.h>
-
-+#include <linux/input.h>
-+
- #include <sys/types.h>
- #include <sys/mman.h>
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-armformat.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-armformat.patch
deleted file mode 100644
index a3d51c654f4d..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-armformat.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- glibc-2.3.2-200304020432/scripts/output-format.sed.armformat 2003-07-19 09:47:39.000000000 -0400
-+++ glibc-2.3.2-200304020432/scripts/output-format.sed 2003-07-19 09:48:00.000000000 -0400
-@@ -5,7 +5,7 @@
- }
- t o
- : o
--s/^.*OUTPUT_FORMAT(\([^,]*\), \1, \1).*$/OUTPUT_FORMAT(\1)/
-+s/^.*OUTPUT_FORMAT(\([^,]*\), .*, \1).*$/OUTPUT_FORMAT(\1)/
- t q
- s/^.*OUTPUT_FORMAT(\([^,]*\), \([^,]*\), \([^,]*\)).*$/\2,\3/
- t s
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-assert.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-assert.patch
deleted file mode 100644
index e779e99b1753..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-assert.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Index: assert/assert.h
-===================================================================
-RCS file: /cvs/glibc/libc/assert/assert.h,v
-retrieving revision 1.25
-retrieving revision 1.26
-diff -u -r1.25 -r1.26
---- assert/assert.h 15 Aug 2003 17:54:31 -0000 1.25
-+++ assert/assert.h 4 Oct 2004 07:45:23 -0000 1.26
-@@ -84,33 +84,16 @@
-
- __END_DECLS
-
--/* For the macro definition we use gcc's __builtin_expect if possible
-- to generate good code for the non-error case. gcc 3.0 is a good
-- enough estimate for when the feature became available. */
--# if __GNUC_PREREQ (3, 0)
--# define assert(expr) \
-- (__ASSERT_VOID_CAST (__builtin_expect (!!(expr), 1) ? 0 : \
-- (__assert_fail (__STRING(expr), __FILE__, __LINE__, \
-- __ASSERT_FUNCTION), 0)))
--# else
--# define assert(expr) \
-+# define assert(expr) \
- (__ASSERT_VOID_CAST ((expr) ? 0 : \
- (__assert_fail (__STRING(expr), __FILE__, __LINE__, \
- __ASSERT_FUNCTION), 0)))
--# endif
-
- # ifdef __USE_GNU
--# if __GNUC_PREREQ (3, 0)
--# define assert_perror(errnum) \
-- (__ASSERT_VOID_CAST (__builtin_expect (!(errnum), 1) ? 0 : \
-- (__assert_perror_fail ((errnum), __FILE__, __LINE__, \
-- __ASSERT_FUNCTION), 0)))
--# else
--# define assert_perror(errnum) \
-+# define assert_perror(errnum) \
- (__ASSERT_VOID_CAST (!(errnum) ? 0 : \
- (__assert_perror_fail ((errnum), __FILE__, __LINE__, \
- __ASSERT_FUNCTION), 0)))
--# endif
- # endif
-
- /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-cispeed-cospeed-fix.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-cispeed-cospeed-fix.patch
deleted file mode 100644
index a99f60cc6437..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-cispeed-cospeed-fix.patch
+++ /dev/null
@@ -1,67 +0,0 @@
---- glibc-2.3.2-200309061641/sysdeps/unix/sysv/linux/speed.c.orig Sat Sep 6 05:52:52 2003
-+++ glibc-2.3.2-200309061641/sysdeps/unix/sysv/linux/speed.c Wed Sep 10 21:50:15 2003
-@@ -66,8 +66,9 @@
- __set_errno (EINVAL);
- return -1;
- }
--
-+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
- termios_p->c_ospeed = speed;
-+#endif
- termios_p->c_cflag &= ~(CBAUD | CBAUDEX);
- termios_p->c_cflag |= speed;
-
-@@ -91,8 +92,9 @@
- __set_errno (EINVAL);
- return -1;
- }
--
-+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
- termios_p->c_ispeed = speed;
-+#endif
- if (speed == 0)
- termios_p->c_iflag |= IBAUD0;
- else
-diff -ur -x objdir glibc-2.3.2/sysdeps/unix/sysv/linux/tcgetattr.c glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcgetattr.c
---- glibc-2.3.2/sysdeps/unix/sysv/linux/tcgetattr.c 2003-09-10 12:41:08.000000000 -0400
-+++ glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcgetattr.c 2003-09-10 11:56:37.000000000 -0400
-@@ -45,16 +45,20 @@
- termios_p->c_cflag = k_termios.c_cflag;
- termios_p->c_lflag = k_termios.c_lflag;
- termios_p->c_line = k_termios.c_line;
-+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
- #ifdef _HAVE_C_ISPEED
- termios_p->c_ispeed = k_termios.c_ispeed;
- #else
- termios_p->c_ispeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
- #endif
-+#endif
-+#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
- #ifdef _HAVE_C_OSPEED
- termios_p->c_ospeed = k_termios.c_ospeed;
- #else
- termios_p->c_ospeed = k_termios.c_cflag & (CBAUD | CBAUDEX);
- #endif
-+#endif
- if (sizeof (cc_t) == 1 || _POSIX_VDISABLE == 0
- || (unsigned char) _POSIX_VDISABLE == (unsigned char) -1)
- memset (__mempcpy (&termios_p->c_cc[0], &k_termios.c_cc[0],
-diff -ur -x objdir glibc-2.3.2/sysdeps/unix/sysv/linux/tcsetattr.c glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcsetattr.c
---- glibc-2.3.2/sysdeps/unix/sysv/linux/tcsetattr.c 2003-09-10 12:41:08.000000000 -0400
-+++ glibc-2.3.2.work/sysdeps/unix/sysv/linux/tcsetattr.c 2003-09-10 11:56:42.000000000 -0400
-@@ -71,12 +71,16 @@
- k_termios.c_cflag = termios_p->c_cflag;
- k_termios.c_lflag = termios_p->c_lflag;
- k_termios.c_line = termios_p->c_line;
-+#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
- #ifdef _HAVE_C_ISPEED
- k_termios.c_ispeed = termios_p->c_ispeed;
- #endif
-+#endif
-+#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
- #ifdef _HAVE_C_OSPEED
- k_termios.c_ospeed = termios_p->c_ospeed;
- #endif
-+#endif
- memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
- __KERNEL_NCCS * sizeof (cc_t));
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-decc-compaq.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-decc-compaq.patch
deleted file mode 100644
index b0660b645473..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-decc-compaq.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff -ruN glibc-2.3.2.orig/include/features.h glibc-2.3.2/include/features.h
---- glibc-2.3.2.orig/include/features.h 2003-06-14 00:28:23.000000000 +0100
-+++ glibc-2.3.2/include/features.h 2003-06-14 00:58:57.000000000 +0100
-@@ -285,7 +285,8 @@
- #if defined __GNUC__ \
- || (defined __PGI && defined __i386__ ) \
- || (defined __INTEL_COMPILER && (defined __i386__ || defined __ia64__)) \
-- || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
-+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) \
-+ && !(defined(__DECC) || defined(__DECCXX))
- # define __GLIBC_HAVE_LONG_LONG 1
- #endif
-
-diff -ruN glibc-2.3.2.orig/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h glibc-2.3.2/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h
---- glibc-2.3.2.orig/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h 2003-06-14 00:28:24.000000000 +0100
-+++ glibc-2.3.2/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h 2003-06-14 00:57:16.000000000 +0100
-@@ -64,9 +64,11 @@
- {
- struct _pthread_fastlock __c_lock; /* Protect against concurrent access */
- _pthread_descr __c_waiting; /* Threads waiting on this condition */
-+#if !(defined(__DECC) || defined(__DECCXX)) /* hide this from DEC CC/CXX */
- char __padding[48 - sizeof (struct _pthread_fastlock)
- - sizeof (_pthread_descr) - sizeof (__pthread_cond_align_t)];
- __pthread_cond_align_t __align;
-+#endif /* __DECC */
- } pthread_cond_t;
-
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-dl-reloc-calc-fix.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-dl-reloc-calc-fix.patch
deleted file mode 100644
index f7456821f477..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-dl-reloc-calc-fix.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-===================================================================
-RCS file: /cvs/glibc/libc/elf/dl-reloc.c,v
-retrieving revision 1.82
-retrieving revision 1.83
-diff -u -r1.82 -r1.83
---- libc/elf/dl-reloc.c 2003/01/30 17:36:11 1.82
-+++ libc/elf/dl-reloc.c 2003/03/01 22:31:52 1.83
-@@ -44,23 +44,31 @@
- static void __attribute_noinline__
- allocate_static_tls (struct link_map *map)
- {
-- size_t offset = roundup (GL(dl_tls_static_used), map->l_tls_align);
-- if (offset + map->l_tls_blocksize
-+ size_t offset, used, check;
-+
- # if TLS_TCB_AT_TP
-- + TLS_TCB_SIZE
-+ offset = roundup (GL(dl_tls_static_used) + map->l_tls_blocksize,
-+ map->l_tls_align);
-+ used = offset;
-+ check = offset + TLS_TCB_SIZE;
- # elif TLS_DTV_AT_TP
-+ offset = roundup (GL(dl_tls_static_used), map->l_tls_align);
-+ used = offset + map->l_tls_blocksize;
-+ check = used;
- /* dl_tls_static_used includes the TCB at the beginning. */
- # else
- # error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"
- # endif
-- > GL(dl_tls_static_size))
-+
-+ if (check > GL(dl_tls_static_size))
- {
- const char *errstring = N_("\
- shared object cannot be dlopen()ed: static TLS memory too small");
- INTUSE(_dl_signal_error) (0, (map)->l_name, NULL, errstring);
- }
-+
- map->l_tls_offset = offset;
-- GL(dl_tls_static_used) = offset + map->l_tls_blocksize;
-+ GL(dl_tls_static_used) = used;
- }
- #endif
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-dl_execstack-PaX-support.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-dl_execstack-PaX-support.patch
deleted file mode 100644
index 4e081ef9c847..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-dl_execstack-PaX-support.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Index: sysdeps/unix/sysv/linux/dl-execstack.c
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/dl-execstack.c,v
-retrieving revision 1.3
-diff -u -p -r1.3 dl-execstack.c
---- sysdeps/unix/sysv/linux/dl-execstack.c 25 Sep 2003 23:04:12 -0000 1.3
-+++ sysdeps/unix/sysv/linux/dl-execstack.c 8 Nov 2003 00:34:33 -0000
-@@ -41,8 +41,11 @@ _dl_make_stack_executable (void)
- if (__mprotect ((void *) page, GL(dl_pagesize),
- PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) == 0)
- return 0;
-- if (errno != EINVAL)
-+ if (errno == EACCES) { /* PAX is enabled */
-+ return 0;
-+ } else if (errno != EINVAL) {
- return errno;
-+ }
- no_growsdown = true;
- }
- # endif
-@@ -64,8 +67,11 @@ _dl_make_stack_executable (void)
- page -= size;
- else
- {
-- if (errno != ENOMEM) /* Unexpected failure mode. */
-+ if (errno == EACCES) { /* PAX is enabled */
-+ return 0;
-+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
- return errno;
-+ }
-
- if (size == GL(dl_pagesize))
- /* We just tried to mprotect the top hole page and failed.
-@@ -92,8 +98,11 @@ _dl_make_stack_executable (void)
- if (__mprotect ((void *) page, GL(dl_pagesize),
- PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSUP) == 0)
- return 0;
-- if (errno != EINVAL)
-+ if (errno == EACCES) { /* PAX is enabled */
-+ return 0;
-+ } else if (errno != EINVAL) {
- return errno;
-+ }
- no_growsup = true;
- }
- # endif
-@@ -114,8 +123,11 @@ _dl_make_stack_executable (void)
- page += size;
- else
- {
-- if (errno != ENOMEM) /* Unexpected failure mode. */
-+ if (errno == EACCES) { /* PAX is enabled */
-+ return 0;
-+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
- return errno;
-+ }
-
- if (size == GL(dl_pagesize))
- /* We just tried to mprotect the lowest hole page and failed.
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-fix-omitted-operand-in-mathinline_h.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-fix-omitted-operand-in-mathinline_h.patch
deleted file mode 100644
index 6518ff2b5c26..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-fix-omitted-operand-in-mathinline_h.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-2000-05-22 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/i386/fpu/bits/mathinline.h (__expm1_code): Avoid using ?:
- with omitted middle operand.
-
---- libc/sysdeps/i386/fpu/bits/mathinline.h 4 Jun 2003 22:17:35 -0000 1.1.1.13
-+++ libc/sysdeps/i386/fpu/bits/mathinline.h 4 Jun 2003 22:22:36 -0000 1.11
-@@ -381,7 +381,8 @@ __sincosl (long double __x, long double
- ("fscale # 2^int(x * log2(e))\n\t" \
- : "=t" (__temp) : "0" (1.0), "u" (__exponent)); \
- __temp -= 1.0; \
-- return __temp + __value ?: __x
-+ __temp += __value; \
-+ return __temp ? __temp : __x
- __inline_mathcodeNP_ (long double, __expm1l, __x, __expm1_code)
-
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-framestate-USING_SJLJ_EXCEPTIONS.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-framestate-USING_SJLJ_EXCEPTIONS.patch
deleted file mode 100644
index 0c42b15c1777..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-framestate-USING_SJLJ_EXCEPTIONS.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- sysdeps/generic/framestate.c.orig Fri Apr 23 23:59:52 2004
-+++ sysdeps/generic/framestate.c Sat Apr 24 00:00:13 2004
-@@ -42,7 +42,11 @@
- if (handle == NULL
- || (frame_state_for
- = (framesf) __libc_dlsym (handle, "__frame_state_for")) == NULL)
-+#ifndef __USING_SJLJ_EXCEPTIONS__
- frame_state_for = fallback_frame_state_for;
-+#else
-+ frame_state_for = abort;
-+#endif
- }
-
- return frame_state_for (pc, frame_state);
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-frandom-detect.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-frandom-detect.patch
deleted file mode 100644
index f1dbe7be8a61..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-frandom-detect.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -Naur glibc-2.3.2-orig/config.h.in glibc-2.3.2/config.h.in
---- glibc-2.3.2-orig/config.h.in 2004-05-11 21:44:51.000000000 -0400
-+++ glibc-2.3.2/config.h.in 2004-05-11 22:41:34.903935791 -0400
-@@ -208,6 +208,9 @@
- /* Defined of libidn is available. */
- #undef HAVE_LIBIDN
-
-+/* Defined if economical random device is available. */
-+#undef HAVE_DEV_ERANDOM
-+
- /*
- */
-
-diff -Naur glibc-2.3.2-orig/configure.in glibc-2.3.2/configure.in
---- glibc-2.3.2-orig/configure.in 2004-05-11 21:44:51.000000000 -0400
-+++ glibc-2.3.2/configure.in 2004-05-11 22:32:57.999546229 -0400
-@@ -289,6 +289,13 @@
- [])
- AC_SUBST(all_warnings)
-
-+dnl See whether the user wants to disable checking for /dev/erandom
-+AC_ARG_ENABLE([dev-erandom],
-+ AC_HELP_STRING([--disable-dev-erandom],
-+ [disable testing for /dev/erandom]),
-+ [try_dev_erandom=$enableval],
-+ [try_dev_erandom=yes])
-+
- AC_CANONICAL_HOST
-
- # The way shlib-versions is used to generate soversions.mk uses a
-@@ -1911,6 +1918,21 @@
- sizeof_long_double=$ac_cv_sizeof_long_double
- AC_SUBST(sizeof_long_double)
-
-+dnl check whether we have an economical random device
-+if test "$try_dev_erandom" = yes ; then
-+ AC_CACHE_CHECK(for economical random device, ac_cv_have_dev_random,
-+ [if test -r "/dev/erandom" ; then
-+ ac_cv_have_dev_erandom=yes; else ac_cv_have_dev_erandom=no; fi])
-+ if test "$ac_cv_have_dev_erandom" = yes; then
-+ AC_DEFINE(HAVE_DEV_ERANDOM,1,
-+ [defined if the system supports an economical random device] )
-+ fi
-+else
-+ AC_MSG_CHECKING(for economical random device)
-+ ac_cv_have_dev_erandom=no
-+ AC_MSG_RESULT(has been disabled)
-+fi
-+
- ### End of automated tests.
- ### Now run sysdeps configure fragments.
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-gcc33-sscanf.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-gcc33-sscanf.patch
deleted file mode 100644
index 523b036d9a7d..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-gcc33-sscanf.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- stdio-common/sscanf.c.~1.8.~ 2003-01-16 11:25:20.000000000 +0100
-+++ stdio-common/sscanf.c 2003-03-05 12:07:34.000000000 +0100
-@@ -1,4 +1,4 @@
--/* Copyright (C) 1991,95,96,98,2002 Free Software Foundation, Inc.
-+/* Copyright (C) 1991,95,96,98,2002, 2003 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -27,9 +27,7 @@
- /* Read formatted input from S, according to the format string FORMAT. */
- /* VARARGS2 */
- int
--sscanf (s, format)
-- const char *s;
-- const char *format;
-+sscanf (const char *s, const char *format, ...)
- {
- va_list arg;
- int done;
-
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-got-fix.diff b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-got-fix.diff
deleted file mode 100644
index c0edccd8f38d..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-got-fix.diff
+++ /dev/null
@@ -1,22 +0,0 @@
---- glibc-2.3.2/sysdeps/i386/elf/start.S 2004-02-05 18:14:37.000000000 +0100
-+++ glibc-2.3.2/sysdeps/i386/elf/start.S 2004-02-05 23:32:16.000000000 +0100
-@@ -73,16 +73,13 @@ _start:
- addl $_GLOBAL_OFFSET_TABLE_, %ebx
-
- /* Push address of our own entry points to .fini and .init. */
-- leal __libc_csu_fini@GOTOFF(%ebx), %eax
-- pushl %eax
-- leal __libc_csu_init@GOTOFF(%ebx), %eax
-- pushl %eax
-+ pushl __libc_csu_fini@GOT(%ebx)
-+ pushl __libc_csu_init@GOT(%ebx)
-
- pushl %ecx /* Push second argument: argv. */
- pushl %esi /* Push first argument: argc. */
-
-- leal BP_SYM (main)@GOTOFF(%ebx), %eax
-- pushl %eax
-+ pushl BP_SYM (main)@GOT(%ebx)
-
- /* Call the user's main function, and exit with its value.
- But let the libc call main. */
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-ia64-LOAD_ARGS-fixup.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-ia64-LOAD_ARGS-fixup.patch
deleted file mode 100644
index a4f49c29080d..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-ia64-LOAD_ARGS-fixup.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From libc-alpha-return-13560-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com Wed Sep 24 06:27:22 2003
-Return-Path: <libc-alpha-return-13560-listarch-libc-alpha=sources dot redhat dot com at sources dot redhat dot com>
-Delivered-To: listarch-libc-alpha at sources dot redhat dot com
-Received: (qmail 23856 invoked by alias); 24 Sep 2003 06:27:20 -0000
-Mailing-List: contact libc-alpha-help at sources dot redhat dot com; run by ezmlm
-Precedence: bulk
-List-Subscribe: <mailto:libc-alpha-subscribe at sources dot redhat dot com>
-List-Archive: <http://sources.redhat.com/ml/libc-alpha/>
-List-Post: <mailto:libc-alpha at sources dot redhat dot com>
-List-Help: <mailto:libc-alpha-help at sources dot redhat dot com>, <http://sources dot redhat dot com/ml/#faqs>
-Sender: libc-alpha-owner at sources dot redhat dot com
-Delivered-To: mailing list libc-alpha at sources dot redhat dot com
-Received: (qmail 23847 invoked from network); 24 Sep 2003 06:27:16 -0000
-Received: from unknown (HELO sccrmhc11.comcast.net) (204.127.202.55)
- by sources dot redhat dot com with SMTP; 24 Sep 2003 06:27:16 -0000
-Received: from lucon.org ([12.234.88.5])
- by comcast dot net (sccrmhc11) with ESMTP
- id <2003092406271601100ok1f3e>; Wed, 24 Sep 2003 06:27:16 +0000
-Received: by lucon.org (Postfix, from userid 1000)
- id 6B4D02C828; Tue, 23 Sep 2003 23:27:11 -0700 (PDT)
-Date: Tue, 23 Sep 2003 23:27:11 -0700
-From: "H dot J dot Lu" <hjl at lucon dot org>
-To: Richard Henderson <rth at twiddle dot net>
-Cc: GNU C Library <libc-alpha at sources dot redhat dot com>,
- linux ia64 kernel <linux-ia64 at vger dot kernel dot org>
-Subject: PATCH: Re: Inefficient ia64 system call implementation in glibc
-Message-ID: <20030924062711.GA860@lucon.org>
-References: <20030919163218.GA21480@lucon.org> <20030921210434.GA2280@twiddle.net> <20030922193918.GA1141@lucon.org> <20030922232123.GA17271@twiddle.net>
-Mime-Version: 1.0
-Content-Type: text/plain; charset=us-ascii
-Content-Disposition: inline
-In-Reply-To: <20030922232123 dot GA17271 at twiddle dot net>
-User-Agent: Mutt/1.4.1i
-
-On Mon, Sep 22, 2003 at 04:21:23PM -0700, Richard Henderson wrote:
-> On Mon, Sep 22, 2003 at 12:39:18PM -0700, H. J. Lu wrote:
-> > Can I get char * from char [300]?
->
-> x+0 would work in this case; I'd guess it'd work for most of the
-> cases that syscalls need to handle.
->
-
-This patch works for me.
-
-
-H.J.
----
-2003-09-22 H.J. Lu <hongjiu.lu@intel.com>
-
- * sysdeps/unix/sysv/linux/ia64/sysdep.h (LOAD_ARGS_1): Use
- __typeof ((outX) + 0) instead of long.
- (LOAD_ARGS_2): Likewise.
- (LOAD_ARGS_3): Likewise.
- (LOAD_ARGS_4): Likewise.
- (LOAD_ARGS_5): Likewise.
- (LOAD_ARGS_6): Likewise.
-
---- sysdeps/unix/sysv/linux/ia64/sysdep.h.inline 2003-08-21 07:05:30.000000000 -0700
-+++ sysdeps/unix/sysv/linux/ia64/sysdep.h 2003-09-23 11:04:02.000000000 -0700
-@@ -191,23 +191,23 @@
- #define INTERNAL_SYSCALL_ERRNO(val, err) (val)
-
- #define LOAD_ARGS_0() do { } while (0)
--#define LOAD_ARGS_1(out0) \
-- register long _out0 asm ("out0") = (long) (out0); \
-+#define LOAD_ARGS_1(out0) \
-+ register __typeof ((out0) + 0) _out0 asm ("out0") = (out0); \
- LOAD_ARGS_0 ()
--#define LOAD_ARGS_2(out0, out1) \
-- register long _out1 asm ("out1") = (long) (out1); \
-+#define LOAD_ARGS_2(out0, out1) \
-+ register __typeof ((out1) + 0) _out1 asm ("out1") = (out1); \
- LOAD_ARGS_1 (out0)
--#define LOAD_ARGS_3(out0, out1, out2) \
-- register long _out2 asm ("out2") = (long) (out2); \
-+#define LOAD_ARGS_3(out0, out1, out2) \
-+ register __typeof ((out2) + 0) _out2 asm ("out2") = (out2); \
- LOAD_ARGS_2 (out0, out1)
--#define LOAD_ARGS_4(out0, out1, out2, out3) \
-- register long _out3 asm ("out3") = (long) (out3); \
-+#define LOAD_ARGS_4(out0, out1, out2, out3) \
-+ register __typeof ((out3) + 0) _out3 asm ("out3") = (out3); \
- LOAD_ARGS_3 (out0, out1, out2)
--#define LOAD_ARGS_5(out0, out1, out2, out3, out4) \
-- register long _out4 asm ("out4") = (long) (out4); \
-+#define LOAD_ARGS_5(out0, out1, out2, out3, out4) \
-+ register __typeof ((out4) + 0) _out4 asm ("out4") = (out4); \
- LOAD_ARGS_4 (out0, out1, out2, out3)
--#define LOAD_ARGS_6(out0, out1, out2, out3, out4, out5) \
-- register long _out5 asm ("out5") = (long) (out5); \
-+#define LOAD_ARGS_6(out0, out1, out2, out3, out4, out5) \
-+ register __typeof ((out5) + 0) _out5 asm ("out5") = (out5); \
- LOAD_ARGS_5 (out0, out1, out2, out3, out4)
-
- #define ASM_OUTARGS_0
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-iconvconfig-name_insert.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-iconvconfig-name_insert.patch
deleted file mode 100644
index f1ffdbf40a1c..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-iconvconfig-name_insert.patch
+++ /dev/null
@@ -1,78 +0,0 @@
---- glibc-2.3.2-net/iconv/iconvconfig.c 12 Jun 2003 09:48:20 -0000 1.1.1.10
-+++ glibc-2.3.2-redhat/iconv/iconvconfig.c 12 Jun 2003 09:55:36 -0000 1.14
-@@ -988,6 +988,34 @@ next_prime (uint32_t seed)
- module name offset
- (following last entry with step count 0)
- */
-+
-+static struct hash_entry *hash_table;
-+static size_t hash_size;
-+
-+/* Function to insert the names. */
-+static void name_insert (const void *nodep, VISIT value, int level)
-+{
-+ struct name *name;
-+ unsigned int idx;
-+ unsigned int hval2;
-+
-+ if (value != leaf && value != postorder)
-+ return;
-+
-+ name = *(struct name **) nodep;
-+ idx = name->hashval % hash_size;
-+ hval2 = 1 + name->hashval % (hash_size - 2);
-+
-+ while (hash_table[idx].string_offset != 0)
-+ if ((idx += hval2) >= hash_size)
-+ idx -= hash_size;
-+
-+ hash_table[idx].string_offset = strtaboffset (name->strent);
-+
-+ assert (name->module_idx != -1);
-+ hash_table[idx].module_idx = name->module_idx;
-+}
-+
- static int
- write_output (void)
- {
-@@ -995,8 +1023,6 @@ write_output (void)
- char *string_table;
- size_t string_table_size;
- struct gconvcache_header header;
-- struct hash_entry *hash_table;
-- size_t hash_size;
- struct module_entry *module_table;
- char *extra_table;
- char *cur_extra_table;
-@@ -1008,30 +1034,6 @@ write_output (void)
- char tmpfname[prefix_len + sizeof (GCONV_MODULES_CACHE)
- + strlen (".XXXXXX")];
- char finalname[prefix_len + sizeof (GCONV_MODULES_CACHE)];
--
-- /* Function to insert the names. */
-- static void name_insert (const void *nodep, VISIT value, int level)
-- {
-- struct name *name;
-- unsigned int idx;
-- unsigned int hval2;
--
-- if (value != leaf && value != postorder)
-- return;
--
-- name = *(struct name **) nodep;
-- idx = name->hashval % hash_size;
-- hval2 = 1 + name->hashval % (hash_size - 2);
--
-- while (hash_table[idx].string_offset != 0)
-- if ((idx += hval2) >= hash_size)
-- idx -= hash_size;
--
-- hash_table[idx].string_offset = strtaboffset (name->strent);
--
-- assert (name->module_idx != -1);
-- hash_table[idx].module_idx = name->module_idx;
-- }
-
- /* Open the output file. */
- assert (GCONV_MODULES_CACHE[0] == '/');
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-ipv6-bytestring-fix.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-ipv6-bytestring-fix.patch
deleted file mode 100644
index fc7ded5d6e32..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-ipv6-bytestring-fix.patch
+++ /dev/null
@@ -1,112 +0,0 @@
---- libc/resolv/nss_dns/dns-host.c 2003/10/26 08:33:27 1.38
-+++ libc/resolv/nss_dns/dns-host.c 2004/01/15 09:45:57 1.39
-@@ -1,4 +1,4 @@
--/* Copyright (C) 1996-2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-+/* Copyright (C) 1996-2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Extended from original form by Ulrich Drepper <drepper@cygnus.com>, 1996.
-
-@@ -298,6 +298,8 @@
- return NSS_STATUS_UNAVAIL;
- }
-
-+ host_buffer.buf = orig_host_buffer = (querybuf *) alloca (1024);
-+
- switch (af)
- {
- case AF_INET:
-@@ -305,29 +307,38 @@
- (uaddr[2] & 0xff), (uaddr[1] & 0xff), (uaddr[0] & 0xff));
- break;
- case AF_INET6:
-- /* XXX Maybe we need an option to select whether to use the nibble
-- or the bitfield form. The RFC requires the bitfield form so
-- we use it. */
-+ /* Only lookup with the byte string format if the user wants it. */
-+ if (__builtin_expect (_res.options & RES_USEBSTRING, 0))
-+ {
-+ qp = stpcpy (qbuf, "\\[x");
-+ for (n = 0; n < IN6ADDRSZ; ++n)
-+ qp += sprintf (qp, "%02hhx", uaddr[n]);
-+ strcpy (qp, "].ip6.arpa");
-+ n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR,
-+ host_buffer.buf->buf, 1024, &host_buffer.ptr);
-+ if (n >= 0)
-+ goto got_it_already;
-+ }
- qp = qbuf;
-- qp = stpcpy (qbuf, "\\[x");
-- for (n = 0; n < IN6ADDRSZ; ++n)
-- qp += sprintf (qp, "%02hhx", uaddr[n]);
-- strcpy (qp, "].ip6.arpa");
-+ for (n = IN6ADDRSZ - 1; n >= 0; n--)
-+ {
-+ static const char nibblechar[16] = "0123456789abcdef";
-+ *qp++ = nibblechar[uaddr[n] & 0xf];
-+ *qp++ = '.';
-+ *qp++ = nibblechar[(uaddr[n] >> 4) & 0xf];
-+ *qp++ = '.';
-+ }
-+ strcpy(qp, "ip6.arpa");
- break;
- default:
- /* Cannot happen. */
- break;
- }
-
-- host_buffer.buf = orig_host_buffer = (querybuf *) alloca (1024);
--
- n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf,
- 1024, &host_buffer.ptr);
- if (n < 0 && af == AF_INET6)
- {
-- qp = qbuf;
-- for (n = IN6ADDRSZ - 1; n >= 0; n--)
-- qp += sprintf (qp, "%x.%x.", uaddr[n] & 0xf, (uaddr[n] >> 4) & 0xf);
- strcpy (qp, "ip6.int");
- n = __libc_res_nquery (&_res, qbuf, C_IN, T_PTR, host_buffer.buf->buf,
- host_buffer.buf != orig_host_buffer
-@@ -342,6 +353,7 @@
- return errno == ECONNREFUSED ? NSS_STATUS_UNAVAIL : NSS_STATUS_NOTFOUND;
- }
-
-+ got_it_already:
- status = getanswer_r (host_buffer.buf, n, qbuf, T_PTR, result, buffer, buflen,
- errnop, h_errnop, 0 /* XXX */);
- if (host_buffer.buf != orig_host_buffer)
---- libc/resolv/resolv.h 2002/12/15 23:22:50 1.37
-+++ libc/resolv/resolv.h 2004/01/15 09:41:58 1.38
-@@ -199,6 +199,8 @@
- #define RES_NOCHECKNAME 0x00008000 /* do not check names for sanity. */
- #define RES_KEEPTSIG 0x00010000 /* do not strip TSIG records */
- #define RES_BLAST 0x00020000 /* blast all recursive servers */
-+#define RES_USEBSTRING 0x00040000 /* IPv6 reverse lookup with byte
-+ strings */
-
- #define RES_DEFAULT (RES_RECURSE | RES_DEFNAMES | RES_DNSRCH)
-
---- libc/resolv/res_debug.c 2002/08/08 02:01:31 1.28
-+++ libc/resolv/res_debug.c 2004/01/15 09:43:35 1.29
-@@ -572,6 +572,10 @@
- case RES_DNSRCH: return "dnsrch";
- case RES_INSECURE1: return "insecure1";
- case RES_INSECURE2: return "insecure2";
-+ case RES_USE_INET6: return "inet6";
-+ case RES_ROTATE: return "rotate";
-+ case RES_NOCHECKNAME: return "no-check-names";
-+ case RES_USEBSTRING: return "ip6-bytstring";
- /* XXX nonreentrant */
- default: sprintf(nbuf, "?0x%lx?", (u_long)option);
- return (nbuf);
---- libc/resolv/res_init.c 2003/09/04 12:48:52 1.34
-+++ libc/resolv/res_init.c 2004/01/15 09:44:18 1.35
-@@ -489,6 +489,9 @@
- #endif
- } else if (!strncmp(cp, "inet6", sizeof("inet6") - 1)) {
- statp->options |= RES_USE_INET6;
-+ } else if (!strncmp(cp, "ip6-bytestring",
-+ sizeof("ip6-bytestring") - 1)) {
-+ statp->options |= RES_USEBSTRING;
- } else if (!strncmp(cp, "rotate", sizeof("rotate") - 1)) {
- statp->options |= RES_ROTATE;
- } else if (!strncmp(cp, "no-check-names",
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-add-n32-n64-sysdep-cancel.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-add-n32-n64-sysdep-cancel.patch
deleted file mode 100644
index 5d204c25b83e..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-add-n32-n64-sysdep-cancel.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-2003-09-10 Chris Demetriou <cgd@broadcom.com>
-
- * sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h: New file.
-
-Index: linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h
---- /dev/null Wed Sep 10 15:45:19 2003
-+++ linuxthreads/sysdeps/unix/sysv/linux/mips/mips64/sysdep-cancel.h Wed Sep 10 15:45:14 2003
-@@ -0,0 +1,145 @@
-+/* Copyright (C) 2003 Free Software Foundation, Inc.
-+ This file is part of the GNU C Library.
-+ Contributed by Chris Demetriou of Broadcom Corporation,
-+ based on work by Guido Guenther <agx@sigxcpu.org>.
-+
-+ 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. */
-+
-+#include <sysdep.h>
-+#ifndef __ASSEMBLER__
-+# include <linuxthreads/internals.h>
-+#endif
-+#include <sys/asm.h>
-+
-+#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt
-+
-+#ifdef __PIC__
-+# undef PSEUDO
-+# define PSEUDO(name, syscall_name, args) \
-+ .align 2; \
-+ 99: \
-+ PTR_LA t9,__syscall_error; \
-+ /* manual cpreturn. */ \
-+ REG_L gp, STKOFF_GP(sp); \
-+ RESTORESTK ; \
-+ jr t9; \
-+ ENTRY (name) \
-+ SAVESTK ; \
-+ .cpsetup t9, STKOFF_GP, name ; \
-+ .set reorder; \
-+ SINGLE_THREAD_P(t0); \
-+ bne zero, t0, L(pseudo_cancel); \
-+ .set noreorder; \
-+ li v0, SYS_ify(syscall_name); \
-+ syscall; \
-+ .set reorder; \
-+ bne a3, zero, SYSCALL_ERROR_LABEL; \
-+ /* manual cpreturn. */ \
-+ REG_L gp, STKOFF_GP(sp); \
-+ RESTORESTK ; \
-+ ret; \
-+ L(pseudo_cancel): \
-+ REG_S ra, STKOFF_RA(sp); \
-+ PUSHARGS_##args; /* save syscall args */ \
-+ CENABLE; \
-+ REG_S v0, STKOFF_SVMSK(sp); /* save mask */ \
-+ POPARGS_##args; /* restore syscall args */ \
-+ .set noreorder; \
-+ li v0, SYS_ify (syscall_name); \
-+ syscall; \
-+ .set reorder; \
-+ REG_S v0, STKOFF_SC_V0(sp); /* save syscall result */ \
-+ REG_S a3, STKOFF_SC_ERR(sp); /* save syscall error flag */ \
-+ REG_L a0, STKOFF_SVMSK(sp); /* pass mask as arg1 */ \
-+ CDISABLE; \
-+ REG_L a3, STKOFF_SC_ERR(sp); /* restore syscall error flag */ \
-+ REG_L ra, STKOFF_RA(sp); /* restore return address */ \
-+ REG_L v0, STKOFF_SC_V0(sp); /* restore syscall result */ \
-+ bne a3, zero, SYSCALL_ERROR_LABEL; \
-+ /* manual cpreturn. */ \
-+ REG_L gp, STKOFF_GP(sp); \
-+ RESTORESTK ; \
-+ L(pseudo_end):
-+#endif
-+
-+# define PUSHARGS_0 /* nothing to do */
-+# define PUSHARGS_1 PUSHARGS_0 REG_S a0, STKOFF_A0(sp);
-+# define PUSHARGS_2 PUSHARGS_1 REG_S a1, STKOFF_A1(sp);
-+# define PUSHARGS_3 PUSHARGS_2 REG_S a2, STKOFF_A2(sp);
-+# define PUSHARGS_4 PUSHARGS_3 REG_S a3, STKOFF_A3(sp);
-+# define PUSHARGS_5 PUSHARGS_4 REG_S a4, STKOFF_A4(sp);
-+# define PUSHARGS_6 PUSHARGS_5 REG_S a5, STKOFF_A5(sp);
-+
-+# define POPARGS_0 /* nothing to do */
-+# define POPARGS_1 POPARGS_0 REG_L a0, STKOFF_A0(sp);
-+# define POPARGS_2 POPARGS_1 REG_L a1, STKOFF_A1(sp);
-+# define POPARGS_3 POPARGS_2 REG_L a2, STKOFF_A2(sp);
-+# define POPARGS_4 POPARGS_3 REG_L a3, STKOFF_A3(sp);
-+# define POPARGS_5 POPARGS_4 REG_L a4, STKOFF_A4(sp);
-+# define POPARGS_6 POPARGS_5 REG_L a5, STKOFF_A5(sp);
-+
-+/* Save an even number of slots. Should be 0 if an even number of slots
-+ are used below, or SZREG if an odd number are used. */
-+# define STK_PAD SZREG
-+
-+/* Place values that we are more likely to use later in this sequence, i.e.
-+ closer to the SP at function entry. If you do that, the are more
-+ likely to already be in your d-cache. */
-+# define STKOFF_A5 (STK_PAD)
-+# define STKOFF_A4 (STKOFF_A5 + SZREG)
-+# define STKOFF_A3 (STKOFF_A4 + SZREG)
-+# define STKOFF_A2 (STKOFF_A3 + SZREG) /* MT and more args. */
-+# define STKOFF_A1 (STKOFF_A2 + SZREG) /* MT and 2 args. */
-+# define STKOFF_A0 (STKOFF_A1 + SZREG) /* MT and 1 arg. */
-+# define STKOFF_RA (STKOFF_A0 + SZREG) /* Used if MT. */
-+# define STKOFF_SC_V0 (STKOFF_RA + SZREG) /* Used if MT. */
-+# define STKOFF_SC_ERR (STKOFF_SC_V0 + SZREG) /* Used if MT. */
-+# define STKOFF_SVMSK (STKOFF_SC_ERR + SZREG) /* Used if MT. */
-+# define STKOFF_GP (STKOFF_SVMSK + SZREG) /* Always used. */
-+
-+# define STKSPACE (STKOFF_GP + SZREG)
-+# define SAVESTK PTR_SUBU sp, STKSPACE
-+# define RESTORESTK PTR_ADDU sp, STKSPACE
-+
-+# ifdef IS_IN_libpthread
-+# define CENABLE PTR_LA t9, __pthread_enable_asynccancel; jalr t9;
-+# define CDISABLE PTR_LA t9, __pthread_disable_asynccancel; jalr t9;
-+# define __local_multiple_threads __pthread_multiple_threads
-+# else
-+# define CENABLE PTR_LA t9, __libc_enable_asynccancel; jalr t9;
-+# define CDISABLE PTR_LA t9, __libc_disable_asynccancel; jalr t9;
-+# define __local_multiple_threads __libc_multiple_threads
-+# endif
-+
-+# if !defined NOT_IN_libc
-+# define __local_multiple_threads __libc_multiple_threads
-+# else
-+# define __local_multiple_threads __pthread_multiple_threads
-+# endif
-+
-+# ifndef __ASSEMBLER__
-+extern int __local_multiple_threads attribute_hidden;
-+# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1)
-+# else
-+# define SINGLE_THREAD_P(reg) lw reg, __local_multiple_threads
-+#endif
-+
-+#elif !defined __ASSEMBLER__
-+
-+/* This code should never be used but we define it anyhow. */
-+# define SINGLE_THREAD_P (1)
-+
-+#endif
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-configure-for-n64-symver.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-configure-for-n64-symver.patch
deleted file mode 100644
index 4ed4cd2c3be6..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-configure-for-n64-symver.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-2003-07-17 Guido Guenther <agx@sigxcpu.org>
-
- * configure.in: pass $CFLAGS to ld --version-script test
-
-Index: configure.in
-===================================================================
-RCS file: /cvs/glibc/libc/configure.in,v
-retrieving revision 1.401
-diff -u -r1.401 configure.in
---- configure.in 3 Jul 2003 21:03:56 -0000 1.401
-+++ configure.in 16 Jul 2003 18:35:18 -0000
-@@ -1051,7 +1051,7 @@
- global: sym;
- } VERS_1;
- EOF
-- if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
-+ if ${CC-cc} -c $ASFLAGS $CFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
- if AC_TRY_COMMAND([${CC-cc} $CFLAGS $LDFLAGS -shared
- -o conftest.so conftest.o
- -nostartfiles -nostdlib
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-fix-n32-n64-sysdep-headers.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-fix-n32-n64-sysdep-headers.patch
deleted file mode 100644
index ba186224f789..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-fix-n32-n64-sysdep-headers.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-2003-09-10 Chris Demetriou <cgd@broadcom.com>
-
- * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Remove
- "#if 0" surrounding most of contents.
- (SYSCALL_ERROR_LABEL): Define.
- (__SYSCALL_CLOBBERS): Add $10.
- (internal_syscall7): Remove.
- * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Likewise.
-
-
-Index: sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
---- sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h Fri Aug 15 19:35:02 2003
-+++ sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h Wed Sep 10 11:00:07 2003
-@@ -33,9 +33,16 @@
- # define SYS_ify(syscall_name) __NR_N32_/**/syscall_name
- #endif
-
-+#ifdef __ASSEMBLER__
-
--#ifndef __ASSEMBLER__
--#if 0 /* untested */
-+/* We don't want the label for the error handler to be visible in the symbol
-+ table when we define it here. */
-+#ifdef __PIC__
-+# define SYSCALL_ERROR_LABEL 99b
-+#endif
-+
-+#else /* ! __ASSEMBLER__ */
-+
- /* Define a macro which expands into the inline wrapper code for a system
- call. */
- #undef INLINE_SYSCALL
-@@ -227,37 +234,8 @@
- } \
- _sys_result; \
- })
--
--#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
--({ \
-- long _sys_result; \
-- \
-- { \
-- register long long __v0 asm("$2"); \
-- register long long __a0 asm("$4") = (long long) arg1; \
-- register long long __a1 asm("$5") = (long long) arg2; \
-- register long long __a2 asm("$6") = (long long) arg3; \
-- register long long __a3 asm("$7") = (long long) arg4; \
-- register long long __a4 asm("$8") = (long long) arg5; \
-- register long long __a5 asm("$9") = (long long) arg6; \
-- register long long __a6 asm("$10") = (long long) arg7; \
-- __asm__ volatile ( \
-- ".set\tnoreorder\n\t" \
-- "li\t$2, %5\t\t\t# " #name "\n\t" \
-- "syscall\n\t" \
-- ".set\treorder" \
-- : "=r" (__v0), "+r" (__a3) \
-- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
-- "r" (__a4), "r" (__a5), "r" (__a6) \
-- : __SYSCALL_CLOBBERS); \
-- err = __a3; \
-- _sys_result = __v0; \
-- } \
-- _sys_result; \
--})
-
--#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
--#endif /* untested */
-+#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
- #endif /* __ASSEMBLER__ */
-
- #endif /* linux/mips/sysdep.h */
-Index: sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
---- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h Fri Aug 15 19:35:02 2003
-+++ sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h Wed Sep 10 11:00:07 2003
-@@ -33,9 +33,16 @@
- # define SYS_ify(syscall_name) __NR_N64_/**/syscall_name
- #endif
-
-+#ifdef __ASSEMBLER__
-
--#ifndef __ASSEMBLER__
--#if 0 /* untested */
-+/* We don't want the label for the error handler to be visible in the symbol
-+ table when we define it here. */
-+#ifdef __PIC__
-+# define SYSCALL_ERROR_LABEL 99b
-+#endif
-+
-+#else /* ! __ASSEMBLER__ */
-+
- /* Define a macro which expands into the inline wrapper code for a system
- call. */
- #undef INLINE_SYSCALL
-@@ -227,37 +234,8 @@
- } \
- _sys_result; \
- })
--
--#define internal_syscall7(name, err, arg1, arg2, arg3, arg4, arg5, arg6, arg7)\
--({ \
-- long _sys_result; \
-- \
-- { \
-- register long __v0 asm("$2"); \
-- register long __a0 asm("$4") = (long) arg1; \
-- register long __a1 asm("$5") = (long) arg2; \
-- register long __a2 asm("$6") = (long) arg3; \
-- register long __a3 asm("$7") = (long) arg4; \
-- register long __a4 asm("$8") = (long) arg5; \
-- register long __a5 asm("$9") = (long) arg6; \
-- register long __a6 asm("$10") = (long) arg7; \
-- __asm__ volatile ( \
-- ".set\tnoreorder\n\t" \
-- "li\t$2, %5\t\t\t# " #name "\n\t" \
-- "syscall\n\t" \
-- ".set\treorder" \
-- : "=r" (__v0), "+r" (__a3) \
-- : "r" (__a0), "r" (__a1), "r" (__a2), "i" (SYS_ify(name)), \
-- "r" (__a4), "r" (__a5), "r" (__a6) \
-- : __SYSCALL_CLOBBERS); \
-- err = __a3; \
-- _sys_result = __v0; \
-- } \
-- _sys_result; \
--})
-
--#define __SYSCALL_CLOBBERS "$1", "$3", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
--#endif /* untested */
-+#define __SYSCALL_CLOBBERS "$1", "$3", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25"
- #endif /* __ASSEMBLER__ */
-
- #endif /* linux/mips/sysdep.h */
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-fix-nested-entend-pairs.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-fix-nested-entend-pairs.patch
deleted file mode 100644
index 03c6a6b1ec4f..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-fix-nested-entend-pairs.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- sysdeps/mips/dl-machine.h.org Thu Apr 15 11:24:26 2004
-+++ sysdeps/mips/dl-machine.h Thu Apr 15 11:38:28 2004
-@@ -474,7 +474,7 @@
- " STRINGXP(PTR_LA) " $25, _dl_start_user\n\
- .globl _dl_start_user\n\
- .type _dl_start_user,@function\n\
-- .ent _dl_start_user\n\
-+ .aent _dl_start_user\n\
- _dl_start_user:\n\
- " STRINGXP(SETUP_GP) "\n\
- " STRINGXV(SETUP_GP64($18,_dl_start_user)) "\n\
-@@ -512,8 +512,7 @@
- " STRINGXP(PTR_LA) " $2, _dl_fini\n\
- # Jump to the user entry point.\n\
- move $25, $17\n\
-- jr $25\n\
-- .end _dl_start_user\n\t"\
-+ jr $25\n\t"\
- _RTLD_EPILOGUE(ENTRY_POINT)\
- ".previous"\
- );
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-pread-linux2.5.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-pread-linux2.5.patch
deleted file mode 100644
index cb2d67464b32..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-mips-pread-linux2.5.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-2003-05-30 Guido Guenther <agx@sigxcpu.org>
-
- * sysdeps/unix/sysv/linux/mips/pread.c: include <stddef.h>
- * sysdeps/unix/sysv/linux/mips/pread.c: handle __NR_N32_pread64,
- __NR_O32_pread64 and __NR__N64_pread64.
- * sysdeps/unix/sysv/linux/mips/pread64.c: likewise.
- * sysdeps/unix/sysv/linux/mips/pwrite.c: handle __NR_N32_pwrite64,
- __NR_O32_pwrite64 and __NR__N64_pwrite64.
- * sysdeps/unix/sysv/linux/mips/pwrite64.c: likewise.
-
-Index: sysdeps/unix/sysv/linux/mips//pread.c
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/pread.c,v
-retrieving revision 1.11
-diff -u -p -u -r1.11 pread.c
---- sysdeps/unix/sysv/linux/mips//pread.c 30 May 2003 17:41:46 -0000 1.11
-+++ sysdeps/unix/sysv/linux/mips//pread.c 23 Jul 2003 11:49:51 -0000
-@@ -33,6 +34,24 @@
- # error "__NR_pread and __NR_pread64 both defined???"
- # endif
- # define __NR_pread __NR_pread64
-+#endif
-+#ifdef __NR_O32_pread64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_O32_pread
-+# error "__NR_O32_pread and __NR_O32_pread64 both defined???"
-+# endif
-+# define __NR_O32_pread __NR_O32_pread64
-+#endif
-+#ifdef __NR_N32_pread64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_N32_pread
-+# error "__NR_N32_pread and __NR_N32_pread64 both defined???"
-+# endif
-+# define __NR_N32_pread __NR_N32_pread64
-+#endif
-+#ifdef __NR_N64_pread64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_N64_pread
-+# error "__NR_N64_pread and __NR_N64_pread64 both defined???"
-+# endif
-+# define __NR_N64_pread __NR_N64_pread64
- #endif
-
- #if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
-Index: sysdeps/unix/sysv/linux/mips//pread64.c
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/pread64.c,v
-retrieving revision 1.11
-diff -u -p -u -r1.11 pread64.c
---- sysdeps/unix/sysv/linux/mips//pread64.c 30 May 2003 17:41:46 -0000 1.11
-+++ sysdeps/unix/sysv/linux/mips//pread64.c 23 Jul 2003 11:49:51 -0000
-@@ -33,6 +33,24 @@
- # endif
- # define __NR_pread __NR_pread64
- #endif
-+#ifdef __NR_O32_pread64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_O32_pread
-+# error "__NR_O32_pread and __NR_O32_pread64 both defined???"
-+# endif
-+# define __NR_O32_pread __NR_O32_pread64
-+#endif
-+#ifdef __NR_N32_pread64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_N32_pread
-+# error "__NR_N32_pread and __NR_N32_pread64 both defined???"
-+# endif
-+# define __NR_N32_pread __NR_N32_pread64
-+#endif
-+#ifdef __NR_N64_pread64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_N64_pread
-+# error "__NR_N64_pread and __NR_N64_pread64 both defined???"
-+# endif
-+# define __NR_N64_pread __NR_N64_pread64
-+#endif
-
- #if defined __NR_pread || __ASSUME_PREAD_SYSCALL > 0
-
-Index: sysdeps/unix/sysv/linux/mips//pwrite.c
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/pwrite.c,v
-retrieving revision 1.11
-diff -u -p -u -r1.11 pwrite.c
---- sysdeps/unix/sysv/linux/mips//pwrite.c 30 May 2003 17:41:46 -0000 1.11
-+++ sysdeps/unix/sysv/linux/mips//pwrite.c 23 Jul 2003 11:49:51 -0000
-@@ -34,6 +34,24 @@
- # endif
- # define __NR_pwrite __NR_pwrite64
- #endif
-+#ifdef __NR_O32_pwrite64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_O32_pwrite
-+# error "__NR_O32_pwrite and __NR_O32_pwrite64 both defined???"
-+# endif
-+# define __NR_O32_pwrite __NR_O32_pwrite64
-+#endif
-+#ifdef __NR_N32_pwrite64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_N32_pwrite
-+# error "__NR_N32_pwrite and __NR_N32_pwrite64 both defined???"
-+# endif
-+# define __NR_N32_pwrite __NR_N32_pwrite64
-+#endif
-+#ifdef __NR_N64_pwrite64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_N64_pwrite
-+# error "__NR_N64_pwrite and __NR_N64_pwrite64 both defined???"
-+# endif
-+# define __NR_N64_pwrite __NR_N64_pwrite64
-+#endif
-
- #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
-
-Index: sysdeps/unix/sysv/linux/mips//pwrite64.c
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/pwrite64.c,v
-retrieving revision 1.12
-diff -u -p -u -r1.12 pwrite64.c
---- sysdeps/unix/sysv/linux/mips//pwrite64.c 30 May 2003 17:41:46 -0000 1.12
-+++ sysdeps/unix/sysv/linux/mips//pwrite64.c 23 Jul 2003 11:49:51 -0000
-@@ -33,6 +33,24 @@
- # endif
- # define __NR_pwrite __NR_pwrite64
- #endif
-+#ifdef __NR_O32_pwrite64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_O32_pwrite
-+# error "__NR_O32_pwrite and __NR_O32_pwrite64 both defined???"
-+# endif
-+# define __NR_O32_pwrite __NR_O32_pwrite64
-+#endif
-+#ifdef __NR_N32_pwrite64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_N32_pwrite
-+# error "__NR_N32_pwrite and __NR_N32_pwrite64 both defined???"
-+# endif
-+# define __NR_N32_pwrite __NR_N32_pwrite64
-+#endif
-+#ifdef __NR_N64_pwrite64 /* Newer kernels renamed but it's the same. */
-+# ifdef __NR_N64_pwrite
-+# error "__NR_N64_pwrite and __NR_N64_pwrite64 both defined???"
-+# endif
-+# define __NR_N64_pwrite __NR_N64_pwrite64
-+#endif
-
- #if defined __NR_pwrite || __ASSUME_PWRITE_SYSCALL > 0
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-nptl-fix-include.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-nptl-fix-include.patch
deleted file mode 100644
index 19c143a252a1..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-nptl-fix-include.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- glibc-2.3.2/nptl/unwind.c.orig 2003-05-17 22:11:05.000000000 +0200
-+++ glibc-2.3.2/nptl/unwind.c 2003-05-17 22:08:30.000000000 +0200
-@@ -20,6 +20,7 @@
-
- #include <setjmp.h>
- #include <stdlib.h>
-+#include <unistd.h>
- #include "pthreadP.h"
-
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-owl-malloc-unlink-sanity-check.diff b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-owl-malloc-unlink-sanity-check.diff
deleted file mode 100644
index 1525fa005632..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-owl-malloc-unlink-sanity-check.diff
+++ /dev/null
@@ -1,29 +0,0 @@
---- malloc/malloc.c.orig 2004-01-03 18:36:23.000000000 -0500
-+++ malloc/malloc.c 2004-01-03 18:46:16.000000000 -0500
-@@ -311,6 +311,11 @@ extern "C" {
- #define assert(x) ((void)0)
- #endif
-
-+/* needed for owl-malloc-unlink-sanity-check */
-+#include <abort-instr.h>
-+#ifndef ABORT_INSTRUCTION
-+#define ABORT_INSTRUCTION
-+#endif
-
- /*
- INTERNAL_SIZE_T is the word-size used for internal bookkeeping
-@@ -1951,6 +1956,14 @@ typedef struct malloc_chunk* mbinptr;
- #define unlink(P, BK, FD) { \
- FD = P->fd; \
- BK = P->bk; \
-+ /* owl-malloc-unlink-sanity-check */ \
-+ if (FD->bk != P || BK->fd != P) \
-+ { \
-+ ABORT_INSTRUCTION; \
-+ _exit(127); \
-+ while (1) \
-+ ABORT_INSTRUCTION; \
-+ } \
- FD->bk = BK; \
- BK->fd = FD; \
- }
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions-v2.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions-v2.patch
deleted file mode 100644
index 2a230f1d3da5..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions-v2.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-diff -u -r -N glibc-2.3.2.ORIG/sysdeps/generic/libc-start.c glibc-2.3.2/sysdeps/generic/libc-start.c
---- glibc-2.3.2.ORIG/sysdeps/generic/libc-start.c 2003-02-14 23:59:15.000000000 +0100
-+++ glibc-2.3.2/sysdeps/generic/libc-start.c 2003-11-08 21:32:03.000000000 +0100
-@@ -184,6 +184,9 @@
- _dl_debug_printf ("\ntransferring control: %s\n\n", argv[0]);
- #endif
-
-+ /* call the __guard_setup to set up the random __guard value */
-+ __guard_setup (); /* pappy@gentoo.org */
-+
- #ifdef HAVE_CLEANUP_JMP_BUF
- /* Memory for the cancellation buffer. */
- struct pthread_unwind_buf unwind_buf;
-diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Dist glibc-2.3.2/sysdeps/unix/sysv/linux/Dist
---- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Dist 2003-02-21 07:30:10.000000000 +0100
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Dist 2003-11-08 21:13:58.000000000 +0100
-@@ -1,3 +1,4 @@
-+ssp.c
- bits/initspin.h
- cmsg_nxthdr.c
- dl-brk.c
-diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Makefile glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile
---- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Makefile 2002-12-17 00:36:52.000000000 +0100
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile 2003-11-08 21:13:58.000000000 +0100
-@@ -1,5 +1,5 @@
- ifeq ($(subdir),csu)
--sysdep_routines += errno-loc
-+sysdep_routines += errno-loc ssp
- endif
-
- ifeq ($(subdir),db2)
-diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Versions glibc-2.3.2/sysdeps/unix/sysv/linux/Versions
---- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Versions 2002-12-17 00:28:17.000000000 +0100
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Versions 2003-11-08 21:13:58.000000000 +0100
-@@ -108,6 +108,8 @@
- GLIBC_2.3.2 {
- # New kernel interfaces.
- epoll_create; epoll_ctl; epoll_wait;
-+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
-+ __guard; __guard_setup; __stack_smash_handler;
- }
- GLIBC_PRIVATE {
- # needed by libpthread.
-diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/ssp.c glibc-2.3.2/sysdeps/unix/sysv/linux/ssp.c
---- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/ssp.c 1970-01-01 01:00:00.000000000 +0100
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/ssp.c 2003-11-08 21:13:58.000000000 +0100
-@@ -0,0 +1,97 @@
-+#include <stdio.h>
-+#include <string.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+
-+#ifdef _POSIX_SOURCE
-+#include <signal.h>
-+#endif
-+
-+#if defined(HAVE_SYSLOG)
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <sys/un.h>
-+
-+#include <sys/syslog.h>
-+#ifndef _PATH_LOG
-+#define _PATH_LOG "/dev/log"
-+#endif
-+#endif
-+
-+long __guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
-+
-+void __guard_setup (void)
-+{
-+ int fd;
-+ if (__guard[0]!=0) return;
-+ fd = open ("/dev/urandom", 0);
-+ if (fd != -1) {
-+ ssize_t size = read (fd, (char*)&__guard, sizeof(__guard));
-+ close (fd) ;
-+ if (size == sizeof(__guard)) return;
-+ }
-+ /* If a random generator can't be used, the protector switches the guard
-+ to the "terminator canary" */
-+ ((char*)__guard)[0] = 0; ((char*)__guard)[1] = 0;
-+ ((char*)__guard)[2] = '\n'; ((char*)__guard)[3] = 255;
-+}
-+
-+void __stack_smash_handler (char func[], int damaged)
-+{
-+#if defined (__GNU_LIBRARY__)
-+ extern char * __progname;
-+#endif
-+ const char message[] = ": stack smashing attack in function ";
-+ int bufsz = 512, len;
-+ char buf[bufsz];
-+#if defined(HAVE_SYSLOG)
-+ int LogFile;
-+ struct sockaddr_un SyslogAddr; /* AF_UNIX address of local logger */
-+#endif
-+#ifdef _POSIX_SOURCE
-+ {
-+ sigset_t mask;
-+ sigfillset(&mask);
-+ sigdelset(&mask, SIGABRT); /* Block all signal handlers */
-+ sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGABRT */
-+ }
-+#endif
-+
-+ strcpy(buf, "<2>"); len=3; /* send LOG_CRIT */
-+#if defined (__GNU_LIBRARY__)
-+ strncat(buf, __progname, bufsz-len-1); len = strlen(buf);
-+#endif
-+ if (bufsz>len) {strncat(buf, message, bufsz-len-1); len = strlen(buf);}
-+ if (bufsz>len) {strncat(buf, func, bufsz-len-1); len = strlen(buf);}
-+ /* print error message */
-+ write (STDERR_FILENO, buf+3, len-3);
-+#if defined(HAVE_SYSLOG)
-+ if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) != -1) {
-+
-+ /*
-+ * Send "found" message to the "/dev/log" path
-+ */
-+ SyslogAddr.sun_family = AF_UNIX;
-+ (void)strncpy(SyslogAddr.sun_path, _PATH_LOG,
-+ sizeof(SyslogAddr.sun_path) - 1);
-+ SyslogAddr.sun_path[sizeof(SyslogAddr.sun_path) - 1] = '\0';
-+ sendto(LogFile, buf, len, 0, (struct sockaddr *)&SyslogAddr,
-+ sizeof(SyslogAddr));
-+ }
-+#endif
-+
-+#ifdef _POSIX_SOURCE
-+ { /* Make sure the default handler is associated with SIGABRT */
-+ struct sigaction sa;
-+
-+ memset(&sa, 0, sizeof(struct sigaction));
-+ sigfillset(&sa.sa_mask); /* Block all signals */
-+ sa.sa_flags = 0;
-+ sa.sa_handler = SIG_DFL;
-+ sigaction(SIGABRT, &sa, NULL);
-+ (void)kill(getpid(), SIGABRT);
-+ }
-+#endif
-+ _exit(127);
-+}
-+
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions-v3.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions-v3.patch
deleted file mode 100644
index c4882afa8f9f..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions-v3.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -Naur glibc-2.3.2-orig/sysdeps/generic/libc-start.c glibc-2.3.2/sysdeps/generic/libc-start.c
---- glibc-2.3.2-orig/sysdeps/generic/libc-start.c 2004-05-10 01:59:09.000000000 -0400
-+++ glibc-2.3.2/sysdeps/generic/libc-start.c 2004-05-10 02:06:00.865611770 -0400
-@@ -188,6 +188,9 @@
- GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
- #endif
-
-+ /* call the __guard_setup to set up the random __guard value */
-+ __guard_setup (); /* pappy@gentoo.org (pappy rules) */
-+
- #ifdef HAVE_CLEANUP_JMP_BUF
- /* Memory for the cancellation buffer. */
- struct pthread_unwind_buf unwind_buf;
-diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Dist glibc-2.3.2/sysdeps/unix/sysv/linux/Dist
---- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Dist 2004-05-10 01:59:10.000000000 -0400
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Dist 2004-05-10 02:06:54.862038647 -0400
-@@ -1,3 +1,4 @@
-+ssp.c
- bits/initspin.h
- cmsg_nxthdr.c
- dl-brk.c
-diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Makefile glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile
---- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Makefile 2004-05-10 01:59:10.000000000 -0400
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile 2004-05-10 02:07:50.709582758 -0400
-@@ -1,5 +1,5 @@
- ifeq ($(subdir),csu)
--sysdep_routines += errno-loc
-+sysdep_routines += errno-loc ssp
- endif
-
- ifeq ($(subdir),assert)
-diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Versions glibc-2.3.2/sysdeps/unix/sysv/linux/Versions
---- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Versions 2004-05-10 01:59:10.000000000 -0400
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Versions 2004-05-10 02:10:30.410716176 -0400
-@@ -108,6 +108,8 @@
- GLIBC_2.3.2 {
- # New kernel interfaces.
- epoll_create; epoll_ctl; epoll_wait;
-+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
-+ __guard; __guard_setup; __stack_smash_handler;
- }
- GLIBC_2.3.3 {
- gnu_dev_major; gnu_dev_minor; gnu_dev_makedev;
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions.patch
deleted file mode 100644
index deb117dfd033..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-propolice-guard-functions.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-diff -u -r -N glibc-2.3.2.ORIG/sysdeps/generic/libc-start.c glibc-2.3.2/sysdeps/generic/libc-start.c
---- glibc-2.3.2.ORIG/sysdeps/generic/libc-start.c 2003-02-14 23:59:15.000000000 +0100
-+++ glibc-2.3.2/sysdeps/generic/libc-start.c 2003-11-08 21:32:03.000000000 +0100
-@@ -149,6 +149,9 @@
- {
- /* XXX This is where the try/finally handling must be used. */
-
-+ /* call the __guard_setup to set up the random __guard value */
-+ __guard_setup (); /* pappy@gentoo.org */
-+
- result = main (argc, argv, __environ);
- }
- #ifdef HAVE_CANCELBUF
-diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Dist glibc-2.3.2/sysdeps/unix/sysv/linux/Dist
---- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Dist 2003-02-21 07:30:10.000000000 +0100
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Dist 2003-11-08 21:13:58.000000000 +0100
-@@ -1,3 +1,4 @@
-+ssp.c
- bits/initspin.h
- cmsg_nxthdr.c
- dl-brk.c
-diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Makefile glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile
---- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Makefile 2002-12-17 00:36:52.000000000 +0100
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile 2003-11-08 21:13:58.000000000 +0100
-@@ -1,5 +1,5 @@
- ifeq ($(subdir),csu)
--sysdep_routines += errno-loc
-+sysdep_routines += errno-loc ssp
- endif
-
- ifeq ($(subdir),db2)
-diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Versions glibc-2.3.2/sysdeps/unix/sysv/linux/Versions
---- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/Versions 2002-12-17 00:28:17.000000000 +0100
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Versions 2003-11-08 21:13:58.000000000 +0100
-@@ -108,6 +108,8 @@
- GLIBC_2.3.2 {
- # New kernel interfaces.
- epoll_create; epoll_ctl; epoll_wait;
-+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
-+ __guard; __guard_setup; __stack_smash_handler;
- }
- GLIBC_PRIVATE {
- # needed by libpthread.
-diff -u -r -N glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/ssp.c glibc-2.3.2/sysdeps/unix/sysv/linux/ssp.c
---- glibc-2.3.2.ORIG/sysdeps/unix/sysv/linux/ssp.c 1970-01-01 01:00:00.000000000 +0100
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/ssp.c 2003-11-08 21:13:58.000000000 +0100
-@@ -0,0 +1,97 @@
-+#include <stdio.h>
-+#include <string.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+
-+#ifdef _POSIX_SOURCE
-+#include <signal.h>
-+#endif
-+
-+#if defined(HAVE_SYSLOG)
-+#include <sys/types.h>
-+#include <sys/socket.h>
-+#include <sys/un.h>
-+
-+#include <sys/syslog.h>
-+#ifndef _PATH_LOG
-+#define _PATH_LOG "/dev/log"
-+#endif
-+#endif
-+
-+long __guard[8] = {0, 0, 0, 0, 0, 0, 0, 0};
-+
-+void __guard_setup (void)
-+{
-+ int fd;
-+ if (__guard[0]!=0) return;
-+ fd = open ("/dev/urandom", 0);
-+ if (fd != -1) {
-+ ssize_t size = read (fd, (char*)&__guard, sizeof(__guard));
-+ close (fd) ;
-+ if (size == sizeof(__guard)) return;
-+ }
-+ /* If a random generator can't be used, the protector switches the guard
-+ to the "terminator canary" */
-+ ((char*)__guard)[0] = 0; ((char*)__guard)[1] = 0;
-+ ((char*)__guard)[2] = '\n'; ((char*)__guard)[3] = 255;
-+}
-+
-+void __stack_smash_handler (char func[], int damaged)
-+{
-+#if defined (__GNU_LIBRARY__)
-+ extern char * __progname;
-+#endif
-+ const char message[] = ": stack smashing attack in function ";
-+ int bufsz = 512, len;
-+ char buf[bufsz];
-+#if defined(HAVE_SYSLOG)
-+ int LogFile;
-+ struct sockaddr_un SyslogAddr; /* AF_UNIX address of local logger */
-+#endif
-+#ifdef _POSIX_SOURCE
-+ {
-+ sigset_t mask;
-+ sigfillset(&mask);
-+ sigdelset(&mask, SIGABRT); /* Block all signal handlers */
-+ sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGABRT */
-+ }
-+#endif
-+
-+ strcpy(buf, "<2>"); len=3; /* send LOG_CRIT */
-+#if defined (__GNU_LIBRARY__)
-+ strncat(buf, __progname, bufsz-len-1); len = strlen(buf);
-+#endif
-+ if (bufsz>len) {strncat(buf, message, bufsz-len-1); len = strlen(buf);}
-+ if (bufsz>len) {strncat(buf, func, bufsz-len-1); len = strlen(buf);}
-+ /* print error message */
-+ write (STDERR_FILENO, buf+3, len-3);
-+#if defined(HAVE_SYSLOG)
-+ if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) != -1) {
-+
-+ /*
-+ * Send "found" message to the "/dev/log" path
-+ */
-+ SyslogAddr.sun_family = AF_UNIX;
-+ (void)strncpy(SyslogAddr.sun_path, _PATH_LOG,
-+ sizeof(SyslogAddr.sun_path) - 1);
-+ SyslogAddr.sun_path[sizeof(SyslogAddr.sun_path) - 1] = '\0';
-+ sendto(LogFile, buf, len, 0, (struct sockaddr *)&SyslogAddr,
-+ sizeof(SyslogAddr));
-+ }
-+#endif
-+
-+#ifdef _POSIX_SOURCE
-+ { /* Make sure the default handler is associated with SIGABRT */
-+ struct sigaction sa;
-+
-+ memset(&sa, 0, sizeof(struct sigaction));
-+ sigfillset(&sa.sa_mask); /* Block all signals */
-+ sa.sa_flags = 0;
-+ sa.sa_handler = SIG_DFL;
-+ sigaction(SIGABRT, &sa, NULL);
-+ (void)kill(getpid(), SIGABRT);
-+ }
-+#endif
-+ _exit(127);
-+}
-+
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-pt_pax.diff b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-pt_pax.diff
deleted file mode 100644
index fdae6f514e62..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-pt_pax.diff
+++ /dev/null
@@ -1,29 +0,0 @@
---- elf/elf.h.orig 2004-01-26 12:54:15.000000000 -0500
-+++ elf/elf.h 2004-01-26 12:53:23.000000000 -0500
-@@ -568,6 +568,7 @@
- #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
- #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
- #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
-+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
- #define PT_LOSUNW 0x6ffffffa
- #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
- #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
-@@ -581,6 +582,18 @@
- #define PF_X (1 << 0) /* Segment is executable */
- #define PF_W (1 << 1) /* Segment is writable */
- #define PF_R (1 << 2) /* Segment is readable */
-+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
-+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
-+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
-+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
-+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
-+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
-+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
-+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
-+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
-+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
-+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
-+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
- #define PF_MASKOS 0x0ff00000 /* OS-specific */
- #define PF_MASKPROC 0xf0000000 /* Processor-specific */
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-redhat-linuxthreads-fixes.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-redhat-linuxthreads-fixes.patch
deleted file mode 100644
index dd9f1436c384..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-redhat-linuxthreads-fixes.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- glibc-2.3.2-net/linuxthreads/Makefile 13 May 2003 19:51:57 -0000 1.1.1.46
-+++ glibc-2.3.2-redhat/linuxthreads/Makefile 13 May 2003 20:07:01 -0000 1.25
-@@ -217,15 +217,18 @@ $(addprefix $(objpfx), \
- $(filter-out $(tests-static) $(tests-reverse) unload, \
- $(tests) $(test-srcs))): $(objpfx)libpthread.so \
- $(objpfx)libpthread_nonshared.a
--# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
-+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
- # since otherwise libpthread.so comes before libc.so when linking.
- $(addprefix $(objpfx), $(tests-reverse)): \
-- $(objpfx)../libc.so $(objpfx)libpthread.so \
-+ $(objpfx)linklibc.so $(objpfx)libpthread.so \
- $(objpfx)libpthread_nonshared.a
- $(objpfx)../libc.so: $(common-objpfx)libc.so ;
- $(addprefix $(objpfx),$(librt-tests)): $(common-objpfx)rt/librt.so
- $(objpfx)unload: $(common-objpfx)dlfcn/libdl.so
- $(objpfx)unload.out: $(objpfx)libpthread.so $(objpfx)libpthread_nonshared.a
-+$(objpfx)linklibc.so: $(common-objpfx)libc.so
-+ ln -s ../libc.so $@
-+generated += libclink.so
- else
- $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
- $(addprefix $(objpfx),$(librt-tests)): $(common-objpfx)rt/librt.a
---- glibc-2.3.2-net/linuxthreads/cancel.c 22 Feb 2003 16:58:54 -0000 1.1.1.15
-+++ glibc-2.3.2-redhat/linuxthreads/cancel.c 23 Feb 2003 21:15:06 -0000 1.10
-@@ -230,5 +230,6 @@ void __pthread_perform_cleanup(char *cur
- }
-
- /* And the TSD which needs special help. */
-+ THREAD_SETMEM (self, p_cancelstate, PTHREAD_CANCEL_DISABLE);
- __libc_thread_freeres ();
- }
---- glibc-2.3.2-net/linuxthreads/lockfile.c 18 Dec 2002 12:43:50 -0000 1.1.1.7
-+++ glibc-2.3.2-redhat/linuxthreads/lockfile.c 18 Dec 2002 12:48:17 -0000 1.8
-@@ -74,7 +74,11 @@ __fresetlockfiles (void)
- __pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE_NP);
-
- for (i = _IO_iter_begin(); i != _IO_iter_end(); i = _IO_iter_next(i))
-- __pthread_mutex_init (_IO_iter_file(i)->_lock, &attr);
-+ {
-+ _IO_lock_t *_lock = _IO_iter_file(i)->_lock;
-+ if (_lock)
-+ __pthread_mutex_init (_lock, &attr);
-+ }
-
- __pthread_mutexattr_destroy (&attr);
-
---- glibc-2.3.2-net/linuxthreads/semaphore.h 25 Jun 2001 11:31:17 -0000 1.1.1.6
-+++ glibc-2.3.2-redhat/linuxthreads/semaphore.h 5 Apr 2002 10:02:50 -0000 1.2
-@@ -21,6 +21,7 @@
- # define __need_timespec
- # include <time.h>
- #endif
-+#include <bits/pthreadtypes.h>
-
- #ifndef _PTHREAD_DESCR_DEFINED
- /* Thread descriptors. Needed for `sem_t' definition. */
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-redhat-nptl-fixes.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-redhat-nptl-fixes.patch
deleted file mode 100644
index c25a834b55dc..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-redhat-nptl-fixes.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- glibc-2.3.2-net/nptl/Makefile 15 May 2003 13:07:24 -0000 1.1.1.45
-+++ glibc-2.3.2-redhat/nptl/Makefile 15 May 2003 13:28:12 -0000 1.50
-@@ -330,15 +330,19 @@ $(addprefix $(objpfx), \
- $(tests) $(test-srcs))): $(objpfx)libpthread.so \
- $(objpfx)libpthread_nonshared.a
- $(objpfx)tst-unload: $(common-objpfx)dlfcn/libdl.so
--# $(objpfx)../libc.so is used instead of $(common-objpfx)libc.so,
-+# $(objpfx)linklibc.so is used instead of $(common-objpfx)libc.so,
- # since otherwise libpthread.so comes before libc.so when linking.
- $(addprefix $(objpfx), $(tests-reverse)): \
-- $(objpfx)../libc.so $(objpfx)libpthread.so \
-+ $(objpfx)linklibc.so $(objpfx)libpthread.so \
- $(objpfx)libpthread_nonshared.a
- $(objpfx)../libc.so: $(common-objpfx)libc.so ;
- $(addprefix $(objpfx),$(tests-static)): $(objpfx)libpthread.a
-
- $(objpfx)tst-atfork2.out: $(objpfx)tst-atfork2mod.so
-+
-+$(objpfx)linklibc.so: $(common-objpfx)libc.so
-+ ln -s ../libc.so $@
-+generated += libclink.so
- else
- $(addprefix $(objpfx),$(tests) $(test-srcs)): $(objpfx)libpthread.a
- endif
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-rtld-assert-fix.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-rtld-assert-fix.patch
deleted file mode 100644
index 8f5830e2a3af..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-rtld-assert-fix.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- glibc-2.3.2/elf/rtld.c 2004-02-03 19:52:59.420623568 +0200
-+++ glibc-2.3.2.rtld/elf/rtld.c 2004-02-03 19:53:20.505418192 +0200
-@@ -1280,19 +1280,7 @@ of this helper program; chances are you
- while (GL(dl_loaded)->l_searchlist.r_list[i] != &GL(dl_rtld_map))
- ++i;
- GL(dl_rtld_map).l_prev = GL(dl_loaded)->l_searchlist.r_list[i - 1];
-- if (__builtin_expect (mode, normal) == normal)
-- GL(dl_rtld_map).l_next = (i + 1 < GL(dl_loaded)->l_searchlist.r_nlist
-- ? GL(dl_loaded)->l_searchlist.r_list[i + 1]
-- : NULL);
-- else
-- /* In trace mode there might be an invisible object (which we
-- could not find) after the previous one in the search list.
-- In this case it doesn't matter much where we put the
-- interpreter object, so we just initialize the list pointer so
-- that the assertion below holds. */
-- GL(dl_rtld_map).l_next = GL(dl_rtld_map).l_prev->l_next;
--
-- assert (GL(dl_rtld_map).l_prev->l_next == GL(dl_rtld_map).l_next);
-+ GL(dl_rtld_map).l_next = GL(dl_rtld_map).l_prev->l_next;
- GL(dl_rtld_map).l_prev->l_next = &GL(dl_rtld_map);
- if (GL(dl_rtld_map).l_next != NULL)
- {
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-s390-deprecated-ustat-fixup.patch b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-s390-deprecated-ustat-fixup.patch
deleted file mode 100644
index a5acebe9edf2..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-s390-deprecated-ustat-fixup.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From bug-glibc-bounces+listarch-bug-glibc=sources dot redhat dot com at gnu dot org Tue Aug 05 19:52:26 2003
-Return-Path: <bug-glibc-bounces+listarch-bug-glibc=sources dot redhat dot com at gnu dot org>
-Delivered-To: listarch-bug-glibc at sources dot redhat dot com
-Received: (qmail 31779 invoked from network); 5 Aug 2003 19:52:26 -0000
-Received: from unknown (HELO monty-python.gnu.org) (199.232.76.173)
- by sources dot redhat dot com with SMTP; 5 Aug 2003 19:52:26 -0000
-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org)
- by monty-python dot gnu dot org with esmtp (Exim 4 dot 20)
- id 19k7hp-0004mC-J0
- for listarch-bug-glibc at sources dot redhat dot com; Tue, 05 Aug 2003 15:42:49 -0400
-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20)
- id 19k7hd-0004lI-No
- for bug-glibc at gnu dot org; Tue, 05 Aug 2003 15:42:37 -0400
-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20)
- id 19k7h7-0004TP-8U
- for bug-glibc at gnu dot org; Tue, 05 Aug 2003 15:42:36 -0400
-Received: from [32.97.182.102] (helo=e2.ny.us.ibm.com)
- by monty-python dot gnu dot org with esmtp (Exim 4 dot 20) id 19k7h6-0004TH-V4
- for bug-glibc at gnu dot org; Tue, 05 Aug 2003 15:42:05 -0400
-Received: from northrelay02.pok.ibm.com (northrelay02.pok.ibm.com
- [9 dot 56 dot 224 dot 150])
- by e2 dot ny dot us dot ibm dot com (8 dot 12 dot 9/8 dot 12 dot 2) with ESMTP id h75Jg3PS037034;
- Tue, 5 Aug 2003 15:42:03 -0400
-Received: from D01ML249.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216])
- by northrelay02 dot pok dot ibm dot com (8 dot 12 dot 9/NCO/VER6 dot 5) with ESMTP id
- h75Jg2vu131828; Tue, 5 Aug 2003 15:42:02 -0400
-Importance: Normal
-MIME-Version: 1.0
-Sensitivity:
-To: schwab at suse dot de, Ulrich Weigand <Ulrich dot Weigand at de dot ibm dot com>
-X-Mailer: Lotus Notes Release 5.0.11 July 24, 2002
-From: William Jay Huie <wjhuie at us dot ibm dot com>
-Message-ID: <OF3D561D81.1A9679A6-ON85256D79.00619378-85256D79.006DAF9F@us.ibm.com>
-Date: Tue, 5 Aug 2003 15:41:56 -0400
-X-MIMETrack: Serialize by Router on D01ML249/01/M/IBM(Release 6.0.1 [IBM]|June
- 10, 2003) at 08/05/2003 15:42:02,
- Serialize complete at 08/05/2003 15:42:02
-Cc: bug-glibc at gnu dot org
-Subject: fixed building gcc-2.3.2 on s390
-X-BeenThere: bug-glibc@gnu.org
-X-Mailman-Version: 2.1.2
-Precedence: list
-List-Id: Bug reports for the GNU standard C library <bug-glibc.gnu.org>
-List-Archive: <http://mail.gnu.org/pipermail/bug-glibc>
-List-Post: <mailto:bug-glibc at gnu dot org>
-List-Help: <mailto:bug-glibc-request at gnu dot org?subject=help>
-List-Subscribe: <http://mail dot gnu dot org/mailman/listinfo/bug-glibc>,
- <mailto:bug-glibc-request at gnu dot org?subject=subscribe>
-Content-Type: multipart/mixed; boundary="===============1920858710=="
-Sender: bug-glibc-bounces+listarch-bug-glibc=sources dot redhat dot com at gnu dot org
-Errors-To: bug-glibc-bounces+listarch-bug-glibc=sources.redhat.com@gnu.org
-
-This is a multipart message in MIME format.
---===============1920858710==
-Content-Type: multipart/alternative;
- boundary="=_alternative 006DAF4085256D79_="
-
-This is a multipart message in MIME format.
---=_alternative 006DAF4085256D79_=
-Content-Type: text/plain; charset="us-ascii"
-
-The problem was related to a file including an obsolete header file.
- Checking /usr/include/sys/ustat.h shows the following comment;
-
- /*
- * This interface is obsolete. Use <sys/statfs.h>
-instead.
- */
-
- Changing the include in the offending file;
-
-osatest2:/usr/src/packages/SOURCES/glibc-2.3.2/sysdeps/unix/sysv/linux #
-diff -u old.ustat.c ustat.c
---- old.ustat.c 2001-07-07 12:21:32.000000000 -0700
-+++ ustat.c 2003-08-05 11:24:20.000000000 -0700
-@@ -18,7 +18,7 @@
- 02111-1307 USA. */
-
- #include <errno.h>
--#include <sys/ustat.h>
-+#include <sys/statfs.h>
- #include <sys/sysmacros.h>
-
- #include <sysdep.h>
-
-
- Things then build correctly,
- This is on a SLES-8 s390 31bit system using glibc levels 2.2.5-92.
- j
-
-Jay Huie
- wjhuie@us.ibm.com
- zSeries Linux System Test
- Phone: 845-435-8164
-
---=_alternative 006DAF4085256D79_=
-Content-Type: text/html; charset="us-ascii"
-
-
-<br><font size=2 face="sans-serif">The problem was related to a file including an obsolete header file.</font>
-<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Checking /usr/include/sys/ustat.h shows the following comment;</font>
-<br>
-<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /*</font>
-<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;* This interface is obsolete. &nbsp;Use &lt;sys/statfs.h&gt; instead.</font>
-<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*/</font>
-<br>
-<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Changing the include in the offending file;</font>
-<br>
-<br><font size=2 face="sans-serif">osatest2:/usr/src/packages/SOURCES/glibc-2.3.2/sysdeps/unix/sysv/linux # diff -u old.ustat.c ustat.c</font>
-<br><font size=2 face="sans-serif">--- old.ustat.c 2001-07-07 12:21:32.000000000 -0700</font>
-<br><font size=2 face="sans-serif">+++ ustat.c &nbsp; &nbsp; 2003-08-05 11:24:20.000000000 -0700</font>
-<br><font size=2 face="sans-serif">@@ -18,7 +18,7 @@</font>
-<br><font size=2 face="sans-serif">&nbsp; &nbsp; 02111-1307 USA. &nbsp;*/</font>
-<br>
-<br><font size=2 face="sans-serif">&nbsp;#include &lt;errno.h&gt;</font>
-<br><font size=2 face="sans-serif">-#include &lt;sys/ustat.h&gt;</font>
-<br><font size=2 face="sans-serif">+#include &lt;sys/statfs.h&gt;</font>
-<br><font size=2 face="sans-serif">&nbsp;#include &lt;sys/sysmacros.h&gt;</font>
-<br>
-<br><font size=2 face="sans-serif">&nbsp;#include &lt;sysdep.h&gt;<br>
-</font>
-<br>
-<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Things then build correctly,</font>
-<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; This is on a SLES-8 s390 31bit system using glibc levels 2.2.5-92.</font>
-<br><font size=2 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; j</font>
-<br><font size=2 face="sans-serif"><br>
-Jay Huie <br>
- &nbsp;wjhuie@us.ibm.com<br>
- &nbsp;zSeries Linux System Test<br>
- &nbsp;Phone: 845-435-8164<br>
-</font>
---=_alternative 006DAF4085256D79_=--
-
-
-
---===============1920858710==
-Content-Type: text/plain; charset="us-ascii"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-Content-Disposition: inline
-
-_______________________________________________
-Bug-glibc mailing list
-Bug-glibc@gnu.org
-http://mail.gnu.org/mailman/listinfo/bug-glibc
-
---===============1920858710==--
-
-
diff --git a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-signal-ssp.diff b/sys-libs/glibc/files/2.3.2/glibc-2.3.2-signal-ssp.diff
deleted file mode 100644
index d35b1aa4cb13..000000000000
--- a/sys-libs/glibc/files/2.3.2/glibc-2.3.2-signal-ssp.diff
+++ /dev/null
@@ -1,40 +0,0 @@
---- ./sysdeps/unix/sysv/linux/ssp.c.orig 2004-01-23 19:54:19.000000000 -0500
-+++ ./sysdeps/unix/sysv/linux/ssp.c 2004-01-23 19:56:34.000000000 -0500
-@@ -52,8 +52,8 @@
- {
- sigset_t mask;
- sigfillset(&mask);
-- sigdelset(&mask, SIGABRT); /* Block all signal handlers */
-- sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGABRT */
-+ sigdelset(&mask, SIGSEGV); /* Block all signal handlers */
-+ sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGSEGV */
- }
- #endif
-
-@@ -65,6 +65,7 @@
- if (bufsz>len) {strncat(buf, func, bufsz-len-1); len = strlen(buf);}
- /* print error message */
- write (STDERR_FILENO, buf+3, len-3);
-+ write (STDERR_FILENO, "()\n", 3);
- #if defined(HAVE_SYSLOG)
- if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) != -1) {
-
-@@ -81,15 +82,15 @@
- #endif
-
- #ifdef _POSIX_SOURCE
-- { /* Make sure the default handler is associated with SIGABRT */
-+ { /* Make sure the default handler is associated with SIGSEGV */
- struct sigaction sa;
-
- memset(&sa, 0, sizeof(struct sigaction));
- sigfillset(&sa.sa_mask); /* Block all signals */
- sa.sa_flags = 0;
- sa.sa_handler = SIG_DFL;
-- sigaction(SIGABRT, &sa, NULL);
-- (void)kill(getpid(), SIGABRT);
-+ sigaction(SIGSEGV, &sa, NULL);
-+ (void)kill(getpid(), SIGSEGV);
- }
- #endif
- _exit(127);
diff --git a/sys-libs/glibc/files/2.3.2/posix_fadvise64.c b/sys-libs/glibc/files/2.3.2/posix_fadvise64.c
deleted file mode 100644
index 5e96088d8bfd..000000000000
--- a/sys-libs/glibc/files/2.3.2/posix_fadvise64.c
+++ /dev/null
@@ -1,90 +0,0 @@
-/* Copyright (C) 2003, 2004 Free Software 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. */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <sysdep.h>
-#include <kernel-features.h>
-
-int __posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise);
-int __posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise);
-
-/* Advice the system about the expected behaviour of the application with
- respect to the file associated with FD. */
-
-struct fadvise64_64_layout
-{
- int fd;
- off64_t offset;
- off64_t len;
- int advise;
-};
-
-int
-__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
-{
-#ifdef __NR_fadvise64_64
- struct fadvise64_64_layout parameters;
- INTERNAL_SYSCALL_DECL (err);
-
- parameters.fd = fd;
- parameters.offset = offset;
- parameters.len = len;
- parameters.advise = advise;
- int ret = INTERNAL_SYSCALL (fadvise64_64, err, 1, &parameters);
- if (!INTERNAL_SYSCALL_ERROR_P (ret, err))
- return 0;
-# ifndef __ASSUME_FADVISE64_64_SYSCALL
- if (INTERNAL_SYSCALL_ERRNO (ret, err) != ENOSYS)
-# endif
- return INTERNAL_SYSCALL_ERRNO (ret, err);
-#endif
-#ifndef __ASSUME_FADVISE64_64_SYSCALL
-# ifdef __NR_fadvise64
- if (len != (off_t) len)
- return EOVERFLOW;
-
- INTERNAL_SYSCALL_DECL (err2);
- int ret2 = INTERNAL_SYSCALL (fadvise64, err2, 5, fd,
- __LONG_LONG_PAIR ((long) (offset >> 32),
- (long) offset),
- (off_t) len, advise);
- if (!INTERNAL_SYSCALL_ERROR_P (ret2, err2))
- return 0;
- return INTERNAL_SYSCALL_ERRNO (ret2, err2);
-# else
- return ENOSYS;
-# endif
-#endif
-}
-
-#include <shlib-compat.h>
-
-#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)
-
-int
-__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise)
-{
- return __posix_fadvise64_l64 (fd, offset, len, advise);
-}
-
-versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3);
-compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2);
-#else
-strong_alias (__posix_fadvise64_l64, posix_fadvise64);
-#endif
diff --git a/sys-libs/glibc/files/2.3.2/ssp.c b/sys-libs/glibc/files/2.3.2/ssp.c
deleted file mode 100644
index ecaf24c068b0..000000000000
--- a/sys-libs/glibc/files/2.3.2/ssp.c
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.2/ssp.c,v 1.1 2004/06/05 15:54:29 tseng Exp $
- *
- * This is a modified version of Hiroaki Etoh's stack smashing routines
- * implemented for glibc.
- *
- * The following people have contributed input to this code.
- * 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>
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <sys/syslog.h>
-#include <sys/time.h>
-#include <sys/sysctl.h>
-
-#ifndef _PATH_LOG
-#define _PATH_LOG "/dev/log"
-#endif
-
-#ifdef __PROPOLICE_BLOCK_SEGV__
-#define SSP_SIGTYPE SIGSEGV
-#elif __PROPOLICE_BLOCK_KILL__
-#define SSP_SIGTYPE SIGKILL
-#else
-#define SSP_SIGTYPE SIGABRT
-#endif
-
-unsigned long __guard = 0UL;
-
-void
-__guard_setup (void)
-{
- size_t size;
-#ifdef HAVE_DEV_ERANDOM
- int mib[3];
-#endif
-
- if (__guard != 0UL)
- return;
-
-#ifndef __SSP_QUICK_CANARY__
-#ifdef HAVE_DEV_ERANDOM
- /* Random is another depth in Linux, hence an array of 3. */
- mib[0] = CTL_KERN;
- mib[1] = KERN_RANDOM;
- mib[2] = RANDOM_ERANDOM;
-
- size = sizeof (unsigned long);
- if (__sysctl (mib, 3, &__guard, &size, NULL, 0) != (-1))
- if (__guard != 0UL)
- return;
-#endif
- /*
- * Attempt to open kernel pseudo random device if one exists before
- * opening urandom to avoid system entropy depletion.
- */
- {
- int fd;
-#ifdef HAVE_DEV_ERANDOM
- if ((fd = open ("/dev/erandom", O_RDONLY)) == (-1))
-#endif
- fd = open ("/dev/urandom", O_RDONLY);
- if (fd != (-1))
- {
- size = read (fd, (char *) &__guard, sizeof (__guard));
- close (fd);
- if (size == sizeof (__guard))
- return;
- }
- }
-#endif
-
- /* If sysctl was unsuccessful, use the "terminator canary". */
- __guard = 0xFF0A0D00UL;
-
- {
- /* Everything failed? Or we are using a weakened model of the
- * terminator canary */
- struct timeval tv;
-
- gettimeofday (&tv, NULL);
- __guard ^= tv.tv_usec ^ tv.tv_sec;
- }
-}
-
-void
-__stack_smash_handler (char func[], int damaged)
-{
- struct sockaddr_un sock; /* AF_UNIX address of local logger */
- struct sigaction sa;
- const char message[] = ": stack smashing attack in function ";
- int bufsz, len, log;
- char buf[512];
- extern char *__progname;
-
- sigset_t mask;
- sigfillset (&mask);
-
- sigdelset (&mask, SSP_SIGTYPE); /* Block all signal handlers */
- sigprocmask (SIG_BLOCK, &mask, NULL); /* except SIGABRT */
-
- bufsz = sizeof (buf);
- strcpy (buf, "<2>");
- len = 3;
-
- strncat (buf, __progname, sizeof (buf) - 4);
- len = strlen (buf);
-
- if (bufsz > len)
- {
- strncat (buf, message, bufsz - len - 1);
- len = strlen (buf);
- }
- if (bufsz > len)
- {
- strncat (buf, func, bufsz - len - 1);
- len = strlen (buf);
- }
-
- /* print error message */
- write (STDERR_FILENO, buf + 3, len - 3);
- write (STDERR_FILENO, "()\n", 3);
- if ((log = socket (AF_UNIX, SOCK_DGRAM, 0)) != -1)
- {
- /* Send "found" message to the "/dev/log" path */
- sock.sun_family = AF_UNIX;
- (void) strncpy (sock.sun_path, _PATH_LOG, sizeof (sock.sun_path) - 1);
- sock.sun_path[sizeof (sock.sun_path) - 1] = '\0';
- sendto (log, buf, len, 0, (struct sockaddr *) &sock, sizeof (sock));
- }
-
- /* Make sure the default handler is associated with the our signal handler */
-
- memset (&sa, 0, sizeof (struct sigaction));
- sigfillset (&sa.sa_mask); /* Block all signals */
- sa.sa_flags = 0;
- sa.sa_handler = SIG_DFL;
- sigaction (SSP_SIGTYPE, &sa, NULL);
- (void) kill (getpid (), SSP_SIGTYPE);
- _exit (127);
-}
diff --git a/sys-libs/glibc/files/2.3.2/sysmacros.h b/sys-libs/glibc/files/2.3.2/sysmacros.h
deleted file mode 100644
index a9bfa78d3ef2..000000000000
--- a/sys-libs/glibc/files/2.3.2/sysmacros.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Definitions of macros to access `dev_t' values.
- Copyright (C) 1996, 1997, 1999, 2003 Free Software 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. */
-
-#ifndef _SYS_SYSMACROS_H
-#define _SYS_SYSMACROS_H 1
-
-#include <features.h>
-
-/* If the compiler does not know long long it is out of luck. We are
- not going to hack weird hacks to support the dev_t representation
- they need. */
-#ifdef __GLIBC_HAVE_LONG_LONG
-__extension__
-extern __inline unsigned int gnu_dev_major (unsigned long long int __dev)
- __THROW;
-__extension__
-extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev)
- __THROW;
-__extension__
-extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major,
- unsigned int __minor)
- __THROW;
-
-# if defined __GNUC__ && __GNUC__ >= 2
-__extension__ extern __inline unsigned int
-gnu_dev_major (unsigned long long int __dev) __THROW
-{
- return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
-}
-
-__extension__ extern __inline unsigned int
-gnu_dev_minor (unsigned long long int __dev) __THROW
-{
- return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
-}
-
-__extension__ extern __inline unsigned long long int
-gnu_dev_makedev (unsigned int __major, unsigned int __minor) __THROW
-{
- return ((__minor & 0xff) | ((__major & 0xfff) << 8)
- | (((unsigned long long int) (__minor & ~0xff)) << 12)
- | (((unsigned long long int) (__major & ~0xfff)) << 32));
-}
-# endif
-
-
-/* Access the functions with their traditional names. */
-# define major(dev) gnu_dev_major (dev)
-# define minor(dev) gnu_dev_minor (dev)
-# define makedev(maj, min) gnu_dev_makedev (maj, min)
-#endif
-
-#endif /* sys/sysmacros.h */
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.2-propolice-guard-functions-v3.patch b/sys-libs/glibc/files/2.3.3/glibc-2.3.2-propolice-guard-functions-v3.patch
deleted file mode 100644
index c4882afa8f9f..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.2-propolice-guard-functions-v3.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -Naur glibc-2.3.2-orig/sysdeps/generic/libc-start.c glibc-2.3.2/sysdeps/generic/libc-start.c
---- glibc-2.3.2-orig/sysdeps/generic/libc-start.c 2004-05-10 01:59:09.000000000 -0400
-+++ glibc-2.3.2/sysdeps/generic/libc-start.c 2004-05-10 02:06:00.865611770 -0400
-@@ -188,6 +188,9 @@
- GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
- #endif
-
-+ /* call the __guard_setup to set up the random __guard value */
-+ __guard_setup (); /* pappy@gentoo.org (pappy rules) */
-+
- #ifdef HAVE_CLEANUP_JMP_BUF
- /* Memory for the cancellation buffer. */
- struct pthread_unwind_buf unwind_buf;
-diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Dist glibc-2.3.2/sysdeps/unix/sysv/linux/Dist
---- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Dist 2004-05-10 01:59:10.000000000 -0400
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Dist 2004-05-10 02:06:54.862038647 -0400
-@@ -1,3 +1,4 @@
-+ssp.c
- bits/initspin.h
- cmsg_nxthdr.c
- dl-brk.c
-diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Makefile glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile
---- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Makefile 2004-05-10 01:59:10.000000000 -0400
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Makefile 2004-05-10 02:07:50.709582758 -0400
-@@ -1,5 +1,5 @@
- ifeq ($(subdir),csu)
--sysdep_routines += errno-loc
-+sysdep_routines += errno-loc ssp
- endif
-
- ifeq ($(subdir),assert)
-diff -Naur glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Versions glibc-2.3.2/sysdeps/unix/sysv/linux/Versions
---- glibc-2.3.2-orig/sysdeps/unix/sysv/linux/Versions 2004-05-10 01:59:10.000000000 -0400
-+++ glibc-2.3.2/sysdeps/unix/sysv/linux/Versions 2004-05-10 02:10:30.410716176 -0400
-@@ -108,6 +108,8 @@
- GLIBC_2.3.2 {
- # New kernel interfaces.
- epoll_create; epoll_ctl; epoll_wait;
-+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
-+ __guard; __guard_setup; __stack_smash_handler;
- }
- GLIBC_2.3.3 {
- gnu_dev_major; gnu_dev_minor; gnu_dev_makedev;
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-dl_execstack-PaX-support.patch b/sys-libs/glibc/files/2.3.3/glibc-2.3.3-dl_execstack-PaX-support.patch
deleted file mode 100644
index 55188bd21d85..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-dl_execstack-PaX-support.patch
+++ /dev/null
@@ -1,70 +0,0 @@
---- glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c 2003-12-13 15:42:16.853396224 +0200
-+++ glibc-2.3.3.PaX/sysdeps/unix/sysv/linux/dl-execstack.c 2003-12-13 15:42:25.290113648 +0200
-@@ -47,11 +47,17 @@
- PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSDOWN) == 0)
- goto return_success;
- # if __ASSUME_PROT_GROWSUPDOWN == 0
-- if (errno == EINVAL)
-+ if (errno == EINVAL) {
- no_growsdown = true;
-- else
-+ } else {
-+# endif
-+ if (errno == EACCES) /* PAX is enabled */
-+ return 0;
-+ else
-+ return errno;
-+# if __ASSUME_PROT_GROWSUPDOWN == 0
-+ }
- # endif
-- return errno;
- }
- # endif
-
-@@ -73,8 +79,11 @@
- page -= size;
- else
- {
-- if (errno != ENOMEM) /* Unexpected failure mode. */
-+ if (errno == EACCES) { /* PAX is enabled */
-+ return 0;
-+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
- return errno;
-+ }
-
- if (size == GL(dl_pagesize))
- /* We just tried to mprotect the top hole page and failed.
-@@ -105,11 +114,17 @@
- PROT_READ|PROT_WRITE|PROT_EXEC|PROT_GROWSUP) == 0)
- goto return_success;
- # if __ASSUME_PROT_GROWSUPDOWN == 0
-- if (errno == EINVAL)
-+ if (errno == EINVAL) {
- no_growsup = true;
-- else
-+ } else {
-+# endif
-+ if (errno == EACCES) /* PAX is enabled */
-+ return 0;
-+ else
-+ return errno;
-+# if __ASSUME_PROT_GROWSUPDOWN == 0
-+ }
- # endif
-- return errno;
- }
- # endif
-
-@@ -130,8 +145,11 @@
- page += size;
- else
- {
-- if (errno != ENOMEM) /* Unexpected failure mode. */
-+ if (errno == EACCES) { /* PAX is enabled */
-+ return 0;
-+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
- return errno;
-+ }
-
- if (size == GL(dl_pagesize))
- /* We just tried to mprotect the lowest hole page and failed.
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-frandom-detect.patch b/sys-libs/glibc/files/2.3.3/glibc-2.3.3-frandom-detect.patch
deleted file mode 100644
index f1dbe7be8a61..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-frandom-detect.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff -Naur glibc-2.3.2-orig/config.h.in glibc-2.3.2/config.h.in
---- glibc-2.3.2-orig/config.h.in 2004-05-11 21:44:51.000000000 -0400
-+++ glibc-2.3.2/config.h.in 2004-05-11 22:41:34.903935791 -0400
-@@ -208,6 +208,9 @@
- /* Defined of libidn is available. */
- #undef HAVE_LIBIDN
-
-+/* Defined if economical random device is available. */
-+#undef HAVE_DEV_ERANDOM
-+
- /*
- */
-
-diff -Naur glibc-2.3.2-orig/configure.in glibc-2.3.2/configure.in
---- glibc-2.3.2-orig/configure.in 2004-05-11 21:44:51.000000000 -0400
-+++ glibc-2.3.2/configure.in 2004-05-11 22:32:57.999546229 -0400
-@@ -289,6 +289,13 @@
- [])
- AC_SUBST(all_warnings)
-
-+dnl See whether the user wants to disable checking for /dev/erandom
-+AC_ARG_ENABLE([dev-erandom],
-+ AC_HELP_STRING([--disable-dev-erandom],
-+ [disable testing for /dev/erandom]),
-+ [try_dev_erandom=$enableval],
-+ [try_dev_erandom=yes])
-+
- AC_CANONICAL_HOST
-
- # The way shlib-versions is used to generate soversions.mk uses a
-@@ -1911,6 +1918,21 @@
- sizeof_long_double=$ac_cv_sizeof_long_double
- AC_SUBST(sizeof_long_double)
-
-+dnl check whether we have an economical random device
-+if test "$try_dev_erandom" = yes ; then
-+ AC_CACHE_CHECK(for economical random device, ac_cv_have_dev_random,
-+ [if test -r "/dev/erandom" ; then
-+ ac_cv_have_dev_erandom=yes; else ac_cv_have_dev_erandom=no; fi])
-+ if test "$ac_cv_have_dev_erandom" = yes; then
-+ AC_DEFINE(HAVE_DEV_ERANDOM,1,
-+ [defined if the system supports an economical random device] )
-+ fi
-+else
-+ AC_MSG_CHECKING(for economical random device)
-+ ac_cv_have_dev_erandom=no
-+ AC_MSG_RESULT(has been disabled)
-+fi
-+
- ### End of automated tests.
- ### Now run sysdeps configure fragments.
-
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-addabi.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-addabi.diff
deleted file mode 100644
index 692e0e114985..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-addabi.diff
+++ /dev/null
@@ -1,52 +0,0 @@
-Index: sysdeps/mips/mips64/n32/Makefile
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/mips/mips64/n32/Makefile,v
-retrieving revision 1.2
-diff -u -r1.2 Makefile
---- sysdeps/mips/mips64/n32/Makefile 29 Mar 2003 08:15:28 -0000 1.2
-+++ sysdeps/mips/mips64/n32/Makefile 14 May 2004 05:32:32 -0000
-@@ -2,5 +2,9 @@
- long-double-fcts = yes
-
- ifeq ($(filter -mabi=n32,$(CC)),)
--CC += -mabi=n32
-+CC += -mabi=n32
- endif
-+ifeq ($(filter "-Wl,-m,elf32btsmipn32",$(LD)),)
-+LD += -Wl,-m,elf32btsmipn32
-+endif
-+ABI_FLAG= -Wl,-m,elf32btsmipn32
-Index: sysdeps/mips/mips64/n64/Makefile
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/mips/mips64/n64/Makefile,v
-retrieving revision 1.2
-diff -u -r1.2 Makefile
---- sysdeps/mips/mips64/n64/Makefile 29 Mar 2003 08:15:28 -0000 1.2
-+++ sysdeps/mips/mips64/n64/Makefile 14 May 2004 05:32:32 -0000
-@@ -4,3 +4,10 @@
- ifeq ($(filter -mabi=64,$(CC)),)
- CC += -mabi=64
- endif
-+ifeq ($(filter "-Wl,-m,elf64btsmip",$(LDFLAGS)),)
-+LDFLAGS += -Wl,-m,elf64btsmip
-+endif
-+ifeq ($(filter "-Wl,-m,elf64btsmip",$(ASFLAGS-.os)),)
-+ASFLAGS-.os += -Wl,-m,elf64btsmip
-+endif
-+ABI_FLAG= -Wl,-m,elf64btsmip
-Index: csu/Makefile
-===================================================================
-RCS file: /cvs/glibc/libc/csu/Makefile,v
-retrieving revision 1.73
-diff -u -r1.73 Makefile
---- csu/Makefile 8 Mar 2004 21:28:15 -0000 1.73
-+++ csu/Makefile 14 May 2004 05:32:18 -0000
-@@ -146,7 +147,7 @@
- subdir_lib: $(extra-objs:%=$(objpfx)%)
-
- define link-relocatable
--$(CC) -nostdlib -nostartfiles -r -o $@ $^
-+$(CC) $(ABI_FLAG) -nostdlib -nostartfiles -r -o $@ $^
- endef
-
- ifndef start-installed-name-rule
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-nolib3264.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-nolib3264.diff
deleted file mode 100644
index eb4fed8e656d..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-nolib3264.diff
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: sysdeps/unix/sysv/linux/configure
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/configure,v
-retrieving revision 1.86
-diff -u -r1.86 configure
---- sysdeps/unix/sysv/linux/configure 23 Mar 2003 02:10:04 -0000 1.86
-+++ sysdeps/unix/sysv/linux/configure 1 Jun 2004 04:25:42 -0000
-@@ -224,8 +224,7 @@
- /usr | /usr/)
- # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
- case $machine in
-- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
-- mips/mips64/n64/* )
-+ sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 )
- libc_cv_slibdir="/lib64"
- if test "$libdir" = '${exec_prefix}/lib'; then
- libdir='${exec_prefix}/lib64';
-@@ -233,14 +232,6 @@
- libc_cv_localedir='${exec_prefix}/lib/locale'
- fi
- ;;
-- mips/mips64/n32/* )
-- libc_cv_slibdir="/lib32"
-- if test "$libdir" = '${exec_prefix}/lib'; then
-- libdir='${exec_prefix}/lib32';
-- # Locale data can be shared between 32bit and 64bit libraries
-- libc_cv_localedir='${exec_prefix}/lib/locale'
-- fi
-- ;;
- *)
- libc_cv_slibdir="/lib"
- ;;
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-semtimedop.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-semtimedop.diff
deleted file mode 100644
index 47132afd11b8..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-semtimedop.diff
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: sysdeps/unix/sysv/linux/mips/mips64/syscalls.list
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/mips64/syscalls.list,v
-retrieving revision 1.2
-diff -u -r1.2 syscalls.list
---- sysdeps/unix/sysv/linux/mips/mips64/syscalls.list 3 Sep 2003 03:16:25 -0000 1.2
-+++ sysdeps/unix/sysv/linux/mips/mips64/syscalls.list 14 May 2004 05:32:37 -0000
-@@ -18,3 +18,4 @@
- semop - semop i:ipi __semop semop
- semget - semget i:iii __semget semget
- semctl - semctl i:iiii __semctl semctl
-+semtimedop - semtimedop i:ipip semtimedop
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-syscall.h.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-syscall.h.diff
deleted file mode 100644
index fdbd3b9058bc..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-syscall.h.diff
+++ /dev/null
@@ -1,30 +0,0 @@
-This patch actually makes file identical to default implementaion..
-
-Index: sysdeps/unix/sysv/linux/mips/sys/syscall.h
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/sys/syscall.h,v
-retrieving revision 1.8
-diff -u -r1.8 syscall.h
---- sysdeps/unix/sysv/linux/mips/sys/syscall.h 17 Mar 2003 15:50:05 -0000 1.8
-+++ sysdeps/unix/sysv/linux/mips/sys/syscall.h 14 May 2004 17:03:29 -0000
-@@ -19,17 +19,10 @@
- #ifndef _SYSCALL_H
- #define _SYSCALL_H 1
-
--/* This file should list the numbers of the system the system knows.
-- But instead of duplicating this we use the information available
-- from the kernel sources. */
--#ifdef _LIBC
--/* Since the kernel doesn't define macro names in a way usable for
-- glibc, we preprocess this header, and use it during the glibc build
-- process. */
--# include <asm-unistd.h>
--#else
-+/* This file should list the numbers of the system calls the system
-+ knows. But instead of duplicating this we use the information
-+ available from the kernel sources. */
- # include <asm/unistd.h>
--#endif
-
- #ifndef _LIBC
- /* The Linux kernel header file defines macros `__NR_<name>', but some
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-sysify.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-sysify.diff
deleted file mode 100644
index 09b1adbb6fbc..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-mips-sysify.diff
+++ /dev/null
@@ -1,52 +0,0 @@
-Index: sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h,v
-retrieving revision 1.3
-diff -u -r1.3 sysdep.h
---- sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h 1 Oct 2003 06:59:39 -0000 1.3
-+++ sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h 14 May 2004 19:01:28 -0000
-@@ -28,9 +28,9 @@
- so we have to redefine the `SYS_ify' macro here. */
- #undef SYS_ify
- #ifdef __STDC__
--# define SYS_ify(syscall_name) __NR_N32_##syscall_name
-+# define SYS_ify(syscall_name) __NR_##syscall_name
- #else
--# define SYS_ify(syscall_name) __NR_N32_/**/syscall_name
-+# define SYS_ify(syscall_name) __NR_/**/syscall_name
- #endif
-
- #ifdef __ASSEMBLER__
-Index: sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h,v
-retrieving revision 1.3
-diff -u -r1.3 sysdep.h
---- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h 1 Oct 2003 06:59:40 -0000 1.3
-+++ sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h 14 May 2004 19:01:28 -0000
-@@ -28,9 +28,9 @@
- so we have to redefine the `SYS_ify' macro here. */
- #undef SYS_ify
- #ifdef __STDC__
--# define SYS_ify(syscall_name) __NR_N64_##syscall_name
-+# define SYS_ify(syscall_name) __NR_##syscall_name
- #else
--# define SYS_ify(syscall_name) __NR_N64_/**/syscall_name
-+# define SYS_ify(syscall_name) __NR_/**/syscall_name
- #endif
-
- #ifdef __ASSEMBLER__
---- sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h.orig 2004-05-18 14:51:16.000000000 -0700
-+++ sysdeps/unix/sysv/linux/mips/mips32/kern64/sysdep.h 2004-05-19 15:07:23.000000000 -0700
-@@ -28,9 +28,9 @@
- so we have to redefine the `SYS_ify' macro here. */
- #undef SYS_ify
- #ifdef __STDC__
--# define SYS_ify(syscall_name) __NR_O32_##syscall_name
-+# define SYS_ify(syscall_name) __NR_##syscall_name
- #else
--# define SYS_ify(syscall_name) __NR_O32_/**/syscall_name
-+# define SYS_ify(syscall_name) __NR_/**/syscall_name
- #endif
-
- #endif /* linux/mips/mips32/kern64/sysdep.h */
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-owl-malloc-unlink-sanity-check.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3-owl-malloc-unlink-sanity-check.diff
deleted file mode 100644
index 1525fa005632..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-owl-malloc-unlink-sanity-check.diff
+++ /dev/null
@@ -1,29 +0,0 @@
---- malloc/malloc.c.orig 2004-01-03 18:36:23.000000000 -0500
-+++ malloc/malloc.c 2004-01-03 18:46:16.000000000 -0500
-@@ -311,6 +311,11 @@ extern "C" {
- #define assert(x) ((void)0)
- #endif
-
-+/* needed for owl-malloc-unlink-sanity-check */
-+#include <abort-instr.h>
-+#ifndef ABORT_INSTRUCTION
-+#define ABORT_INSTRUCTION
-+#endif
-
- /*
- INTERNAL_SIZE_T is the word-size used for internal bookkeeping
-@@ -1951,6 +1956,14 @@ typedef struct malloc_chunk* mbinptr;
- #define unlink(P, BK, FD) { \
- FD = P->fd; \
- BK = P->bk; \
-+ /* owl-malloc-unlink-sanity-check */ \
-+ if (FD->bk != P || BK->fd != P) \
-+ { \
-+ ABORT_INSTRUCTION; \
-+ _exit(127); \
-+ while (1) \
-+ ABORT_INSTRUCTION; \
-+ } \
- FD->bk = BK; \
- BK->fd = FD; \
- }
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-tempfile.patch b/sys-libs/glibc/files/2.3.3/glibc-2.3.3-tempfile.patch
deleted file mode 100644
index bfca2af527f5..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3-tempfile.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- glibc-2.3.2.orig/debug/catchsegv.sh 2004-10-05 01:25:30.683814576 -0400
-+++ glibc-2.3.2/debug/catchsegv.sh 2004-10-05 01:26:57.567606232 -0400
-@@ -49,9 +49,7 @@
- esac
- fi
-
--segv_output=`basename "$prog"`.segv.$$
--# Make sure this output file does not exist.
--rm -f "$segv_output"
-+segv_output=`mktemp \`basename "$prog".segv.XXXXXX\`` || exit 1
-
- # Redirect stderr to avoid termination message from shell.
- (exec 3>&2 2>/dev/null
-@@ -64,7 +62,7 @@
- # Check for output. Even if the program terminated correctly it might
- # be that a minor process (clone) failed. Therefore we do not check the
- # exit code.
--if test -f "$segv_output"; then
-+if test -s "$segv_output"; then
- # The program caught a signal. The output is in the file with the
- # name we have in SEGFAULT_OUTPUT_NAME. In the output the names of
- # functions in shared objects are available, but names in the static
-@@ -101,7 +99,7 @@
- ;;
- esac
- done)
-- rm -f "$segv_output"
- fi
-+rm -f "$segv_output"
-
- exit $exval
---- glibc-2.3.2.orig/libio/oldtmpfile.c 2004-10-05 01:25:31.045759552 -0400
-+++ glibc-2.3.2/libio/oldtmpfile.c 2004-10-05 01:27:55.304828840 -0400
-@@ -36,7 +36,7 @@
- int fd;
- FILE *f;
-
-- if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
-+ if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 1))
- return NULL;
- fd = __gen_tempname (buf, __GT_FILE);
- if (fd < 0)
---- glibc-2.3.2.orig/sysdeps/generic/tmpfile.c 2004-10-05 01:25:40.103382584 -0400
-+++ glibc-2.3.2/sysdeps/generic/tmpfile.c 2004-10-05 01:28:55.235717960 -0400
-@@ -43,7 +43,7 @@
- int fd;
- FILE *f;
-
-- if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 0))
-+ if (__path_search (buf, FILENAME_MAX, NULL, "tmpf", 1))
- return NULL;
- fd = __gen_tempname (buf, GEN_THIS);
- if (fd < 0)
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-got-fix.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-got-fix.diff
deleted file mode 100644
index c0edccd8f38d..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-got-fix.diff
+++ /dev/null
@@ -1,22 +0,0 @@
---- glibc-2.3.2/sysdeps/i386/elf/start.S 2004-02-05 18:14:37.000000000 +0100
-+++ glibc-2.3.2/sysdeps/i386/elf/start.S 2004-02-05 23:32:16.000000000 +0100
-@@ -73,16 +73,13 @@ _start:
- addl $_GLOBAL_OFFSET_TABLE_, %ebx
-
- /* Push address of our own entry points to .fini and .init. */
-- leal __libc_csu_fini@GOTOFF(%ebx), %eax
-- pushl %eax
-- leal __libc_csu_init@GOTOFF(%ebx), %eax
-- pushl %eax
-+ pushl __libc_csu_fini@GOT(%ebx)
-+ pushl __libc_csu_init@GOT(%ebx)
-
- pushl %ecx /* Push second argument: argv. */
- pushl %esi /* Push first argument: argc. */
-
-- leal BP_SYM (main)@GOTOFF(%ebx), %eax
-- pushl %eax
-+ pushl BP_SYM (main)@GOT(%ebx)
-
- /* Call the user's main function, and exit with its value.
- But let the libc call main. */
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-pt_pax.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-pt_pax.diff
deleted file mode 100644
index fdae6f514e62..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-pt_pax.diff
+++ /dev/null
@@ -1,29 +0,0 @@
---- elf/elf.h.orig 2004-01-26 12:54:15.000000000 -0500
-+++ elf/elf.h 2004-01-26 12:53:23.000000000 -0500
-@@ -568,6 +568,7 @@
- #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */
- #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */
- #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */
-+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */
- #define PT_LOSUNW 0x6ffffffa
- #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */
- #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */
-@@ -581,6 +582,18 @@
- #define PF_X (1 << 0) /* Segment is executable */
- #define PF_W (1 << 1) /* Segment is writable */
- #define PF_R (1 << 2) /* Segment is readable */
-+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */
-+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */
-+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */
-+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */
-+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */
-+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */
-+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */
-+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */
-+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */
-+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */
-+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */
-+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */
- #define PF_MASKOS 0x0ff00000 /* OS-specific */
- #define PF_MASKPROC 0xf0000000 /* Processor-specific */
-
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-signal-ssp.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-signal-ssp.diff
deleted file mode 100644
index d35b1aa4cb13..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040117-signal-ssp.diff
+++ /dev/null
@@ -1,40 +0,0 @@
---- ./sysdeps/unix/sysv/linux/ssp.c.orig 2004-01-23 19:54:19.000000000 -0500
-+++ ./sysdeps/unix/sysv/linux/ssp.c 2004-01-23 19:56:34.000000000 -0500
-@@ -52,8 +52,8 @@
- {
- sigset_t mask;
- sigfillset(&mask);
-- sigdelset(&mask, SIGABRT); /* Block all signal handlers */
-- sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGABRT */
-+ sigdelset(&mask, SIGSEGV); /* Block all signal handlers */
-+ sigprocmask(SIG_BLOCK, &mask, NULL); /* except SIGSEGV */
- }
- #endif
-
-@@ -65,6 +65,7 @@
- if (bufsz>len) {strncat(buf, func, bufsz-len-1); len = strlen(buf);}
- /* print error message */
- write (STDERR_FILENO, buf+3, len-3);
-+ write (STDERR_FILENO, "()\n", 3);
- #if defined(HAVE_SYSLOG)
- if ((LogFile = socket(AF_UNIX, SOCK_DGRAM, 0)) != -1) {
-
-@@ -81,15 +82,15 @@
- #endif
-
- #ifdef _POSIX_SOURCE
-- { /* Make sure the default handler is associated with SIGABRT */
-+ { /* Make sure the default handler is associated with SIGSEGV */
- struct sigaction sa;
-
- memset(&sa, 0, sizeof(struct sigaction));
- sigfillset(&sa.sa_mask); /* Block all signals */
- sa.sa_flags = 0;
- sa.sa_handler = SIG_DFL;
-- sigaction(SIGABRT, &sa, NULL);
-- (void)kill(getpid(), SIGABRT);
-+ sigaction(SIGSEGV, &sa, NULL);
-+ (void)kill(getpid(), SIGSEGV);
- }
- #endif
- _exit(127);
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040420-mips-dl-machine-calls.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040420-mips-dl-machine-calls.diff
deleted file mode 100644
index 852ecd113a9a..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040420-mips-dl-machine-calls.diff
+++ /dev/null
@@ -1,39 +0,0 @@
-Index: sysdeps/mips/dl-machine.h
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/mips/dl-machine.h,v
-retrieving revision 1.71
-diff -u -r1.71 dl-machine.h
---- sysdeps/mips/dl-machine.h 15 Apr 2004 14:08:16 -0000 1.71
-+++ sysdeps/mips/dl-machine.h 30 Apr 2004 15:05:23 -0000
-@@ -254,7 +255,7 @@
- }
- }
-
-- INTUSE (_dl_signal_error) (0, NULL, NULL, "cannot find runtime link map");
-+ GLRO(dl_signal_error) (0, NULL, NULL, "cannot find runtime link map");
- return NULL;
- }
-
-@@ -362,17 +363,17 @@
- \
- if (version->hash != 0) \
- { \
-- value = _dl_lookup_versioned_symbol(strtab + sym->st_name, l, \
-+ value = GLRO(dl_lookup_symbol_x)(strtab + sym->st_name, l, \
- &sym, l->l_scope, version,\
-- ELF_RTYPE_CLASS_PLT, 0); \
-+ ELF_RTYPE_CLASS_PLT, 0,NULL); \
- break; \
- } \
- /* Fall through. */ \
- } \
- case 0: \
-- value = _dl_lookup_symbol (strtab + sym->st_name, l, &sym, \
-- l->l_scope, ELF_RTYPE_CLASS_PLT, \
-- DL_LOOKUP_ADD_DEPENDENCY); \
-+ value = GLRO(dl_lookup_symbol_x) (strtab + sym->st_name, l, &sym, \
-+ l->l_scope, NULL, ELF_RTYPE_CLASS_PLT, \
-+ DL_LOOKUP_ADD_DEPENDENCY,NULL); \
- } \
- \
- /* Currently value contains the base load address of the object \
diff --git a/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040420-mips-incl-sgidefs.diff b/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040420-mips-incl-sgidefs.diff
deleted file mode 100644
index ef445755f27c..000000000000
--- a/sys-libs/glibc/files/2.3.3/glibc-2.3.3_pre20040420-mips-incl-sgidefs.diff
+++ /dev/null
@@ -1,252 +0,0 @@
---- ./sysdeps/mips/bits/setjmp.h.orig 2003-12-12 02:59:09.000000000 +0100
-+++ ./sysdeps/mips/bits/setjmp.h 2003-12-12 03:28:17.000000000 +0100
-@@ -22,6 +22,8 @@
- # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
- #endif
-
-+#include <sgidefs.h>
-+
- typedef struct
- {
- #if _MIPS_SIM == _MIPS_SIM_ABI32
---- ./sysdeps/mips/mips64/setjmp.S.orig 2003-12-12 03:48:28.000000000 +0100
-+++ ./sysdeps/mips/mips64/setjmp.S 2003-12-12 03:48:19.000000000 +0100
-@@ -17,6 +17,7 @@
- 02111-1307 USA. */
-
- #include <sysdep.h>
-+#include <sgidefs.h>
- #include <sys/asm.h>
-
- /* The function __sigsetjmp_aux saves all the registers, but it can't
---- ./sysdeps/mips/mips64/bsd-_setjmp.S.orig 2003-12-12 03:48:06.000000000 +0100
-+++ ./sysdeps/mips/mips64/bsd-_setjmp.S 2003-12-12 03:47:56.000000000 +0100
-@@ -22,6 +22,7 @@
- in setjmp doesn't clobber the state restored by longjmp. */
-
- #include <sysdep.h>
-+#include <sgidefs.h>
- #include <sys/asm.h>
-
- #ifdef __PIC__
---- ./sysdeps/mips/mips64/bsd-setjmp.S.orig 2003-12-12 03:47:41.000000000 +0100
-+++ ./sysdeps/mips/mips64/bsd-setjmp.S 2003-12-12 03:47:30.000000000 +0100
-@@ -22,6 +22,7 @@
- in setjmp doesn't clobber the state restored by longjmp. */
-
- #include <sysdep.h>
-+#include <sgidefs.h>
- #include <sys/asm.h>
-
- #ifdef PIC
---- ./sysdeps/mips/fpu/bits/mathdef.h.orig 2003-12-12 02:59:09.000000000 +0100
-+++ ./sysdeps/mips/fpu/bits/mathdef.h 2003-12-12 03:26:31.000000000 +0100
-@@ -21,6 +21,8 @@
- # error "Never use <bits/mathdef.h> directly; include <math.h> instead"
- #endif
-
-+#include <sgidefs.h>
-+
- #if defined __USE_ISOC99 && defined _MATH_H && !defined _MATH_H_MATHDEF
- # define _MATH_H_MATHDEF 1
-
---- ./sysdeps/mips/sys/regdef.h.orig 2003-12-12 02:59:10.000000000 +0100
-+++ ./sysdeps/mips/sys/regdef.h 2003-12-12 03:26:58.000000000 +0100
-@@ -20,6 +20,8 @@
- #ifndef _SYS_REGDEF_H
- #define _SYS_REGDEF_H
-
-+#include <sgidefs.h>
-+
- /*
- * Symbolic register names for 32 bit ABI
- */
---- ./sysdeps/mips/sys/ucontext.h.orig 2003-12-12 02:59:10.000000000 +0100
-+++ ./sysdeps/mips/sys/ucontext.h 2003-12-12 03:29:41.000000000 +0100
-@@ -23,6 +23,7 @@
-
- #include <features.h>
- #include <signal.h>
-+#include <sgidefs.h>
-
- /* Type for general register. */
- #if _MIPS_SIM == _MIPS_SIM_ABI32
---- ./sysdeps/mips/elf/start.S.orig 2003-12-12 03:47:16.000000000 +0100
-+++ ./sysdeps/mips/elf/start.S 2003-12-12 03:47:05.000000000 +0100
-@@ -20,6 +20,7 @@
-
- #define __ASSEMBLY__ 1
- #include <entry.h>
-+#include <sgidefs.h>
- #include <sys/asm.h>
-
- #ifndef ENTRY_POINT
---- ./sysdeps/mips/atomicity.h.orig 2003-12-12 03:46:51.000000000 +0100
-+++ ./sysdeps/mips/atomicity.h 2003-12-12 03:46:43.000000000 +0100
-@@ -21,6 +21,7 @@
- #define _MIPS_ATOMICITY_H 1
-
- #include <inttypes.h>
-+#include <sgidefs.h>
-
- static inline int
- __attribute__ ((unused))
---- ./sysdeps/mips/dl-machine.h.orig 2003-12-12 03:46:33.000000000 +0100
-+++ ./sysdeps/mips/dl-machine.h 2003-12-12 03:46:19.000000000 +0100
-@@ -27,6 +27,7 @@
- #define ELF_MACHINE_NO_PLT
-
- #include <entry.h>
-+#include <sgidefs.h>
-
- #ifndef ENTRY_POINT
- #error ENTRY_POINT needs to be defined for MIPS.
---- ./sysdeps/mips/machine-gmon.h.orig 2003-12-12 03:46:05.000000000 +0100
-+++ ./sysdeps/mips/machine-gmon.h 2003-12-12 03:45:55.000000000 +0100
-@@ -18,6 +18,8 @@
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
-
-+#include <sgidefs.h>
-+
- #define _MCOUNT_DECL(frompc,selfpc) \
- static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
-
---- ./sysdeps/unix/mips/sysdep.h.orig 2003-12-12 03:45:36.000000000 +0100
-+++ ./sysdeps/unix/mips/sysdep.h 2003-12-12 03:45:23.000000000 +0100
-@@ -19,6 +19,7 @@
- 02111-1307 USA. */
-
- #include <sysdeps/unix/sysdep.h>
-+#include <sgidefs.h>
-
- #ifdef __ASSEMBLER__
-
---- ./sysdeps/unix/sysv/linux/mips/bits/sigcontext.h.orig 2003-12-12 02:59:10.000000000 +0100
-+++ ./sysdeps/unix/sysv/linux/mips/bits/sigcontext.h 2003-12-12 03:33:57.000000000 +0100
-@@ -20,6 +20,8 @@
- # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
- #endif
-
-+#include <sgidefs.h>
-+
- #ifndef sigcontext_struct
- /* Kernel headers before 2.1.1 define a struct sigcontext_struct, but
- we need sigcontext. */
---- ./sysdeps/unix/sysv/linux/mips/bits/stat.h.orig 2003-12-12 02:59:10.000000000 +0100
-+++ ./sysdeps/unix/sysv/linux/mips/bits/stat.h 2003-12-12 03:34:15.000000000 +0100
-@@ -21,6 +21,8 @@
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- #endif
-
-+#include <sgidefs.h>
-+
- /* Versions of the `struct stat' data structure. */
- #define _STAT_VER_LINUX_OLD 1
- #define _STAT_VER_KERNEL 1
---- ./sysdeps/unix/sysv/linux/mips/sigaction.c.orig 2003-12-12 03:43:00.000000000 +0100
-+++ ./sysdeps/unix/sysv/linux/mips/sigaction.c 2003-12-12 03:42:49.000000000 +0100
-@@ -21,6 +21,7 @@
- #include <string.h>
-
- #include <sysdep.h>
-+#include <sgidefs.h>
- #include <sys/syscall.h>
-
- #include "kernel-features.h"
---- ./sysdeps/unix/sysv/linux/mips/sys/tas.h.orig 2003-12-12 02:59:10.000000000 +0100
-+++ ./sysdeps/unix/sysv/linux/mips/sys/tas.h 2003-12-12 03:36:26.000000000 +0100
-@@ -21,6 +21,7 @@
- #define _SYS_TAS_H 1
-
- #include <features.h>
-+#include <sgidefs.h>
-
- __BEGIN_DECLS
-
---- ./sysdeps/unix/sysv/linux/mips/sys/user.h.orig 2003-12-12 02:59:10.000000000 +0100
-+++ ./sysdeps/unix/sysv/linux/mips/sys/user.h 2003-12-12 03:36:35.000000000 +0100
-@@ -19,6 +19,8 @@
- #ifndef _SYS_USER_H
- #define _SYS_USER_H 1
-
-+#include <sgidefs.h>
-+
- /* The whole purpose of this file is for GDB and GDB only. Don't read
- too much into it. Don't use it for anything other than GDB unless
- you know what you are doing. */
---- ./sysdeps/unix/sysv/linux/mips/sys/ucontext.h.orig 2003-12-12 03:45:05.000000000 +0100
-+++ ./sysdeps/unix/sysv/linux/mips/sys/ucontext.h 2003-12-12 03:44:55.000000000 +0100
-@@ -22,6 +22,7 @@
- #define _SYS_UCONTEXT_H 1
-
- #include <features.h>
-+#include <sgidefs.h>
- #include <signal.h>
-
- /* We need the signal context definitions even if they are not used
---- ./sysdeps/unix/sysv/linux/mips/kernel_stat.h.orig 2003-12-12 03:44:37.000000000 +0100
-+++ ./sysdeps/unix/sysv/linux/mips/kernel_stat.h 2003-12-12 03:44:22.000000000 +0100
-@@ -1,6 +1,9 @@
- /* As tempting as it is to define XSTAT_IS_XSTAT64 for n64, the
- userland data structures are not identical, because of different
- padding. */
-+
-+#include <sgidefs.h>
-+
- /* Definition of `struct stat' used in the kernel. */
- #if _MIPS_SIM != _MIPS_SIM_ABI32
- struct kernel_stat
---- ./sysdeps/unix/sysv/linux/mips/configure.orig 2003-12-12 03:51:49.000000000 +0100
-+++ ./sysdeps/unix/sysv/linux/mips/configure 2003-12-12 03:49:46.000000000 +0100
-@@ -41,7 +41,7 @@ echo "$as_me: WARNING: *** asm/unistd.h
- name = $2;
- sub (/_O32_/, "_", name);
- print;
-- print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
-+ print "#if defined _ABIO32 && _MIPS_SIM == _ABIO32";
- print "# define " name " " $2;
- print "#endif";
- next;
---- ./sysdeps/unix/sysv/linux/mips/configure.in.orig 2003-12-12 03:51:35.000000000 +0100
-+++ ./sysdeps/unix/sysv/linux/mips/configure.in 2003-12-12 03:49:38.000000000 +0100
-@@ -41,7 +41,7 @@ mips*64*)
- name = $2;
- sub (/_O32_/, "_", name);
- print;
-- print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
-+ print "#if defined _ABIO32 && _MIPS_SIM == _ABIO32";
- print "# define " name " " $2;
- print "#endif";
- next;
---- ./sysdeps/unix/sysv/linux/mips/sigcontextinfo.h.orig 2003-12-12 03:43:32.000000000 +0100
-+++ ./sysdeps/unix/sysv/linux/mips/sigcontextinfo.h 2003-12-12 03:43:16.000000000 +0100
-@@ -17,6 +17,8 @@
- 02111-1307 USA. */
-
-
-+#include <sgidefs.h>
-+
- #if _MIPS_SIM == _MIPS_SIM_ABI32
-
- #define SIGCONTEXT unsigned long _code, struct sigcontext *
---- ./linuxthreads/sysdeps/mips/pspinlock.c.orig 2003-12-12 02:59:09.000000000 +0100
-+++ ./linuxthreads/sysdeps/mips/pspinlock.c 2003-12-12 03:59:27.000000000 +0100
-@@ -19,6 +19,7 @@
-
- #include <errno.h>
- #include <pthread.h>
-+#include <sgidefs.h>
- #include <sys/tas.h>
- #include "internals.h"
-
---- ./linuxthreads/sysdeps/mips/pt-machine.h.orig 2003-12-12 02:59:09.000000000 +0100
-+++ ./linuxthreads/sysdeps/mips/pt-machine.h 2003-12-12 03:59:26.000000000 +0100
-@@ -24,6 +24,7 @@
- #ifndef _PT_MACHINE_H
- #define _PT_MACHINE_H 1
-
-+#include <sgidefs.h>
- #include <sys/tas.h>
-
- #ifndef PT_EI
diff --git a/sys-libs/glibc/files/2.3.3/ssp.c b/sys-libs/glibc/files/2.3.3/ssp.c
deleted file mode 100644
index d288f6fc5c6d..000000000000
--- a/sys-libs/glibc/files/2.3.3/ssp.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.3/ssp.c,v 1.3 2004/08/07 17:53:20 solar Exp $
- *
- * This is a modified version of Hiroaki Etoh's stack smashing routines
- * implemented for glibc.
- *
- * The following people have contributed input to this code.
- * 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>
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <sys/syslog.h>
-#include <sys/time.h>
-#include <sys/sysctl.h>
-
-#ifndef _PATH_LOG
-#define _PATH_LOG "/dev/log"
-#endif
-
-#ifdef __PROPOLICE_BLOCK_SEGV__
-#define SSP_SIGTYPE SIGSEGV
-#elif __PROPOLICE_BLOCK_KILL__
-#define SSP_SIGTYPE SIGKILL
-#else
-#define SSP_SIGTYPE SIGABRT
-#endif
-
-unsigned long __guard = 0UL;
-
-void
-__guard_setup (void)
-{
- size_t size;
-#ifdef HAVE_DEV_ERANDOM
- int mib[3];
-#endif
-
- if (__guard != 0UL)
- return;
-
-#ifndef __SSP_QUICK_CANARY__
-#ifdef HAVE_DEV_ERANDOM
- /* Random is another depth in Linux, hence an array of 3. */
- mib[0] = CTL_KERN;
- mib[1] = KERN_RANDOM;
- mib[2] = RANDOM_ERANDOM;
-
- size = sizeof (unsigned long);
- if (__sysctl (mib, 3, &__guard, &size, NULL, 0) != (-1))
- if (__guard != 0UL)
- return;
-#endif
- /*
- * Attempt to open kernel pseudo random device if one exists before
- * opening urandom to avoid system entropy depletion.
- */
- {
- int fd;
-#ifdef HAVE_DEV_ERANDOM
- if ((fd = open ("/dev/erandom", O_RDONLY)) == (-1))
-#endif
- fd = open ("/dev/urandom", O_RDONLY);
- if (fd != (-1))
- {
- size = read (fd, (char *) &__guard, sizeof (__guard));
- close (fd);
- if (size == sizeof (__guard))
- return;
- }
- }
-#endif
-
- /* If sysctl was unsuccessful, use the "terminator canary". */
- __guard = 0xFF0A0D00UL;
-
- {
- /* Everything failed? Or we are using a weakened model of the
- * terminator canary */
- struct timeval tv;
-
- gettimeofday (&tv, NULL);
- __guard ^= tv.tv_usec ^ tv.tv_sec;
- }
-}
-
-void
-__stack_smash_handler (char func[], int damaged)
-{
- struct sigaction sa;
- const char message[] = ": stack smashing attack in function ";
- int bufsz, len;
- char buf[512];
-#ifndef __dietlibc__
- struct sockaddr_un sock; /* AF_UNIX address of local logger */
- int log;
- extern char *__progname;
-#else
- static char *__progname = "dietapp";
-#endif
-
- sigset_t mask;
- sigfillset (&mask);
-
- sigdelset (&mask, SSP_SIGTYPE); /* Block all signal handlers */
- sigprocmask (SIG_BLOCK, &mask, NULL); /* except SIGABRT */
-
- bufsz = sizeof (buf);
- strcpy (buf, "<2>");
- len = 3;
-
- strncat (buf, __progname, sizeof (buf) - 4);
- len = strlen (buf);
-
- if (bufsz > len)
- {
- strncat (buf, message, bufsz - len - 1);
- len = strlen (buf);
- }
- if (bufsz > len)
- {
- strncat (buf, func, bufsz - len - 1);
- len = strlen (buf);
- }
-
- /* print error message */
- write (STDERR_FILENO, buf + 3, len - 3);
- write (STDERR_FILENO, "()\n", 3);
-#ifndef __dietlibc__
- if ((log = socket (AF_UNIX, SOCK_DGRAM, 0)) != -1)
- {
- /* Send "found" message to the "/dev/log" path */
- sock.sun_family = AF_UNIX;
- (void) strncpy (sock.sun_path, _PATH_LOG, sizeof (sock.sun_path) - 1);
- sock.sun_path[sizeof (sock.sun_path) - 1] = '\0';
- sendto (log, buf, len, 0, (struct sockaddr *) &sock, sizeof (sock));
- }
-#endif
- /* Make sure the default handler is associated with the our signal handler */
-
- memset (&sa, 0, sizeof (struct sigaction));
- sigfillset (&sa.sa_mask); /* Block all signals */
- sa.sa_flags = 0;
- sa.sa_handler = SIG_DFL;
- sigaction (SSP_SIGTYPE, &sa, NULL);
- (void) kill (getpid (), SSP_SIGTYPE);
- _exit (127);
-}
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.3-mdns-resolver2.diff b/sys-libs/glibc/files/2.3.4/glibc-2.3.3-mdns-resolver2.diff
deleted file mode 100644
index b9d8cdb3943e..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.3-mdns-resolver2.diff
+++ /dev/null
@@ -1,460 +0,0 @@
---- resolv/res_hconf.c
-+++ resolv/res_hconf.c 2004/09/21 12:56:54
-@@ -59,6 +59,7 @@
- #define ENV_TRIM_ADD "RESOLV_ADD_TRIM_DOMAINS"
- #define ENV_MULTI "RESOLV_MULTI"
- #define ENV_REORDER "RESOLV_REORDER"
-+#define ENV_MDNS "RESOLV_MDNS"
-
- static const char *arg_service_list (const char *, int, const char *,
- unsigned int);
-@@ -81,7 +82,8 @@
- {"multi", arg_bool, HCONF_FLAG_MULTI},
- {"nospoof", arg_bool, HCONF_FLAG_SPOOF},
- {"spoofalert", arg_bool, HCONF_FLAG_SPOOFALERT},
-- {"reorder", arg_bool, HCONF_FLAG_REORDER}
-+ {"reorder", arg_bool, HCONF_FLAG_REORDER},
-+ {"mdns", arg_bool, HCONF_FLAG_MDNS}
- };
-
- /* Structure containing the state. */
-@@ -431,6 +433,9 @@
-
- memset (&_res_hconf, '\0', sizeof (_res_hconf));
-
-+ /* Default for mdns is "on". */
-+ _res_hconf.flags |= HCONF_FLAG_MDNS;
-+
- hconf_name = getenv (ENV_HOSTCONF);
- if (hconf_name == NULL)
- hconf_name = _PATH_HOSTCONF;
-@@ -483,6 +488,10 @@
- arg_trimdomain_list (ENV_TRIM_OVERR, 1, envval, 0);
- }
-
-+ envval = getenv (ENV_MDNS);
-+ if (envval)
-+ arg_bool (ENV_MDNS, 1, envval, HCONF_FLAG_MDNS);
-+
- _res_hconf.initialized = 1;
- }
-
---- resolv/res_hconf.h
-+++ resolv/res_hconf.h 2004/09/21 12:56:54
-@@ -44,6 +44,7 @@
- # define HCONF_FLAG_SPOOFALERT (1 << 2) /* syslog warning of spoofed */
- # define HCONF_FLAG_REORDER (1 << 3) /* list best address first */
- # define HCONF_FLAG_MULTI (1 << 4) /* see comments for gethtbyname() */
-+# define HCONF_FLAG_MDNS (1 << 5) /* Disable MDNS support */
- };
- extern struct hconf _res_hconf;
-
---- resolv/res_query.c
-+++ resolv/res_query.c 2004/09/21 12:57:59
-@@ -82,6 +82,8 @@
- #include <stdlib.h>
- #include <string.h>
-
-+#include "res_hconf.h"
-+
- /* Options. Leave them on. */
- /* #undef DEBUG */
-
-@@ -278,6 +280,13 @@
- *domain && !done;
- domain++) {
-
-+ if ((_res_hconf.flags & HCONF_FLAG_MDNS) != 0) {
-+ /* don't add "local" domain if query contains a dot */
-+ if (dots && (!__strcasecmp(*domain, "local") ||
-+ !__strcasecmp(*domain, "local.")))
-+ continue;
-+ }
-+
- if (domain[0][0] == '\0' ||
- (domain[0][0] == '.' && domain[0][1] == '\0'))
- root_on_list++;
---- resolv/res_send.c
-+++ resolv/res_send.c 2004/09/21 12:58:14
-@@ -86,6 +86,9 @@
- #include <arpa/nameser.h>
- #include <arpa/inet.h>
- #include <sys/ioctl.h>
-+#if defined(_LIBC) && defined(linux)
-+#include <net/if.h>
-+#endif
-
- #include <errno.h>
- #include <netdb.h>
-@@ -96,6 +99,8 @@
- #include <string.h>
- #include <unistd.h>
-
-+#include "res_hconf.h"
-+
- #if PACKETSZ > 65536
- #define MAXPACKET PACKETSZ
- #else
-@@ -188,6 +193,9 @@
- static int send_dg(res_state, const u_char *, int,
- u_char **, int *, int *, int,
- int *, int *, u_char **);
-+static int send_dg_mdns(res_state, const u_char *, int,
-+ u_char **, int *, int *, struct sockaddr_in6 *,
-+ int *, int *, u_char **);
- #ifdef DEBUG
- static void Aerror(const res_state, FILE *, const char *, int,
- const struct sockaddr *);
-@@ -366,6 +374,35 @@
- u_char *ans, int anssiz, u_char **ansp)
- {
- int gotsomewhere, terrno, try, v_circuit, resplen, ns, n;
-+ int usemdns;
-+ HEADER *qhp = (HEADER *) buf;
-+
-+ usemdns = 0;
-+ if ((_res_hconf.flags & HCONF_FLAG_MDNS) != 0 &&
-+ qhp->qr == 0 && qhp->opcode == QUERY && qhp->qdcount == htons(1)) {
-+ /* got one simple query */
-+ const u_char *bp, *be;
-+ be = buf + buflen;
-+ for (bp = buf + NS_HFIXEDSZ; bp < be; )
-+ if ((*bp & NS_CMPRSFLGS) != 0)
-+ break;
-+ else if (*bp) {
-+ if (*bp == 5 && !strncasecmp(bp, "\005local\000", 7)) {
-+ usemdns = 1;
-+ break;
-+ }
-+ if (*bp == 3 && !strncasecmp(bp, "\003254\003169\007in-addr\004arpa\000", 22)) {
-+ usemdns = 1;
-+ break;
-+ }
-+ if (*bp == 1 && !strncasecmp(bp, "\0010\0018\001e\001f\003ip6\004arpa\000", 18)) {
-+ usemdns = 2;
-+ break;
-+ }
-+ bp += *bp + 1;
-+ } else
-+ break;
-+ }
-
- if (statp->nscount == 0) {
- __set_errno (ESRCH);
-@@ -524,13 +561,28 @@
- */
- for (try = 0; try < statp->retry; try++) {
- #ifdef _LIBC
-- for (ns = 0; ns < MAXNS; ns++)
-+ for (ns = 0; ns < (usemdns ? 1 : MAXNS); ns++)
- #else
- for (ns = 0; ns < statp->nscount; ns++)
- #endif
- {
- #ifdef _LIBC
- struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
-+ if (usemdns == 1) {
-+ static struct sockaddr_in mdns4;
-+ mdns4.sin_family = AF_INET;
-+ mdns4.sin_port = htons(5353);
-+ mdns4.sin_addr.s_addr = htonl(0xe00000fb);
-+ nsap = (struct sockaddr_in6 *)&mdns4;
-+ }
-+ if (usemdns == 2) {
-+ static struct sockaddr_in6 mdns6;
-+ mdns6.sin6_family = AF_INET6;
-+ mdns6.sin6_port = htons(5353);
-+ mdns6.sin6_addr.s6_addr32[0] = htonl(0xff020000);
-+ mdns6.sin6_addr.s6_addr32[3] = htonl(0x000000fb);
-+ nsap = &mdns6;
-+ }
-
- if (nsap == NULL)
- goto next_ns;
-@@ -602,8 +654,11 @@
- resplen = n;
- } else {
- /* Use datagrams. */
-- n = send_dg(statp, buf, buflen, &ans, &anssiz, &terrno,
-- ns, &v_circuit, &gotsomewhere, ansp);
-+ if (usemdns)
-+ n = send_dg_mdns(statp, buf, buflen, &ans, &anssiz, &terrno, nsap, &v_circuit, &gotsomewhere, ansp);
-+ else
-+ n = send_dg(statp, buf, buflen, &ans, &anssiz, &terrno,
-+ ns, &v_circuit, &gotsomewhere, ansp);
- if (n < 0)
- return (-1);
- if (n == 0)
-@@ -675,8 +730,15 @@
- if (!v_circuit) {
- if (!gotsomewhere)
- __set_errno (ECONNREFUSED); /* no nameservers found */
-- else
-+ else if (!usemdns) {
- __set_errno (ETIMEDOUT); /* no answer obtained */
-+ } else {
-+ /* treat timeout as host not found */
-+ HEADER *anhp = (HEADER *) ans;
-+ memset(ans, 0, HFIXEDSZ);
-+ anhp->rcode = NXDOMAIN;
-+ return HFIXEDSZ;
-+ }
- } else
- __set_errno (terrno);
- return (-1);
-@@ -1140,6 +1202,255 @@
- return (resplen);
- }
-
-+static int
-+send_dg_mdns(res_state statp,
-+ const u_char *buf, int buflen, u_char **ansp, int *anssizp,
-+ int *terrno, struct sockaddr_in6 *nsap, int *v_circuit, int *gotsomewhere, u_char **anscp)
-+{
-+ const HEADER *hp = (HEADER *) buf;
-+ u_char *ans = *ansp;
-+ int anssiz = *anssizp;
-+ HEADER *anhp = (HEADER *) ans;
-+ struct timespec now, timeout, finish;
-+ struct pollfd pfd[32];
-+ int ptimeout;
-+ int fromlen, resplen, seconds, n, s;
-+ int on = 1;
-+ struct msghdr mhdr;
-+ struct iovec iov;
-+ u_char cmsgbuf[CMSG_SPACE(sizeof(int))];
-+ struct cmsghdr *cmsg;
-+ int ttl;
-+ struct ifconf ifconf;
-+ struct ifreq ifreq[64];
-+ int ifreqn;
-+ int i, j;
-+ int ifidx[32], ifidxn;
-+ struct ip_mreqn mreqn;
-+
-+ s = socket(nsap->sin6_family == AF_INET ? PF_INET : PF_INET6, SOCK_DGRAM, 0);
-+ if (s < 0) {
-+ *terrno = errno;
-+ Perror(statp, stderr, "socket(dg)", errno);
-+ return (-1);
-+ }
-+ ifconf.ifc_len = sizeof(ifreq);
-+ ifconf.ifc_req = ifreq;
-+ ifidxn = 0;
-+ if (ioctl(s, SIOCGIFCONF, &ifconf) == 0) {
-+ ifreqn = ifconf.ifc_len / sizeof(*ifreq);
-+ for (i = 0 ; i < ifreqn; i++) {
-+ if (ioctl(s, SIOCGIFFLAGS, ifreq + i))
-+ continue;
-+ if (!(ifreq[i].ifr_flags & IFF_MULTICAST))
-+ continue;
-+ if (ioctl(s, SIOCGIFINDEX, ifreq + i))
-+ continue;
-+ for (j = 0; j < ifidxn; j++)
-+ if (ifidx[j] == ifreq[i].ifr_ifindex)
-+ break;
-+ if (j < ifidxn)
-+ continue;
-+ ifidx[ifidxn++] = ifreq[i].ifr_ifindex;
-+ if (ifidxn == sizeof(ifidx)/sizeof(*ifidx))
-+ break;
-+ }
-+ }
-+ j = 0;
-+ for (i = 0; i < (ifidxn ? ifidxn : 1); i++) {
-+ if (i) {
-+ s = socket(nsap->sin6_family == AF_INET ? PF_INET : PF_INET6, SOCK_DGRAM, 0);
-+ if (!s)
-+ continue;
-+ }
-+ if (setsockopt(s, SOL_IP, IP_RECVTTL, &on, sizeof(on))) {
-+ *terrno = errno;
-+ Perror(statp, stderr, "IP_RECVTTL(dg)", errno);
-+ close(s);
-+ continue;
-+ }
-+ if (ifidxn) {
-+ memset(&mreqn, 0, sizeof(mreqn));
-+ mreqn.imr_ifindex = ifidx[i];
-+ if (setsockopt(s, SOL_IP, IP_MULTICAST_IF, &mreqn, sizeof(mreqn))) {
-+ *terrno = errno;
-+ Perror(statp, stderr, "IP_MULTICAST_IF", errno);
-+ close(s);
-+ continue;
-+ }
-+ }
-+ if (sendto(s, (char*)buf, buflen, 0,
-+ (struct sockaddr *)nsap, sizeof *nsap) != buflen) {
-+ Aerror(statp, stderr, "sendto", errno, *(struct sockaddr_in *)nsap);
-+ close(s);
-+ continue;
-+ }
-+ pfd[j].fd = s;
-+ pfd[j].events = POLLIN;
-+ j++;
-+ }
-+ /*
-+ * Wait for reply.
-+ */
-+ seconds = statp->retrans;
-+ if (seconds <= 0)
-+ seconds = 1;
-+ evNowTime(&now);
-+ evConsTime(&timeout, seconds, 0);
-+ evAddTime(&finish, &now, &timeout);
-+ wait:
-+ if (j == 0) {
-+ return (0);
-+ }
-+
-+ /* Convert struct timespec in milliseconds. */
-+ ptimeout = timeout.tv_sec * 1000 + timeout.tv_nsec / 1000000;
-+ n = __poll (pfd, j, ptimeout);
-+ if (n == 0) {
-+ Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n"));
-+ *gotsomewhere = 1;
-+ for (i = 0; i < j; i++)
-+ close(pfd[i].fd);
-+ return (0);
-+ }
-+ if (n < 0) {
-+ if (errno == EINTR) {
-+ evNowTime(&now);
-+ if (evCmpTime(finish, now) > 0) {
-+ evSubTime(&timeout, &finish, &now);
-+ goto wait;
-+ }
-+ }
-+ Perror(statp, stderr, "select", errno);
-+ for (i = 0; i < j; i++)
-+ close(pfd[i].fd);
-+ res_nclose(statp);
-+ return (0);
-+ }
-+ for (i = 0; i < j - 1; i++)
-+ if (pfd[j].revents == POLLIN)
-+ break;
-+ s = pfd[i].fd;
-+ __set_errno (0);
-+ fromlen = sizeof(struct sockaddr_in6);
-+ if (anssiz < MAXPACKET
-+ && anscp
-+ && (ioctl (s, FIONREAD, &resplen) < 0
-+ || anssiz < resplen)) {
-+ ans = malloc (MAXPACKET);
-+ if (ans == NULL)
-+ ans = *ansp;
-+ else {
-+ anssiz = MAXPACKET;
-+ *anssizp = MAXPACKET;
-+ *ansp = ans;
-+ *anscp = ans;
-+ anhp = (HEADER *) ans;
-+ }
-+ }
-+ iov.iov_base = ans;
-+ iov.iov_len = anssiz;
-+ mhdr.msg_name = 0;
-+ mhdr.msg_namelen = 0;
-+ mhdr.msg_iov = &iov;
-+ mhdr.msg_iovlen = 1;
-+ mhdr.msg_control = cmsgbuf;
-+ mhdr.msg_controllen = sizeof(cmsgbuf);
-+ mhdr.msg_flags = 0;
-+ resplen = recvmsg(s, &mhdr, 0);
-+ if (resplen <= 0) {
-+ if (errno == EAGAIN)
-+ goto wait;
-+ Perror(statp, stderr, "recvfrom", errno);
-+wait2:
-+ close(s);
-+ if (i < j)
-+ memmove(pfd + i, pfd + i + 1, sizeof(*pfd) * (j - i));
-+ j--;
-+ goto wait;
-+ }
-+ cmsg = CMSG_FIRSTHDR(&mhdr);
-+ for (cmsg = CMSG_FIRSTHDR(&mhdr); cmsg; CMSG_NXTHDR(&mhdr, cmsg))
-+ if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_TTL)
-+ break;
-+ if (!cmsg) {
-+ Dprint(statp->options & RES_DEBUG,
-+ (stdout, ";; no TTL found\n"));
-+ goto wait2;
-+ }
-+ ttl = *(int *)CMSG_DATA(cmsg);
-+ if (ttl != 255) {
-+ Dprint(statp->options & RES_DEBUG,
-+ (stdout, ";; answer with bad TTL: %d \n", ttl));
-+ goto wait;
-+ }
-+ *gotsomewhere = 1;
-+ if (resplen < HFIXEDSZ) {
-+ /*
-+ * Undersized message.
-+ */
-+ Dprint(statp->options & RES_DEBUG,
-+ (stdout, ";; undersized: %d\n",
-+ resplen));
-+ *terrno = EMSGSIZE;
-+ goto wait;
-+ }
-+ if (hp->id != anhp->id) {
-+ /*
-+ * response from old query, ignore it.
-+ * XXX - potential security hazard could
-+ * be detected here.
-+ */
-+ DprintQ((statp->options & RES_DEBUG) ||
-+ (statp->pfcode & RES_PRF_REPLY),
-+ (stdout, ";; old answer:\n"),
-+ ans, (resplen > anssiz) ? anssiz : resplen);
-+ goto wait;
-+ }
-+ if (!(statp->options & RES_INSECURE2) &&
-+ !res_queriesmatch(buf, buf + buflen,
-+ ans, ans + anssiz)) {
-+ /*
-+ * response contains wrong query? ignore it.
-+ * XXX - potential security hazard could
-+ * be detected here.
-+ */
-+ DprintQ((statp->options & RES_DEBUG) ||
-+ (statp->pfcode & RES_PRF_REPLY),
-+ (stdout, ";; wrong query name:\n"),
-+ ans, (resplen > anssiz) ? anssiz : resplen);
-+ goto wait;
-+ }
-+ if (anhp->rcode == SERVFAIL ||
-+ anhp->rcode == NOTIMP ||
-+ anhp->rcode == REFUSED) {
-+ DprintQ(statp->options & RES_DEBUG,
-+ (stdout, "server rejected query:\n"),
-+ ans, (resplen > anssiz) ? anssiz : resplen);
-+ goto wait;
-+ }
-+ for (i = 0; i < j; i++)
-+ close(pfd[i].fd);
-+#if 0
-+ if (!(statp->options & RES_IGNTC) && anhp->tc) {
-+ /*
-+ * To get the rest of answer,
-+ * use TCP with same server.
-+ */
-+ Dprint(statp->options & RES_DEBUG,
-+ (stdout, ";; truncated answer\n"));
-+ *v_circuit = 1;
-+ res_nclose(statp);
-+ return (1);
-+ }
-+#endif
-+ /*
-+ * All is well, or the error is fatal. Signal that the
-+ * next nameserver ought not be tried.
-+ */
-+ return (resplen);
-+}
-+
- #ifdef DEBUG
- static void
- Aerror(const res_state statp, FILE *file, const char *string, int error,
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-arm-ioperm.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-arm-ioperm.patch
deleted file mode 100644
index bc9abf4915d3..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-arm-ioperm.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-# Submitted:
-#
-# Robert Schwebel, 2004-01-31 (patch by RSC & Dan Kegel)
-#
-# Error:
-#
-# arm-unknown-linux-gnu-gcc ../sysdeps/unix/sysv/linux/arm/ioperm.c -c
-# -std=gnu99 -O -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g0
-# -O99 -fomit-frame-pointer -D__USE_STRING_INLINES -I../include -I.
-# -I/ptx/work/cvs-rsc/ptxdist/build/glibc-2.3.2-build/mis c -I.. -I../libio
-# -I/ptx/work/cvs-rsc/ptxdist/build/glibc-2.3.2-build -I../sysdeps/arm/elf
-# -I../linuxthreads/sysdeps/unix/sysv/linu x/arm
-# -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread
-# -I../sysdeps/pthread -I../linuxthreads/sysdeps/uni x/sysv
-# -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/arm
-# -I../sysdeps/unix/sysv/linux/arm -I../sysdeps/unix/sysv/linux
-# -I ../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman
-# -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/arm
-# -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/arm -I../sysdeps/wordsize-32
-# -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-6 4 -I../sysdeps/ieee754 -I../sysdeps/generic/elf
-# -I../sysdeps/generic -nostdinc -isystem
-# /opt/ptxdist/arm-linux-3.3.2/lib/gcc-lib/arm-unknown-linux-gnu/3.3.2/include -isystem
-# /opt/ptxdist/arm-linux-3.3.2/arm-unknown-linux-gnu/include -D_LIBC_REENTRANT -include
-# ../include/libc-symbols.h -o /ptx/work/cvs-rsc/ptxdist/build/glibc-2.3.2-build/misc/ioperm.o
-# ../sysdeps/unix/sysv/linux/arm/ioperm.c: In function `init_iosys':
-# ../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: `BUS_ISA' undeclared (first use in this function)
-# ../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (Each undeclared identifier is reported only once
-# ../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: for each function it appears in.)
-# ../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: initializer element is not constant
-# ../sysdeps/unix/sysv/linux/arm/ioperm.c:103: error: (near initialization for `iobase_name[1]')
-# ../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: initializer element is not constant
-# ../sysdeps/unix/sysv/linux/arm/ioperm.c:104: error: (near initialization for `ioshift_name[1]')
-# make[3]: *** [/ptx/work/cvs-rsc/ptxdist/build/glibc-2.3.2-build/misc/ioperm.o] Error 1
-#
-#
-# Description:
-#
-# Kernel headers have changed to avoid confusion with BUS_ISA in input.h.
-#
-# State:
-#
-# Kernels > 2.4.24 and > 2.6 have a CTL_BUS_ISA definition. Older kernels should not be used anyway :-)
-#
-
-diff -urN glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c glibc-2.3.2-ptx/sysdeps/unix/sysv/linux/arm/ioperm.c
---- glibc-2.3.2/sysdeps/unix/sysv/linux/arm/ioperm.c 2004-02-02 07:37:24.000000000 +0100
-+++ glibc-2.3.2-ptx/sysdeps/unix/sysv/linux/arm/ioperm.c 2004-02-02 08:15:06.000000000 +0100
-@@ -47,6 +47,12 @@
- #include <asm/page.h>
- #include <sys/sysctl.h>
-
-+/* see http://www.ussg.iu.edu/hypermail/linux/kernel/0311.0/0529.html */
-+#include <linux/version.h>
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,23))
-+#define CTL_BUS_ISA BUS_ISA /* and hope it's not the one from linux/input.h */
-+#endif
-+
- #define PATH_ARM_SYSTYPE "/etc/arm_systype"
- #define PATH_CPUINFO "/proc/cpuinfo"
-
-@@ -80,7 +86,7 @@
- * Initialize I/O system. There are several ways to get the information
- * we need. Each is tried in turn until one succeeds.
- *
-- * 1. Sysctl (CTL_BUS, BUS_ISA, ISA_*). This is the preferred method
-+ * 1. Sysctl (CTL_BUS, CTL_BUS_ISA, ISA_*). This is the preferred method
- * but not all kernels support it.
- *
- * 2. Read the value (not the contents) of symlink PATH_ARM_SYSTYPE.
-@@ -100,8 +106,8 @@
- {
- char systype[256];
- int i, n;
-- static int iobase_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_BASE };
-- static int ioshift_name[] = { CTL_BUS, BUS_ISA, BUS_ISA_PORT_SHIFT };
-+ static int iobase_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_BASE };
-+ static int ioshift_name[] = { CTL_BUS, CTL_BUS_ISA, BUS_ISA_PORT_SHIFT };
- size_t len = sizeof(io.base);
-
- if (! sysctl (iobase_name, 3, &io.io_base, &len, NULL, 0)
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-dl_execstack-PaX-support.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-dl_execstack-PaX-support.patch
deleted file mode 100644
index af8bd31306e0..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-dl_execstack-PaX-support.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-diff -Nru glibc-2.3.3.old/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c
---- glibc-2.3.3.old/sysdeps/unix/sysv/linux/dl-execstack.c 2004-09-24 01:40:02.663710000 -0400
-+++ glibc-2.3.3/sysdeps/unix/sysv/linux/dl-execstack.c 2004-09-24 01:54:55.883919888 -0400
-@@ -56,11 +56,17 @@
- __stack_prot) == 0, 1))
- goto return_success;
- # if __ASSUME_PROT_GROWSUPDOWN == 0
-- if (errno == EINVAL)
-+ if (errno == EINVAL) {
- no_growsupdown = true;
-- else
-+ } else {
-+# endif
-+ if (errno == EACCES) /* PAX is enabled */
-+ return 0;
-+ else
-+ return errno;
-+# if __ASSUME_PROT_GROWSUPDOWN == 0
-+ }
- # endif
-- return errno;
- }
- #endif
-
-@@ -84,8 +90,11 @@
- page -= size;
- else
- {
-- if (errno != ENOMEM) /* Unexpected failure mode. */
-+ if (errno == EACCES) { /* PAX is enabled */
-+ return 0;
-+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
- return errno;
-+ }
-
- if (size == GLRO(dl_pagesize))
- /* We just tried to mprotect the top hole page and failed.
-@@ -107,8 +116,11 @@
- page += size;
- else
- {
-- if (errno != ENOMEM) /* Unexpected failure mode. */
-+ if (errno == EACCES) { /* PAX is enabled */
-+ return 0;
-+ } else if (errno != ENOMEM) { /* Unexpected failure mode. */
- return errno;
-+ }
-
- if (size == GLRO(dl_pagesize))
- /* We just tried to mprotect the lowest hole page and failed.
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-features-header-fix.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-features-header-fix.patch
deleted file mode 100644
index f4b88fc7f593..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-features-header-fix.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/features.h.orig 2004-11-04 15:42:23.777521424 -0500
-+++ include/features.h 2004-11-04 15:43:16.734470744 -0500
-@@ -262,7 +262,7 @@
- # define __USE_REENTRANT 1
- #endif
-
--#if _FORTIFY_SOURCE > 0 && __OPTIMIZE__ > 0 \
-+#if (_FORTIFY_SOURCE > 0) && defined(__OPTIMIZE__) \
- && (__GNUC_PREREQ (4, 1) \
- || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (4, 0)) \
- || (defined __GNUC_RH_RELEASE__ && __GNUC_PREREQ (3, 4) \
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-no-force-nontls.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-no-force-nontls.patch
deleted file mode 100644
index ed0c993711f3..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-no-force-nontls.patch
+++ /dev/null
@@ -1,57 +0,0 @@
---- glibc-2.3.3.old/elf/rtld.c 2004-10-26 21:41:41.989117872 -0400
-+++ glibc-2.3.3/elf/rtld.c 2004-10-26 21:45:15.015732904 -0400
-@@ -1087,53 +1087,6 @@
- ++GL(dl_ns)[LM_ID_BASE]._ns_nloaded;
- ++GL(dl_load_adds);
-
--#if defined(__i386__)
-- /* Force non-TLS libraries for glibc 2.0 binaries
-- or if a buggy binary references non-TLS errno or h_errno. */
-- if (__builtin_expect (main_map->l_info[DT_NUM + DT_THISPROCNUM
-- + DT_VERSIONTAGIDX (DT_VERNEED)]
-- == NULL, 0)
-- && main_map->l_info[DT_DEBUG])
-- GLRO(dl_osversion) = 0x20205;
-- else if ((__builtin_expect (mode, normal) != normal
-- || main_map->l_info[ADDRIDX (DT_GNU_LIBLIST)] == NULL)
-- /* Only binaries have DT_DEBUG dynamic tags... */
-- && main_map->l_info[DT_DEBUG])
-- {
-- /* Workaround for buggy binaries. This doesn't handle buggy
-- libraries. */
-- bool buggy = false;
-- const ElfW(Sym) *symtab = (const void *) D_PTR (main_map,
-- l_info[DT_SYMTAB]);
-- const char *strtab = (const void *) D_PTR (main_map,
-- l_info[DT_STRTAB]);
-- Elf_Symndx symidx;
-- for (symidx = main_map->l_buckets[0x6c994f % main_map->l_nbuckets];
-- symidx != STN_UNDEF;
-- symidx = main_map->l_chain[symidx])
-- {
-- if (__builtin_expect (strcmp (strtab + symtab[symidx].st_name,
-- "errno") == 0, 0)
-- && ELFW(ST_TYPE) (symtab[symidx].st_info) != STT_TLS)
-- buggy = true;
-- }
-- for (symidx = main_map->l_buckets[0xe5c992f % main_map->l_nbuckets];
-- symidx != STN_UNDEF;
-- symidx = main_map->l_chain[symidx])
-- {
-- if (__builtin_expect (strcmp (strtab + symtab[symidx].st_name,
-- "h_errno") == 0, 0)
-- && ELFW(ST_TYPE) (symtab[symidx].st_info) != STT_TLS)
-- buggy = true;
-- }
-- if (__builtin_expect (buggy, false) && GLRO(dl_osversion) > 0x20401)
-- {
-- GLRO(dl_osversion) = 0x20401;
-- _dl_error_printf ("Incorrectly built binary which accesses errno or h_errno directly. Needs to be fixed.\n");
-- }
-- }
--#endif
--
- /* If LD_USE_LOAD_BIAS env variable has not been seen, default
- to not using bias for non-prelinked PIEs and libraries
- and using it for executables or prelinked PIEs or libraries. */
-
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-no-libnoversion.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-no-libnoversion.patch
deleted file mode 100644
index 34aed0fa7f96..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-no-libnoversion.patch
+++ /dev/null
@@ -1,70 +0,0 @@
---- glibc-2.3.3.old/elf/rtld.c 2004-10-26 21:41:41.989117872 -0400
-+++ glibc-2.3.3/elf/rtld.c 2004-10-26 21:45:15.015732904 -0400
-@@ -1306,67 +1259,6 @@
- }
- }
-
--
--#if defined(__i386__) || defined(__alpha__) || (defined(__sparc__) && !defined(__arch64__))
-- /*
-- * Modifications by Red Hat Software
-- *
-- * Deal with the broken binaries from the non-versioned ages of glibc.
-- * If a binary does not have version information enabled, we assume that
-- * it is a glibc 2.0 binary and we load a compatibility library to try to
-- * overcome binary incompatibilities.
-- * Blame: gafton@redhat.com
-- */
--#define LIB_NOVERSION "/lib/libNoVersion.so.1"
--
-- if (__builtin_expect (main_map->l_info[DT_NUM + DT_THISPROCNUM
-- + DT_VERSIONTAGIDX (DT_VERNEED)]
-- == NULL, 0)
-- && (main_map->l_info[DT_DEBUG]
-- || !(GLRO(dl_debug_mask) & DL_DEBUG_PRELINK)))
-- {
-- struct stat test_st;
-- int test_fd;
-- int can_load;
--
-- HP_TIMING_NOW (start);
--
--/* _dl_sysdep_message("Loading compatibility library... ", NULL); */
--
-- can_load = 1;
-- test_fd = __open (LIB_NOVERSION, O_RDONLY);
-- if (test_fd < 0) {
-- can_load = 0;
--/* _dl_sysdep_message(" Can't find " LIB_NOVERSION "\n", NULL); */
-- } else {
-- if (__fxstat (_STAT_VER, test_fd, &test_st) < 0 || test_st.st_size == 0) {
-- can_load = 0;
--/* _dl_sysdep_message(" Can't stat " LIB_NOVERSION "\n", NULL); */
-- }
-- }
--
-- if (test_fd >= 0) /* open did no fail.. */
-- __close(test_fd); /* avoid fd leaks */
--
-- if (can_load != 0) {
-- struct link_map *new_map;
-- new_map = _dl_map_object (main_map, LIB_NOVERSION,
-- 1, lt_library, 0, 0, LM_ID_BASE);
-- if (++new_map->l_opencount == 1) {
-- /* It is no duplicate. */
-- ++npreloads;
--/* _dl_sysdep_message(" DONE\n", NULL); */
-- } else {
--/* _dl_sysdep_message(" FAILED\n", NULL); */
-- }
-- }
--
-- HP_TIMING_NOW (stop);
-- HP_TIMING_DIFF (diff, start, stop);
-- HP_TIMING_ACCUM_NT (load_time, diff);
-- }
--#endif
--
- if (__builtin_expect (npreloads, 0) != 0)
- {
- /* Set up PRELOADS with a vector of the preloaded libraries. */
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-nomalloccheck.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-nomalloccheck.patch
deleted file mode 100644
index f163d2c93517..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fedora-branch-nomalloccheck.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- malloc/malloc.c.fedora 2004-11-04 16:45:51.365618552 -0500
-+++ malloc/malloc.c 2004-11-04 16:46:43.132748752 -0500
-@@ -2355,7 +2355,7 @@
- /* ---------------- Error behavior ------------------------------------ */
-
- #ifndef DEFAULT_CHECK_ACTION
--#define DEFAULT_CHECK_ACTION 3
-+#define DEFAULT_CHECK_ACTION 0
- #endif
-
- static int check_action = DEFAULT_CHECK_ACTION;
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fix-_dl_next_tls_modid-assert.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fix-_dl_next_tls_modid-assert.patch
deleted file mode 100644
index 212b2b1fcf00..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-fix-_dl_next_tls_modid-assert.patch
+++ /dev/null
@@ -1,268 +0,0 @@
-Gentoo bug #52374.
-==================
-
-Note, this patch includes both:
-
------
-2005-01-10 Ulrich Drepper <drepper@redhat.com>
-
- * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Fix assertion and
- recognition of last entry.
------
-
-and:
-
------
-2005-03-15 Jakub Jelinek <jakub@redhat.com>
-
- [BZ#786]
- * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Handle
- GL(dl_tls_static_nelem) == GL(dl_tls_max_dtv_idx).
- * elf/Makefile: Add rules to build and run tst-tls15.
- * elf/tst-tls15.c: New test.
- * elf/tst-tlsmod15a.c: New file.
- * elf/tst-tlsmod15b.c: New file.
------
-
-================================================================================
-On Sun, Mar 13, 2005 at 09:39:04PM +0200, Martin Schlemmer wrote:
-> Basically the issue above. This is valid for glibc 2.3.[234] if I did
-> not miss anything. Here is a good test case:
->
-> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=219352#msg122
->
-> I came up with attached patch that seems to work and passes all the
-> tests (except for the one or two usual ones). Is this the correct fix,
-> or are the problem deeper?
->
->--- glibc-2.3.4/sysdeps/generic/dl-tls.c.az 2005-03-13 19:26:55.000000000 +0200
->+++ glibc-2.3.4/sysdeps/generic/dl-tls.c 2005-03-13 19:29:14.000000000 +0200
->@@ -69,7 +69,10 @@
-> result = GL(dl_tls_static_nelem) + 1;
-> /* If the following would not be true we mustn't have assumed
-> there is a gap. */
->- assert (result <= GL(dl_tls_max_dtv_idx));
->+ /* The +1 is needed, as we add +1 above, but dl_tls_static_nelem
->+ is only once set as far as I can see in dl_main (elf/rtld.c),
->+ and that is equal to dl_tls_max_dtv_idx ... */
->+ assert (result <= (GL(dl_tls_max_dtv_idx) + 1));
-> do
-> {
-> while (result - disp < runp->len)
->@@ -92,7 +95,8 @@
-> {
-> /* The new index must indeed be exactly one higher than the
-> previous high. */
->- assert (result == GL(dl_tls_max_dtv_idx));
->+ /* Once again +1 for the same reasons as above ... */
->+ assert (result == (GL(dl_tls_max_dtv_idx) + 1));
->
-> /* There is no gap anymore. */
-> GL(dl_tls_dtv_gaps) = false;
->
-
-That patch certainly doesn't apply to neither HEAD nor glibc-2_3-branch,
-see especially:
-2005-01-10 Ulrich Drepper <drepper@redhat.com>
-
- * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Fix assertion and
- recognition of last entry.
-
-The fix can either be that dl-open.c only sets GL(dl_tls_dtv_gaps)
-to true if GL(dl_tls_static_nelem) < GL(dl_tls_max_dtv_idx)
-(if it is equal, there are certainly no gaps), or handling that case
-in _dl_next_tls_modid. In _dl_next_tls_modid, the choices are either
-to do what the patch below does, i.e. just clear GL(dl_tls_dtv_gaps)
-if that happens, or just change the assert and let the do ... while
-loop run, it shouldn't increment result anyway.
-
-2005-03-15 Jakub Jelinek <jakub@redhat.com>
-
- [BZ#786]
- * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Handle
- GL(dl_tls_static_nelem) == GL(dl_tls_max_dtv_idx).
- * elf/Makefile: Add rules to build and run tst-tls15.
- * elf/tst-tls15.c: New test.
- * elf/tst-tlsmod15a.c: New file.
- * elf/tst-tlsmod15b.c: New file.
-
-diff -urpN glibc-2.3.4.az/elf/Makefile glibc-2.3.4/elf/Makefile
---- glibc-2.3.4.az/elf/Makefile 2005-03-15 17:38:36.000000000 +0200
-+++ glibc-2.3.4/elf/Makefile 2005-03-15 17:39:07.000000000 +0200
-@@ -152,7 +152,7 @@ tests += loadtest restest1 preloadtest l
- neededtest3 neededtest4 unload2 lateglobal initfirst global \
- restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \
- circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \
-- tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-align \
-+ tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 tst-align \
- $(tests-execstack-$(have-z-execstack)) tst-dlmodcount \
- tst-dlopenrpath tst-deep1 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3
- # reldep9
-@@ -182,6 +182,7 @@ modules-names = testobj1 testobj2 testob
- tst-tlsmod5 tst-tlsmod6 tst-tlsmod7 tst-tlsmod8 \
- tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \
- tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \
-+ tst-tlsmod15a tst-tlsmod15b \
- circlemod1 circlemod1a circlemod2 circlemod2a \
- circlemod3 circlemod3a \
- reldep8mod1 reldep8mod2 reldep8mod3 \
-@@ -454,6 +455,7 @@ tst-tlsmod10.so-no-z-defs = yes
- tst-tlsmod12.so-no-z-defs = yes
- tst-tlsmod14a.so-no-z-defs = yes
- tst-tlsmod14b.so-no-z-defs = yes
-+tst-tlsmod15a.so-no-z-defs = yes
- circlemod2.so-no-z-defs = yes
- circlemod3.so-no-z-defs = yes
- circlemod3a.so-no-z-defs = yes
-@@ -664,8 +666,11 @@ $(objpfx)tst-tls12: $(objpfx)tst-tlsmod1
- $(objpfx)tst-tls13: $(libdl)
- $(objpfx)tst-tls13.out: $(objpfx)tst-tlsmod13a.so
-
--$(objpfx)tst-tls14: $(objpfx)tst-tlsmod14a.so $(libdl)
--$(objpfx)tst-tls14.out:$(objpfx)tst-tlsmod14b.so
-+$(objpfx)tst-tls14: $(objpfx)tst-tlsmod14a.so $(libdl)
-+$(objpfx)tst-tls14.out: $(objpfx)tst-tlsmod14b.so
-+
-+$(objpfx)tst-tls15: $(libdl)
-+$(objpfx)tst-tls15.out: $(objpfx)tst-tlsmod15a.so $(objpfx)tst-tlsmod15b.so
-
- CFLAGS-tst-align.c = $(stack-align-test-flags)
- CFLAGS-tst-alignmod.c = $(stack-align-test-flags)
-diff -urpN glibc-2.3.4.az/elf/tst-tls15.c glibc-2.3.4/elf/tst-tls15.c
---- glibc-2.3.4.az/elf/tst-tls15.c 1970-01-01 02:00:00.000000000 +0200
-+++ glibc-2.3.4/elf/tst-tls15.c 2005-03-15 17:39:07.000000000 +0200
-@@ -0,0 +1,32 @@
-+#include <dlfcn.h>
-+#include <stdio.h>
-+
-+static int
-+do_test (void)
-+{
-+ void *h = dlopen ("tst-tlsmod15a.so", RTLD_NOW);
-+ if (h != NULL)
-+ {
-+ puts ("unexpectedly succeeded to open tst-tlsmod15a.so");
-+ exit (1);
-+ }
-+
-+ h = dlopen ("tst-tlsmod15b.so", RTLD_NOW);
-+ if (h == NULL)
-+ {
-+ puts ("failed to open tst-tlsmod15b.so");
-+ exit (1);
-+ }
-+
-+ int (*fp) (void) = (int (*) (void)) dlsym (h, "in_dso");
-+ if (fp == NULL)
-+ {
-+ puts ("cannot find in_dso");
-+ exit (1);
-+ }
-+
-+ return fp ();
-+}
-+
-+#define TEST_FUNCTION do_test ()
-+#include "../test-skeleton.c"
-diff -urpN glibc-2.3.4.az/elf/tst-tlsmod15a.c glibc-2.3.4/elf/tst-tlsmod15a.c
---- glibc-2.3.4.az/elf/tst-tlsmod15a.c 1970-01-01 02:00:00.000000000 +0200
-+++ glibc-2.3.4/elf/tst-tlsmod15a.c 2005-03-15 17:39:07.000000000 +0200
-@@ -0,0 +1,6 @@
-+extern int nonexistent_dummy_var;
-+int *
-+foo (void)
-+{
-+ return &nonexistent_dummy_var;
-+}
-diff -urpN glibc-2.3.4.az/elf/tst-tlsmod15b.c glibc-2.3.4/elf/tst-tlsmod15b.c
---- glibc-2.3.4.az/elf/tst-tlsmod15b.c 1970-01-01 02:00:00.000000000 +0200
-+++ glibc-2.3.4/elf/tst-tlsmod15b.c 2005-03-15 17:39:07.000000000 +0200
-@@ -0,0 +1,17 @@
-+#include "tst-tls10.h"
-+
-+#ifdef USE_TLS__THREAD
-+__thread int mod15b_var __attribute__((tls_model("initial-exec")));
-+
-+int
-+in_dso (void)
-+{
-+ return mod15b_var;
-+}
-+#else
-+int
-+in_dso (void)
-+{
-+ return 0;
-+}
-+#endif
-diff -urpN glibc-2.3.4.az/sysdeps/generic/dl-tls.c glibc-2.3.4/sysdeps/generic/dl-tls.c
---- glibc-2.3.4.az/sysdeps/generic/dl-tls.c 2005-03-15 17:40:56.000000000 +0200
-+++ glibc-2.3.4/sysdeps/generic/dl-tls.c 2005-03-15 17:39:07.000000000 +0200
-@@ -65,34 +65,35 @@ _dl_next_tls_modid (void)
- /* Note that this branch will never be executed during program
- start since there are no gaps at that time. Therefore it
- does not matter that the dl_tls_dtv_slotinfo is not allocated
-- yet when the function is called for the first times. */
-- result = GL(dl_tls_static_nelem) + 1;
-- /* If the following would not be true we mustn't have assumed
-- there is a gap. */
-- assert (result <= GL(dl_tls_max_dtv_idx));
-- do
-- {
-- while (result - disp < runp->len)
-- {
-- if (runp->slotinfo[result - disp].map == NULL)
-- break;
--
-- ++result;
-- assert (result <= GL(dl_tls_max_dtv_idx) + 1);
-- }
-+ yet when the function is called for the first times.
-
-- if (result - disp < runp->len)
-- break;
--
-- disp += runp->len;
-- }
-- while ((runp = runp->next) != NULL);
-+ NB: the offset +1 is due to the fact that DTV[0] is used
-+ for something else. */
-+ result = GL(dl_tls_static_nelem) + 1;
-+ if (result <= GL(dl_tls_max_dtv_idx))
-+ do
-+ {
-+ while (result - disp < runp->len)
-+ {
-+ if (runp->slotinfo[result - disp].map == NULL)
-+ break;
-+
-+ ++result;
-+ assert (result <= GL(dl_tls_max_dtv_idx) + 1);
-+ }
-+
-+ if (result - disp < runp->len)
-+ break;
-+
-+ disp += runp->len;
-+ }
-+ while ((runp = runp->next) != NULL);
-
-- if (result >= GL(dl_tls_max_dtv_idx))
-+ if (result > GL(dl_tls_max_dtv_idx))
- {
- /* The new index must indeed be exactly one higher than the
- previous high. */
-- assert (result == GL(dl_tls_max_dtv_idx));
-+ assert (result == GL(dl_tls_max_dtv_idx) + 1);
-
- /* There is no gap anymore. */
- GL(dl_tls_dtv_gaps) = false;
-@@ -577,7 +578,7 @@ __tls_get_addr (GET_ADDR_ARGS)
- {
- size_t cnt;
-
-- for (cnt = total = 0 ? 1 : 0; cnt < listp->len; ++cnt)
-+ for (cnt = total == 0 ? 1 : 0; cnt < listp->len; ++cnt)
- {
- size_t gen = listp->slotinfo[cnt].gen;
- struct link_map *map;
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-getcontext.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-getcontext.patch
deleted file mode 100644
index f32abcf636ff..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-getcontext.patch
+++ /dev/null
@@ -1,358 +0,0 @@
-2004-09-02 Steven Munroe <sjmunroe@us.ibm.com>
-
- [BZ #357]
- * stdlib/tst-setcontext.c (test_stack): Added test for stack clobber.
- (main): Call test_stack.
- * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
- (__getcontext): Push stack frame then save parms in local frame.
- Improve instruction scheduling.
- * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
- (__swapcontext): Push stack frame then save parms in local frame.
- Improve instruction scheduling.
-
-
-diff -urN libc23-cvstip-20040830/stdlib/tst-setcontext.c libc23/stdlib/tst-setcontext.c
---- libc23-cvstip-20040830/stdlib/tst-setcontext.c 2002-08-30 22:21:40.000000000 -0500
-+++ libc23/stdlib/tst-setcontext.c 2004-09-02 10:10:28.055274880 -0500
-@@ -72,6 +72,55 @@
- was_in_f2 = 1;
- }
-
-+void
-+test_stack(volatile int a, volatile int b,
-+ volatile int c, volatile int d)
-+{
-+ volatile int e = 5;
-+ volatile int f = 6;
-+ ucontext_t uc;
-+
-+ /* Test for cases where getcontext is clobbering the callers
-+ stack, including parameters. */
-+ getcontext(&uc);
-+
-+ if (a != 1)
-+ {
-+ printf ("%s: getcontext clobbers parm a\n", __FUNCTION__);
-+ exit (1);
-+ }
-+
-+ if (b != 2)
-+ {
-+ printf ("%s: getcontext clobbers parm b\n", __FUNCTION__);
-+ exit (1);
-+ }
-+
-+ if (c != 3)
-+ {
-+ printf ("%s: getcontext clobbers parm c\n", __FUNCTION__);
-+ exit (1);
-+ }
-+
-+ if (d != 4)
-+ {
-+ printf ("%s: getcontext clobbers parm d\n", __FUNCTION__);
-+ exit (1);
-+ }
-+
-+ if (e != 5)
-+ {
-+ printf ("%s: getcontext clobbers varible e\n", __FUNCTION__);
-+ exit (1);
-+ }
-+
-+ if (f != 6)
-+ {
-+ printf ("%s: getcontext clobbers variable f\n", __FUNCTION__);
-+ exit (1);
-+ }
-+}
-+
- volatile int global;
-
- int
-@@ -88,6 +137,8 @@
- printf ("%s: getcontext: %m\n", __FUNCTION__);
- exit (1);
- }
-+
-+ test_stack (1, 2, 3, 4);
-
- /* Play some tricks with this context. */
- if (++global == 1)
-diff -urN libc23-cvstip-20040830/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
---- libc23-cvstip-20040830/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-06-15 15:02:20.000000000 -0500
-+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-09-02 12:46:16.064221704 -0500
-@@ -27,18 +27,22 @@
-
- .machine "altivec"
- ENTRY(__getcontext)
-+ stwu r1,-16(r1)
-+/* Insure that the _UC_REGS start on a quadword boundary. */
- stw r3,_FRAME_PARM_SAVE1(r1)
- addi r3,r3,_UC_REG_SPACE+12
- clrrwi r3,r3,4
-+
-+/* Save the general purpose registers */
- stw r0,_UC_GREGS+(PT_R0*4)(r3)
- mflr r0
-- stw r1,_UC_GREGS+(PT_R1*4)(r3)
-- stwu r1,-16(r1)
-+ stw r2,_UC_GREGS+(PT_R2*4)(r3)
-+ stw r4,_UC_GREGS+(PT_R4*4)(r3)
-+/* Set the callers LR_SAVE, and the ucontext LR and NIP to the callers
-+ return address. */
- stw r0,_UC_GREGS+(PT_LNK*4)(r3)
- stw r0,_UC_GREGS+(PT_NIP*4)(r3)
- stw r0,_FRAME_LR_SAVE+16(r1)
-- stw r2,_UC_GREGS+(PT_R2*4)(r3)
-- stw r4,_UC_GREGS+(PT_R4*4)(r3)
- stw r5,_UC_GREGS+(PT_R5*4)(r3)
- stw r6,_UC_GREGS+(PT_R6*4)(r3)
- stw r7,_UC_GREGS+(PT_R7*4)(r3)
-@@ -66,23 +70,28 @@
- stw r29,_UC_GREGS+(PT_R29*4)(r3)
- stw r30,_UC_GREGS+(PT_R30*4)(r3)
- stw r31,_UC_GREGS+(PT_R31*4)(r3)
-- mfctr r0
-- stw r0,_UC_GREGS+(PT_CTR*4)(r3)
-- mfxer r0
-- stw r0,_UC_GREGS+(PT_XER*4)(r3)
-- mfcr r0
-- stw r0,_UC_GREGS+(PT_CCR*4)(r3)
--
-- /* Set the return value of getcontext to "success". R3 is the only
-- register whose value is not preserved in the saved context. */
-+/* Save the value of R1. We had to push the stack before we
-+ had the address of uc_reg_space. So compute the address of
-+ the callers stack pointer and save it as R1. */
-+ addi r8,r1,16
- li r0,0
-+/* Save the count, exception and condition registers. */
-+ mfctr r11
-+ mfxer r10
-+ mfcr r9
-+ stw r8,_UC_GREGS+(PT_R1*4)(r3)
-+ stw r11,_UC_GREGS+(PT_CTR*4)(r3)
-+ stw r10,_UC_GREGS+(PT_XER*4)(r3)
-+ stw r9,_UC_GREGS+(PT_CCR*4)(r3)
-+/* Set the return value of getcontext to "success". R3 is the only
-+ register whose value is not preserved in the saved context. */
- stw r0,_UC_GREGS+(PT_R3*4)(r3)
-
-- /* Zero fill fields that can't be set in user state. */
-+/* Zero fill fields that can't be set in user state. */
- stw r0,_UC_GREGS+(PT_MSR*4)(r3)
- stw r0,_UC_GREGS+(PT_MQ*4)(r3)
-
-- /* Save the floating-point registers */
-+/* Save the floating-point registers */
- stfd fp0,_UC_FREGS+(0*8)(r3)
- stfd fp1,_UC_FREGS+(1*8)(r3)
- stfd fp2,_UC_FREGS+(2*8)(r3)
-@@ -136,21 +145,31 @@
- lwz r7,_dl_hwcap@l(r7)
- #endif
- andis. r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16)
-- beq L(no_vec)
-
- la r10,(_UC_VREGS)(r3)
- la r9,(_UC_VREGS+16)(r3)
-+
-+ beq L(no_vec)
-+/* address of the combined VSCR/VSAVE quadword. */
-+ la r8,(_UC_VREGS+512)(r3)
-
-+/* Save the vector registers */
- stvx v0,0,r10
- stvx v1,0,r9
- addi r10,r10,32
- addi r9,r9,32
-+/* We need to get the Vector Status and Control Register early to avoid
-+ store order problems later with the VSAVE register that shares the
-+ same quadword. */
-+ mfvscr v0
-
- stvx v2,0,r10
- stvx v3,0,r9
- addi r10,r10,32
- addi r9,r9,32
-
-+ stvx v0,0,r8
-+
- stvx v4,0,r10
- stvx v5,0,r9
- addi r10,r10,32
-@@ -216,20 +235,18 @@
- addi r10,r10,32
- addi r9,r9,32
-
-+ mfspr r0,VRSAVE
- stvx v30,0,r10
- stvx v31,0,r9
-- addi r10,r10,32
-- addi r9,r9,32
-
-- mfvscr v0
-- mfspr r0,VRSAVE
-- stvx v0,0,r10
-- sync
-- stw r0,0(r10)
-+ stw r0,0(r8)
-
- L(no_vec):
--/* Restore ucontext (parm1) from stack. */
-- lwz r12,_FRAME_PARM_SAVE1+16(r1)
-+/* We need to set up parms and call sigprocmask which will clobber
-+ volatile registers. So before the call we need to retrieve the
-+ original ucontext ptr (parm1) from stack and store the UC_REGS_PTR
-+ (current R3). */
-+ lwz r12,_FRAME_PARM_SAVE1(r1)
- li r4,0
- stw r3,_UC_REGS_PTR(r12)
- addi r5,r12,_UC_SIGMASK
-diff -urN libc23-cvstip-20040830/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
---- libc23-cvstip-20040830/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-06-15 15:02:20.000000000 -0500
-+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-09-02 12:45:43.125302872 -0500
-@@ -27,22 +27,23 @@
-
- .machine "altivec"
- ENTRY(__swapcontext)
-- /* Save the current context */
-+ stwu r1,-16(r1)
-+/* Insure that the _UC_REGS start on a quadword boundary. */
- stw r3,_FRAME_PARM_SAVE1(r1)
- addi r3,r3,_UC_REG_SPACE+12
-+ stw r4,_FRAME_PARM_SAVE2(r1) /* new context pointer */
- clrrwi r3,r3,4
-+
-+/* Save the general purpose registers */
- stw r0,_UC_GREGS+(PT_R0*4)(r3)
-- stw r1,_UC_GREGS+(PT_R1*4)(r3)
- mflr r0
-- stwu r1,-16(r1)
-- stw r0,20(r1)
-- stw r31,12(r1)
-- stw r31,_UC_GREGS+(PT_R31*4)(r3)
-- mr r31,r4 /* new context pointer */
-+ stw r2,_UC_GREGS+(PT_R2*4)(r3)
-+ stw r4,_UC_GREGS+(PT_R4*4)(r3)
-+/* Set the callers LR_SAVE, and the ucontext LR and NIP to the callers
-+ return address. */
- stw r0,_UC_GREGS+(PT_LNK*4)(r3)
- stw r0,_UC_GREGS+(PT_NIP*4)(r3)
-- stw r2,_UC_GREGS+(PT_R2*4)(r3)
-- stw r4,_UC_GREGS+(PT_R4*4)(r3)
-+ stw r0,_FRAME_LR_SAVE+16(r1)
- stw r5,_UC_GREGS+(PT_R5*4)(r3)
- stw r6,_UC_GREGS+(PT_R6*4)(r3)
- stw r7,_UC_GREGS+(PT_R7*4)(r3)
-@@ -69,16 +70,23 @@
- stw r28,_UC_GREGS+(PT_R28*4)(r3)
- stw r29,_UC_GREGS+(PT_R29*4)(r3)
- stw r30,_UC_GREGS+(PT_R30*4)(r3)
-- mfctr r0
-- stw r0,_UC_GREGS+(PT_CTR*4)(r3)
-- mfxer r0
-- stw r0,_UC_GREGS+(PT_XER*4)(r3)
-- mfcr r0
-- stw r0,_UC_GREGS+(PT_CCR*4)(r3)
--
-- /* Set the return value of swapcontext to "success". R3 is the only
-- register whose value is not preserved in the saved context. */
-+ stw r31,_UC_GREGS+(PT_R31*4)(r3)
-+
-+/* Save the value of R1. We had to push the stack before we
-+ had the address of uc_reg_space. So compute the address of
-+ the callers stack pointer and save it as R1. */
-+ addi r8,r1,16
- li r0,0
-+/* Save the count, exception and condition registers. */
-+ mfctr r11
-+ mfxer r10
-+ mfcr r9
-+ stw r8,_UC_GREGS+(PT_R1*4)(r3)
-+ stw r11,_UC_GREGS+(PT_CTR*4)(r3)
-+ stw r10,_UC_GREGS+(PT_XER*4)(r3)
-+ stw r9,_UC_GREGS+(PT_CCR*4)(r3)
-+/* Set the return value of getcontext to "success". R3 is the only
-+ register whose value is not preserved in the saved context. */
- stw r0,_UC_GREGS+(PT_R3*4)(r3)
-
- /* Zero fill fields that can't be set in user state. */
-@@ -138,20 +146,30 @@
- lwz r7,_dl_hwcap@l(r7)
- #endif
- andis. r7,r7,(PPC_FEATURE_HAS_ALTIVEC >> 16)
-- beq L(no_vec)
-
- la r10,(_UC_VREGS)(r3)
- la r9,(_UC_VREGS+16)(r3)
-+
-+ beq L(no_vec)
-+/* address of the combined VSCR/VSAVE quadword. */
-+ la r8,(_UC_VREGS+512)(r3)
-
-+/* Save the vector registers */
- stvx v0,0,r10
- stvx v1,0,r9
- addi r10,r10,32
- addi r9,r9,32
-+/* We need to get the Vector Status and Control Register early to avoid
-+ store order problems later with the VSAVE register that shares the
-+ same quadword. */
-+ mfvscr v0
-
- stvx v2,0,r10
- stvx v3,0,r9
- addi r10,r10,32
- addi r9,r9,32
-+
-+ stvx v0,0,r8
-
- stvx v4,0,r10
- stvx v5,0,r9
-@@ -218,20 +236,15 @@
- addi r10,r10,32
- addi r9,r9,32
-
-+ mfvscr v0
- stvx v30,0,r10
- stvx v31,0,r9
-- addi r10,r10,32
-- addi r9,r9,32
-
-- mfvscr v0
-- mfspr r0,VRSAVE
-- stvx v0,0,r10
-- sync
-- stw r0,0(r10)
-+ stw r0,0(r8)
-
- L(no_vec):
- /* Restore ucontext (parm1) from stack. */
-- lwz r12,_FRAME_PARM_SAVE1+16(r1)
-+ lwz r12,_FRAME_PARM_SAVE1(r1)
- li r4,0
- stw r3,_UC_REGS_PTR(r12)
- addi r5,r12,_UC_SIGMASK
-@@ -251,8 +264,8 @@
- * r0, xer, ctr. We don't restore r2 since it will be used as
- * the TLS pointer.
- */
-- mr r4,r31
-- lwz r31,_UC_REGS_PTR(r31)
-+ lwz r4,_FRAME_PARM_SAVE2(r1)
-+ lwz r31,_UC_REGS_PTR(r4)
- lwz r0,_UC_GREGS+(PT_MSR*4)(r31)
- cmpwi r0,0
- bne L(do_sigret)
-@@ -451,8 +464,7 @@
- bctr
-
- L(error_exit):
-- lwz r31,12(r1)
-- lwz r0,20(r1)
-+ lwz r0,_FRAME_LR_SAVE+16(r1)
- addi r1,r1,16
- mtlr r0
- blr
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-hardened-sysdep-shared.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-hardened-sysdep-shared.patch
deleted file mode 100644
index 61058eabacef..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-hardened-sysdep-shared.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- sysdeps/unix/sysv/linux/i386/sysdep.h.orig 2004-06-13 13:08:49.905902169 -0600
-+++ sysdeps/unix/sysv/linux/i386/sysdep.h 2004-06-13 13:09:16.312954075 -0600
-@@ -401,7 +401,7 @@
-
- #define LOADARGS_0
- #ifdef __PIC__
--# if defined I386_USE_SYSENTER
-+# if defined I386_USE_SYSENTER && defined SHARED
- # define LOADARGS_1 \
- "bpushl .L__X'%k3, %k3\n\t"
- # define LOADARGS_5 \
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-hppa-hardened-disable__init_arrays.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-hppa-hardened-disable__init_arrays.patch
deleted file mode 100644
index 3f00ea2d87ea..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-hppa-hardened-disable__init_arrays.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-diff -u -r -N glibc-2.3.4-hppa/csu/elf-init.c glibc-2.3.4-hppa-hardened/csu/elf-init.c
---- glibc-2.3.4-hppa/csu/elf-init.c 2004-07-22 12:13:09.207029032 +0200
-+++ glibc-2.3.4-hppa-hardened/csu/elf-init.c 2004-07-22 13:24:02.652407048 +0200
-@@ -19,15 +19,14 @@
-
- #include <stddef.h>
-
--#ifdef HAVE_INITFINI_ARRAY
--/* These magic symbols are provided by the linker. */
--extern void (*__preinit_array_start []) (void) attribute_hidden;
--extern void (*__preinit_array_end []) (void) attribute_hidden;
--extern void (*__init_array_start []) (void) attribute_hidden;
--extern void (*__init_array_end []) (void) attribute_hidden;
--extern void (*__fini_array_start []) (void) attribute_hidden;
--extern void (*__fini_array_end []) (void) attribute_hidden;
--#endif
-+/* there is no hppalinux.xd and hppalinux.xdc linker script available */
-+/* this is why __init_array_start|__init_array_end cannot be resolved */
-+/* if we are using hardened with auto PIE, we need to disable startup */
-+/* code for such additional arrays normally found in a PROVIDE script */
-+
-+/* the hppalinux.xd and .xdc scripts can easily be converted from the */
-+/* hppalinux.xc shared linker scripts, using diffs from sparc example */
-+/* however, the ld does not even automatically use these scripts then */
-
- /* These function symbols are provided for the .init/.fini section entry
- points automagically by the linker. */
-@@ -42,41 +41,11 @@
- void
- __libc_csu_init (void)
- {
--#ifdef HAVE_INITFINI_ARRAY
-- /* For dynamically linked executables the preinit array is executed by
-- the dynamic linker (before initializing any shared object. */
--
--# ifndef LIBC_NONSHARED
-- /* For static executables, preinit happens rights before init. */
-- {
-- const size_t size = __preinit_array_end - __preinit_array_start;
-- size_t i;
-- for (i = 0; i < size; i++)
-- (*__preinit_array_start [i]) ();
-- }
--# endif
--#endif
--
- _init ();
--
--#ifdef HAVE_INITFINI_ARRAY
-- {
-- const size_t size = __init_array_end - __init_array_start;
-- size_t i;
-- for (i = 0; i < size; i++)
-- (*__init_array_start [i]) ();
-- }
--#endif
- }
-
- void
- __libc_csu_fini (void)
- {
--#ifdef HAVE_INITFINI_ARRAY
-- size_t i = __fini_array_end - __fini_array_start;
-- while (i-- > 0)
-- (*__fini_array_start [i]) ();
--#endif
--
- _fini ();
- }
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-ld.so-brk-fix.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-ld.so-brk-fix.patch
deleted file mode 100644
index d1d9a924be8b..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-ld.so-brk-fix.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-diff -Nru glibc-2.3.3.old/sysdeps/unix/sysv/linux/dl-sysdep.c glibc-2.3.3/sysdeps/unix/sysv/linux/dl-sysdep.c
---- glibc-2.3.3.old/sysdeps/unix/sysv/linux/dl-sysdep.c 2004-08-16 10:47:10.361264216 -0400
-+++ glibc-2.3.3/sysdeps/unix/sysv/linux/dl-sysdep.c 2004-08-16 10:47:55.068467688 -0400
-@@ -1,5 +1,5 @@
- /* Dynamic linker system dependencies for Linux.
-- Copyright (C) 1995, 1997, 2001 Free Software Foundation, Inc.
-+ Copyright (C) 1995, 1997, 2001, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -21,6 +21,8 @@
- the generic dynamic linker system interface code. */
-
- #include <unistd.h>
-+#include <ldsodefs.h>
-+#include "kernel-features.h"
-
- #define DL_SYSDEP_INIT frob_brk ()
-
-@@ -28,6 +30,27 @@
- frob_brk (void)
- {
- __brk (0); /* Initialize the break. */
-+
-+#if ! __ASSUME_BRK_PAGE_ROUNDED
-+ /* If the dynamic linker was executed as a program, then the break may
-+ start immediately after our data segment. However, dl-minimal.c has
-+ already stolen the remainder of the page for internal allocations.
-+ If we don't adjust the break location recorded by the kernel, the
-+ normal program startup will inquire, find the value at our &_end,
-+ and start allocating its own data there, clobbering dynamic linker
-+ data structures allocated there during startup.
-+
-+ Later Linux kernels have changed this behavior so that the initial
-+ break value is rounded up to the page boundary before we start. */
-+
-+ extern void *__curbrk attribute_hidden;
-+ extern void _end attribute_hidden;
-+ void *const endpage = (void *) 0 + (((__curbrk - (void *) 0)
-+ + GLRO(dl_pagesize) - 1)
-+ & -GLRO(dl_pagesize));
-+ if (__builtin_expect (__curbrk >= &_end && __curbrk < endpage, 0))
-+ __brk (endpage);
-+#endif
- }
-
- #include <sysdeps/generic/dl-sysdep.c>
-diff -Nru glibc-2.3.3.old/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.3.3/sysdeps/unix/sysv/linux/kernel-features.h
---- glibc-2.3.3.old/sysdeps/unix/sysv/linux/kernel-features.h 2004-08-16 10:47:09.458401472 -0400
-+++ glibc-2.3.3/sysdeps/unix/sysv/linux/kernel-features.h 2004-08-16 10:48:02.345361432 -0400
-@@ -400,3 +400,9 @@
- #if __LINUX_KERNEL_VERSION >= 132612
- # define __ASSUME_GETDENTS32_D_TYPE 1
- #endif
-+
-+/* Starting with version 2.5.3, the initial location returned by `brk'
-+ after exec is always rounded up to the next page. */
-+#if __LINUX_KERNEL_VERSION >= 132355
-+# define __ASSUME_BRK_PAGE_ROUNDED 1
-+#endif
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mdns-resolver-20041102.diff b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mdns-resolver-20041102.diff
deleted file mode 100644
index d22e0cbc7e6a..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mdns-resolver-20041102.diff
+++ /dev/null
@@ -1,463 +0,0 @@
-diff -Nru glibc-2.3.3/resolv/res_hconf.c libc-mdns/resolv/res_hconf.c
---- glibc-2.3.3/resolv/res_hconf.c 2004-11-04 15:14:48.265197552 -0500
-+++ libc-mdns/resolv/res_hconf.c 2004-11-04 15:01:40.000000000 -0500
-@@ -59,6 +59,7 @@
- #define ENV_TRIM_ADD "RESOLV_ADD_TRIM_DOMAINS"
- #define ENV_MULTI "RESOLV_MULTI"
- #define ENV_REORDER "RESOLV_REORDER"
-+#define ENV_MDNS "RESOLV_MDNS"
-
- static const char *arg_service_list (const char *, int, const char *,
- unsigned int);
-@@ -81,7 +82,8 @@
- {"multi", arg_bool, HCONF_FLAG_MULTI},
- {"nospoof", arg_bool, HCONF_FLAG_SPOOF},
- {"spoofalert", arg_bool, HCONF_FLAG_SPOOFALERT},
-- {"reorder", arg_bool, HCONF_FLAG_REORDER}
-+ {"reorder", arg_bool, HCONF_FLAG_REORDER},
-+ {"mdns", arg_bool, HCONF_FLAG_MDNS}
- };
-
- /* Structure containing the state. */
-@@ -431,6 +433,9 @@
-
- memset (&_res_hconf, '\0', sizeof (_res_hconf));
-
-+ /* Default for mdns is "on". */
-+ _res_hconf.flags |= HCONF_FLAG_MDNS;
-+
- hconf_name = getenv (ENV_HOSTCONF);
- if (hconf_name == NULL)
- hconf_name = _PATH_HOSTCONF;
-@@ -483,6 +488,10 @@
- arg_trimdomain_list (ENV_TRIM_OVERR, 1, envval, 0);
- }
-
-+ envval = getenv (ENV_MDNS);
-+ if (envval)
-+ arg_bool (ENV_MDNS, 1, envval, HCONF_FLAG_MDNS);
-+
- _res_hconf.initialized = 1;
- }
-
-diff -Nru glibc-2.3.3/resolv/res_hconf.h libc-mdns/resolv/res_hconf.h
---- glibc-2.3.3/resolv/res_hconf.h 2001-07-06 00:55:39.000000000 -0400
-+++ libc-mdns/resolv/res_hconf.h 2004-11-04 15:01:40.000000000 -0500
-@@ -44,6 +44,7 @@
- # define HCONF_FLAG_SPOOFALERT (1 << 2) /* syslog warning of spoofed */
- # define HCONF_FLAG_REORDER (1 << 3) /* list best address first */
- # define HCONF_FLAG_MULTI (1 << 4) /* see comments for gethtbyname() */
-+# define HCONF_FLAG_MDNS (1 << 5) /* Disable MDNS support */
- };
- extern struct hconf _res_hconf;
-
-diff -Nru glibc-2.3.3/resolv/res_query.c libc-mdns/resolv/res_query.c
---- glibc-2.3.3/resolv/res_query.c 2004-11-04 15:14:48.268197096 -0500
-+++ libc-mdns/resolv/res_query.c 2004-11-04 15:01:40.000000000 -0500
-@@ -82,6 +82,8 @@
- #include <stdlib.h>
- #include <string.h>
-
-+#include "res_hconf.h"
-+
- /* Options. Leave them on. */
- /* #undef DEBUG */
-
-@@ -280,6 +282,13 @@
- *domain && !done;
- domain++) {
-
-+ if ((_res_hconf.flags & HCONF_FLAG_MDNS) != 0) {
-+ /* don't add "local" domain if query contains a dot */
-+ if (dots && (!__strcasecmp(*domain, "local") ||
-+ !__strcasecmp(*domain, "local.")))
-+ continue;
-+ }
-+
- if (domain[0][0] == '\0' ||
- (domain[0][0] == '.' && domain[0][1] == '\0'))
- root_on_list++;
-diff -Nru glibc-2.3.3/resolv/res_send.c libc-mdns/resolv/res_send.c
---- glibc-2.3.3/resolv/res_send.c 2004-11-04 15:14:48.269196944 -0500
-+++ libc-mdns/resolv/res_send.c 2004-11-04 15:06:31.000000000 -0500
-@@ -85,6 +85,9 @@
- #include <arpa/nameser.h>
- #include <arpa/inet.h>
- #include <sys/ioctl.h>
-+#if defined(_LIBC) && defined(linux)
-+#include <net/if.h>
-+#endif
-
- #include <errno.h>
- #include <fcntl.h>
-@@ -96,6 +99,8 @@
- #include <string.h>
- #include <unistd.h>
-
-+#include "res_hconf.h"
-+
- #if PACKETSZ > 65536
- #define MAXPACKET PACKETSZ
- #else
-@@ -180,6 +185,9 @@
- static int send_dg(res_state, const u_char *, int,
- u_char **, int *, int *, int,
- int *, int *, u_char **);
-+static int send_dg_mdns(res_state, const u_char *, int,
-+ u_char **, int *, int *, struct sockaddr_in6 *,
-+ int *, int *, u_char **);
- #ifdef DEBUG
- static void Aerror(const res_state, FILE *, const char *, int,
- const struct sockaddr *);
-@@ -332,6 +340,35 @@
- u_char *ans, int anssiz, u_char **ansp)
- {
- int gotsomewhere, terrno, try, v_circuit, resplen, ns, n;
-+ int usemdns;
-+ HEADER *qhp = (HEADER *) buf;
-+
-+ usemdns = 0;
-+ if ((_res_hconf.flags & HCONF_FLAG_MDNS) != 0 &&
-+ qhp->qr == 0 && qhp->opcode == QUERY && qhp->qdcount == htons(1)) {
-+ /* got one simple query */
-+ const u_char *bp, *be;
-+ be = buf + buflen;
-+ for (bp = buf + NS_HFIXEDSZ; bp < be; )
-+ if ((*bp & NS_CMPRSFLGS) != 0)
-+ break;
-+ else if (*bp) {
-+ if (*bp == 5 && !strncasecmp(bp, "\005local\000", 7)) {
-+ usemdns = 1;
-+ break;
-+ }
-+ if (*bp == 3 && !strncasecmp(bp, "\003254\003169\007in-addr\004arpa\000", 22)) {
-+ usemdns = 1;
-+ break;
-+ }
-+ if (*bp == 1 && !strncasecmp(bp, "\0010\0018\001e\001f\003ip6\004arpa\000", 18)) {
-+ usemdns = 2;
-+ break;
-+ }
-+ bp += *bp + 1;
-+ } else
-+ break;
-+ }
-
- if (statp->nscount == 0) {
- __set_errno (ESRCH);
-@@ -465,10 +502,27 @@
- * Send request, RETRY times, or until successful.
- */
- for (try = 0; try < statp->retry; try++) {
-- for (ns = 0; ns < MAXNS; ns++)
-+ for (ns = 0; ns < (usemdns ? 1 : MAXNS); ns++)
- {
- struct sockaddr_in6 *nsap = EXT(statp).nsaddrs[ns];
-
-+ if (usemdns == 1) {
-+ static struct sockaddr_in mdns4;
-+ mdns4.sin_family = AF_INET;
-+ mdns4.sin_port = htons(5353);
-+ mdns4.sin_addr.s_addr = htonl(0xe00000fb);
-+ nsap = (struct sockaddr_in6 *)&mdns4;
-+ }
-+ if (usemdns == 2) {
-+ static struct sockaddr_in6 mdns6;
-+ mdns6.sin6_family = AF_INET6;
-+ mdns6.sin6_port = htons(5353);
-+ mdns6.sin6_addr.s6_addr32[0] = htonl(0xff020000);
-+ mdns6.sin6_addr.s6_addr32[3] = htonl(0x000000fb);
-+ nsap = &mdns6;
-+ }
-+
-+
- if (nsap == NULL)
- goto next_ns;
- same_ns:
-@@ -525,8 +579,11 @@
- resplen = n;
- } else {
- /* Use datagrams. */
-- n = send_dg(statp, buf, buflen, &ans, &anssiz, &terrno,
-- ns, &v_circuit, &gotsomewhere, ansp);
-+ if (usemdns)
-+ n = send_dg_mdns(statp, buf, buflen, &ans, &anssiz, &terrno, nsap, &v_circuit, &gotsomewhere, ansp);
-+ else
-+ n = send_dg(statp, buf, buflen, &ans, &anssiz, &terrno,
-+ ns, &v_circuit, &gotsomewhere, ansp);
- if (n < 0)
- return (-1);
- if (n == 0)
-@@ -593,8 +650,15 @@
- if (!v_circuit) {
- if (!gotsomewhere)
- __set_errno (ECONNREFUSED); /* no nameservers found */
-- else
-+ else if (!usemdns) {
- __set_errno (ETIMEDOUT); /* no answer obtained */
-+ } else {
-+ /* treat timeout as host not found */
-+ HEADER *anhp = (HEADER *) ans;
-+ memset(ans, 0, HFIXEDSZ);
-+ anhp->rcode = NXDOMAIN;
-+ return HFIXEDSZ;
-+ }
- } else
- __set_errno (terrno);
- return (-1);
-@@ -1035,6 +1099,255 @@
- }
- }
-
-+static int
-+send_dg_mdns(res_state statp,
-+ const u_char *buf, int buflen, u_char **ansp, int *anssizp,
-+ int *terrno, struct sockaddr_in6 *nsap, int *v_circuit, int *gotsomewhere, u_char **anscp)
-+{
-+ const HEADER *hp = (HEADER *) buf;
-+ u_char *ans = *ansp;
-+ int anssiz = *anssizp;
-+ HEADER *anhp = (HEADER *) ans;
-+ struct timespec now, timeout, finish;
-+ struct pollfd pfd[32];
-+ int ptimeout;
-+ int fromlen, resplen, seconds, n, s;
-+ int on = 1;
-+ struct msghdr mhdr;
-+ struct iovec iov;
-+ u_char cmsgbuf[CMSG_SPACE(sizeof(int))];
-+ struct cmsghdr *cmsg;
-+ int ttl;
-+ struct ifconf ifconf;
-+ struct ifreq ifreq[64];
-+ int ifreqn;
-+ int i, j;
-+ int ifidx[32], ifidxn;
-+ struct ip_mreqn mreqn;
-+
-+ s = socket(nsap->sin6_family == AF_INET ? PF_INET : PF_INET6, SOCK_DGRAM, 0);
-+ if (s < 0) {
-+ *terrno = errno;
-+ Perror(statp, stderr, "socket(dg)", errno);
-+ return (-1);
-+ }
-+ ifconf.ifc_len = sizeof(ifreq);
-+ ifconf.ifc_req = ifreq;
-+ ifidxn = 0;
-+ if (ioctl(s, SIOCGIFCONF, &ifconf) == 0) {
-+ ifreqn = ifconf.ifc_len / sizeof(*ifreq);
-+ for (i = 0 ; i < ifreqn; i++) {
-+ if (ioctl(s, SIOCGIFFLAGS, ifreq + i))
-+ continue;
-+ if (!(ifreq[i].ifr_flags & IFF_MULTICAST))
-+ continue;
-+ if (ioctl(s, SIOCGIFINDEX, ifreq + i))
-+ continue;
-+ for (j = 0; j < ifidxn; j++)
-+ if (ifidx[j] == ifreq[i].ifr_ifindex)
-+ break;
-+ if (j < ifidxn)
-+ continue;
-+ ifidx[ifidxn++] = ifreq[i].ifr_ifindex;
-+ if (ifidxn == sizeof(ifidx)/sizeof(*ifidx))
-+ break;
-+ }
-+ }
-+ j = 0;
-+ for (i = 0; i < (ifidxn ? ifidxn : 1); i++) {
-+ if (i) {
-+ s = socket(nsap->sin6_family == AF_INET ? PF_INET : PF_INET6, SOCK_DGRAM, 0);
-+ if (!s)
-+ continue;
-+ }
-+ if (setsockopt(s, SOL_IP, IP_RECVTTL, &on, sizeof(on))) {
-+ *terrno = errno;
-+ Perror(statp, stderr, "IP_RECVTTL(dg)", errno);
-+ close(s);
-+ continue;
-+ }
-+ if (ifidxn) {
-+ memset(&mreqn, 0, sizeof(mreqn));
-+ mreqn.imr_ifindex = ifidx[i];
-+ if (setsockopt(s, SOL_IP, IP_MULTICAST_IF, &mreqn, sizeof(mreqn))) {
-+ *terrno = errno;
-+ Perror(statp, stderr, "IP_MULTICAST_IF", errno);
-+ close(s);
-+ continue;
-+ }
-+ }
-+ if (sendto(s, (char*)buf, buflen, 0,
-+ (struct sockaddr *)nsap, sizeof *nsap) != buflen) {
-+ Aerror(statp, stderr, "sendto", errno, *(struct sockaddr_in *)nsap);
-+ close(s);
-+ continue;
-+ }
-+ pfd[j].fd = s;
-+ pfd[j].events = POLLIN;
-+ j++;
-+ }
-+ /*
-+ * Wait for reply.
-+ */
-+ seconds = statp->retrans;
-+ if (seconds <= 0)
-+ seconds = 1;
-+ evNowTime(&now);
-+ evConsTime(&timeout, seconds, 0);
-+ evAddTime(&finish, &now, &timeout);
-+ wait:
-+ if (j == 0) {
-+ return (0);
-+ }
-+
-+ /* Convert struct timespec in milliseconds. */
-+ ptimeout = timeout.tv_sec * 1000 + timeout.tv_nsec / 1000000;
-+ n = __poll (pfd, j, ptimeout);
-+ if (n == 0) {
-+ Dprint(statp->options & RES_DEBUG, (stdout, ";; timeout\n"));
-+ *gotsomewhere = 1;
-+ for (i = 0; i < j; i++)
-+ close(pfd[i].fd);
-+ return (0);
-+ }
-+ if (n < 0) {
-+ if (errno == EINTR) {
-+ evNowTime(&now);
-+ if (evCmpTime(finish, now) > 0) {
-+ evSubTime(&timeout, &finish, &now);
-+ goto wait;
-+ }
-+ }
-+ Perror(statp, stderr, "select", errno);
-+ for (i = 0; i < j; i++)
-+ close(pfd[i].fd);
-+ res_nclose(statp);
-+ return (0);
-+ }
-+ for (i = 0; i < j - 1; i++)
-+ if (pfd[j].revents == POLLIN)
-+ break;
-+ s = pfd[i].fd;
-+ __set_errno (0);
-+ fromlen = sizeof(struct sockaddr_in6);
-+ if (anssiz < MAXPACKET
-+ && anscp
-+ && (ioctl (s, FIONREAD, &resplen) < 0
-+ || anssiz < resplen)) {
-+ ans = malloc (MAXPACKET);
-+ if (ans == NULL)
-+ ans = *ansp;
-+ else {
-+ anssiz = MAXPACKET;
-+ *anssizp = MAXPACKET;
-+ *ansp = ans;
-+ *anscp = ans;
-+ anhp = (HEADER *) ans;
-+ }
-+ }
-+ iov.iov_base = ans;
-+ iov.iov_len = anssiz;
-+ mhdr.msg_name = 0;
-+ mhdr.msg_namelen = 0;
-+ mhdr.msg_iov = &iov;
-+ mhdr.msg_iovlen = 1;
-+ mhdr.msg_control = cmsgbuf;
-+ mhdr.msg_controllen = sizeof(cmsgbuf);
-+ mhdr.msg_flags = 0;
-+ resplen = recvmsg(s, &mhdr, 0);
-+ if (resplen <= 0) {
-+ if (errno == EAGAIN)
-+ goto wait;
-+ Perror(statp, stderr, "recvfrom", errno);
-+wait2:
-+ close(s);
-+ if (i < j)
-+ memmove(pfd + i, pfd + i + 1, sizeof(*pfd) * (j - i));
-+ j--;
-+ goto wait;
-+ }
-+ cmsg = CMSG_FIRSTHDR(&mhdr);
-+ for (cmsg = CMSG_FIRSTHDR(&mhdr); cmsg; CMSG_NXTHDR(&mhdr, cmsg))
-+ if (cmsg->cmsg_level == SOL_IP && cmsg->cmsg_type == IP_TTL)
-+ break;
-+ if (!cmsg) {
-+ Dprint(statp->options & RES_DEBUG,
-+ (stdout, ";; no TTL found\n"));
-+ goto wait2;
-+ }
-+ ttl = *(int *)CMSG_DATA(cmsg);
-+ if (ttl != 255) {
-+ Dprint(statp->options & RES_DEBUG,
-+ (stdout, ";; answer with bad TTL: %d \n", ttl));
-+ goto wait;
-+ }
-+ *gotsomewhere = 1;
-+ if (resplen < HFIXEDSZ) {
-+ /*
-+ * Undersized message.
-+ */
-+ Dprint(statp->options & RES_DEBUG,
-+ (stdout, ";; undersized: %d\n",
-+ resplen));
-+ *terrno = EMSGSIZE;
-+ goto wait;
-+ }
-+ if (hp->id != anhp->id) {
-+ /*
-+ * response from old query, ignore it.
-+ * XXX - potential security hazard could
-+ * be detected here.
-+ */
-+ DprintQ((statp->options & RES_DEBUG) ||
-+ (statp->pfcode & RES_PRF_REPLY),
-+ (stdout, ";; old answer:\n"),
-+ ans, (resplen > anssiz) ? anssiz : resplen);
-+ goto wait;
-+ }
-+ if (!(statp->options & RES_INSECURE2) &&
-+ !res_queriesmatch(buf, buf + buflen,
-+ ans, ans + anssiz)) {
-+ /*
-+ * response contains wrong query? ignore it.
-+ * XXX - potential security hazard could
-+ * be detected here.
-+ */
-+ DprintQ((statp->options & RES_DEBUG) ||
-+ (statp->pfcode & RES_PRF_REPLY),
-+ (stdout, ";; wrong query name:\n"),
-+ ans, (resplen > anssiz) ? anssiz : resplen);
-+ goto wait;
-+ }
-+ if (anhp->rcode == SERVFAIL ||
-+ anhp->rcode == NOTIMP ||
-+ anhp->rcode == REFUSED) {
-+ DprintQ(statp->options & RES_DEBUG,
-+ (stdout, "server rejected query:\n"),
-+ ans, (resplen > anssiz) ? anssiz : resplen);
-+ goto wait;
-+ }
-+ for (i = 0; i < j; i++)
-+ close(pfd[i].fd);
-+#if 0
-+ if (!(statp->options & RES_IGNTC) && anhp->tc) {
-+ /*
-+ * To get the rest of answer,
-+ * use TCP with same server.
-+ */
-+ Dprint(statp->options & RES_DEBUG,
-+ (stdout, ";; truncated answer\n"));
-+ *v_circuit = 1;
-+ res_nclose(statp);
-+ return (1);
-+ }
-+#endif
-+ /*
-+ * All is well, or the error is fatal. Signal that the
-+ * next nameserver ought not be tried.
-+ */
-+ return (resplen);
-+}
-+
- #ifdef DEBUG
- static void
- Aerror(const res_state statp, FILE *file, const char *string, int error,
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-add-missing-sgidefs_h.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-add-missing-sgidefs_h.patch
deleted file mode 100644
index f146679646f6..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-add-missing-sgidefs_h.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-2004-11-08 Richard Sandiford <rsandifo@redhat.com>
-
- * sysdeps/mips/sys/regdef.h: Include #include <sgidefs.h>
- * sysdeps/mips/sys/ucontext.h: Likewise.
-
-Index: sysdeps/mips/sys/regdef.h
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/mips/sys/regdef.h,v
-retrieving revision 1.4
-diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.4 regdef.h
---- sysdeps/mips/sys/regdef.h 9 Apr 2003 02:51:04 -0000 1.4
-+++ sysdeps/mips/sys/regdef.h 28 Oct 2004 12:57:20 -0000
-@@ -20,6 +20,8 @@
- #ifndef _SYS_REGDEF_H
- #define _SYS_REGDEF_H
-
-+#include <sgidefs.h>
-+
- /*
- * Symbolic register names for 32 bit ABI
- */
-Index: sysdeps/mips/sys/ucontext.h
-===================================================================
-RCS file: /cvs/glibc/libc/sysdeps/mips/sys/ucontext.h,v
-retrieving revision 1.4
-diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.4 ucontext.h
---- sysdeps/mips/sys/ucontext.h 17 Mar 2003 15:47:12 -0000 1.4
-+++ sysdeps/mips/sys/ucontext.h 28 Oct 2004 12:57:20 -0000
-@@ -23,6 +23,7 @@ #define _SYS_UCONTEXT_H 1
-
- #include <features.h>
- #include <signal.h>
-+#include <sgidefs.h>
-
- /* Type for general register. */
- #if _MIPS_SIM == _MIPS_SIM_ABI32
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-generate-syscall_h.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-generate-syscall_h.patch
deleted file mode 100644
index e9238f7e16a5..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-generate-syscall_h.patch
+++ /dev/null
@@ -1,254 +0,0 @@
---- sysdeps/unix/sysv/linux/mips/configure.in.orig 2004-09-29 23:49:30.000000000 -0400
-+++ sysdeps/unix/sysv/linux/mips/configure.in 2004-09-30 02:04:26.000000000 -0400
-@@ -19,50 +19,62 @@ mips*64*)
- AC_MSG_WARN([*** asm/unistd.h not found, it will not be pre-processed])
- echo '#include <asm/unistd.h>' > asm-unistd.h
- else
-- # The point of this preprocessing is to turn __NR_<syscall> into
-- # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
-- # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
-- # and <abi> is the compiler-enabled ABI.
-+ # There are two versions of this header. The older form defined
-+ # __NR_foo, __NR_N32_foo, and __NR_O32_foo. The new form defines
-+ # only __NR_foo, but does it based on the current ABI.
-+ # We want to have __NR_O32_foo, __NR_N64_foo, and __NR_N32_foo defined
-+ # always, and __NR_foo defined conditionally. Only the newer form is
-+ # supported.
- cat "$asm_unistd_h" |
-- sed -e 's,__NR_,__NR_N64_,g' \
-- -e 's,__NR_N64_##,__NR_##,g' \
-- -e 's,__NR_N64_O32_,__NR_O32_,g' \
-- -e 's,__NR_N64_N32_,__NR_N32_,g' \
-- -e 's,__NR_N64_N64_,__NR_N64_,g' \
-- | awk > asm-unistd.h '
-+ awk > asm-unistd.h '
- BEGIN { print "#include <sgidefs.h>"; }
--/^#define __NR.*unused/ { print; next; }
--/^#define __NR_N64__exit __NR_N64_exit/ {
-- print "#define __NR__exit __NR_exit";
-- print "#define __NR_O32__exit __NR_O32_exit";
-- print "#define __NR_N32__exit __NR_N32_exit";
-- print; next;
--}
--/^#define __NR_O32_/ {
-- name = $2;
-- sub (/_O32_/, "_", name);
-- print;
-+/^#if _MIPS_SIM == _MIPS_SIM_ABI32/,/^#endif.*_MIPS_SIM_ABI32/ {
-+ if (/^#define __NR_Linux/) { print; next; }
-+ if (/^#define __NR_/) {
-+ line = $0;
-+ gsub (/_NR_/, "_NR_O32_", line);
-+ print "#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */";
-+ print "";
-+ print line;
-+ print "";
- print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
-- print "# define " name " " $2;
-- print "#endif";
-- next;
-+ print; next;
-+ }
-+ print; next;
- }
--/^#define __NR_N32_/ {
-- name = $2;
-- sub (/_N32_/, "_", name);
-- print;
-+/^#if _MIPS_SIM == _MIPS_SIM_NABI32/,/^#endif.*_MIPS_SIM_NABI32/ {
-+ if (/^#define __NR_Linux/) { print; next; }
-+ if (/^#define __NR_/) {
-+ line = $0;
-+ gsub (/_NR_/, "_NR_N32_", line);
-+ print "#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */";
-+ print "";
-+ print line;
-+ print "";
- print "#if _MIPS_SIM == _MIPS_SIM_NABI32";
-- print "# define " name " " $2;
-- print "#endif";
-- next;
-+ print; next;
-+ }
-+ print; next;
- }
--/^#define __NR_N64_/ {
-- name = $2;
-- sub (/_N64_/, "_", name);
-- print;
-+/^#if _MIPS_SIM == _MIPS_SIM_ABI64/,/^#endif.*_MIPS_SIM_ABI64/ {
-+ if (/^#define __NR_Linux/) { print; next; }
-+ if (/^#define __NR_/) {
-+ line = $0;
-+ gsub (/_NR_/, "_NR_N64_", line);
-+ print "#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */";
-+ print "";
-+ print line;
-+ print "";
- print "#if _MIPS_SIM == _MIPS_SIM_ABI64";
-- print "# define " name " " $2;
-- print "#endif";
-+ print; next;
-+ }
-+ print; next;
-+}
-+/^#define __NR_64_/ {
-+ line = $0;
-+ gsub (/_NR_64_/, "_NR_N64_", line);
-+ print;
-+ print line;
- next;
- }
- {
---- sysdeps/unix/sysv/linux/mips/configure.orig 2004-09-29 23:49:30.000000000 -0400
-+++ sysdeps/unix/sysv/linux/mips/configure 2004-09-30 02:06:58.000000000 -0400
-@@ -19,50 +19,62 @@ mips*64*)
- echo "$as_me: WARNING: *** asm/unistd.h not found, it will not be pre-processed" >&2;}
- echo '#include <asm/unistd.h>' > asm-unistd.h
- else
-- # The point of this preprocessing is to turn __NR_<syscall> into
-- # __NR_N64_<syscall>, as well as to define __NR_<syscall> to
-- # __NR_<abi>_<syscall>, if __NR_<abi>_<syscall> is defined
-- # and <abi> is the compiler-enabled ABI.
-+ # There are two versions of this header. The older form defined
-+ # __NR_foo, __NR_N32_foo, and __NR_O32_foo. The new form defines
-+ # only __NR_foo, but does it based on the current ABI.
-+ # We want to have __NR_O32_foo, __NR_N64_foo, and __NR_N32_foo defined
-+ # always, and __NR_foo defined conditionally. Only the newer form is
-+ # supported.
- cat "$asm_unistd_h" |
-- sed -e 's,__NR_,__NR_N64_,g' \
-- -e 's,__NR_N64_##,__NR_##,g' \
-- -e 's,__NR_N64_O32_,__NR_O32_,g' \
-- -e 's,__NR_N64_N32_,__NR_N32_,g' \
-- -e 's,__NR_N64_N64_,__NR_N64_,g' \
-- | awk > asm-unistd.h '
-+ awk > asm-unistd.h '
- BEGIN { print "#include <sgidefs.h>"; }
--/^#define __NR.*unused/ { print; next; }
--/^#define __NR_N64__exit __NR_N64_exit/ {
-- print "#define __NR__exit __NR_exit";
-- print "#define __NR_O32__exit __NR_O32_exit";
-- print "#define __NR_N32__exit __NR_N32_exit";
-- print; next;
--}
--/^#define __NR_O32_/ {
-- name = $2;
-- sub (/_O32_/, "_", name);
-- print;
-+/^#if _MIPS_SIM == _MIPS_SIM_ABI32/,/^#endif.*_MIPS_SIM_ABI32/ {
-+ if (/^#define __NR_Linux/) { print; next; }
-+ if (/^#define __NR_/) {
-+ line = $0;
-+ gsub (/_NR_/, "_NR_O32_", line);
-+ print "#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */";
-+ print "";
-+ print line;
-+ print "";
- print "#if _MIPS_SIM == _MIPS_SIM_ABI32";
-- print "# define " name " " $2;
-- print "#endif";
-- next;
-+ print; next;
-+ }
-+ print; next;
- }
--/^#define __NR_N32_/ {
-- name = $2;
-- sub (/_N32_/, "_", name);
-- print;
-+/^#if _MIPS_SIM == _MIPS_SIM_NABI32/,/^#endif.*_MIPS_SIM_NABI32/ {
-+ if (/^#define __NR_Linux/) { print; next; }
-+ if (/^#define __NR_/) {
-+ line = $0;
-+ gsub (/_NR_/, "_NR_N32_", line);
-+ print "#endif /* _MIPS_SIM == _MIPS_SIM_NABI32 */";
-+ print "";
-+ print line;
-+ print "";
- print "#if _MIPS_SIM == _MIPS_SIM_NABI32";
-- print "# define " name " " $2;
-- print "#endif";
-- next;
-+ print; next;
-+ }
-+ print; next;
- }
--/^#define __NR_N64_/ {
-- name = $2;
-- sub (/_N64_/, "_", name);
-- print;
-+/^#if _MIPS_SIM == _MIPS_SIM_ABI64/,/^#endif.*_MIPS_SIM_ABI64/ {
-+ if (/^#define __NR_Linux/) { print; next; }
-+ if (/^#define __NR_/) {
-+ line = $0;
-+ gsub (/_NR_/, "_NR_N64_", line);
-+ print "#endif /* _MIPS_SIM == _MIPS_SIM_ABI64 */";
-+ print "";
-+ print line;
-+ print "";
- print "#if _MIPS_SIM == _MIPS_SIM_ABI64";
-- print "# define " name " " $2;
-- print "#endif";
-+ print; next;
-+ }
-+ print; next;
-+}
-+/^#define __NR_64_/ {
-+ line = $0;
-+ gsub (/_NR_64_/, "_NR_N64_", line);
-+ print;
-+ print line;
- next;
- }
- {
---- sysdeps/unix/sysv/linux/mips/Makefile.orig 2004-09-29 23:49:30.000000000 -0400
-+++ sysdeps/unix/sysv/linux/mips/Makefile 2004-09-30 02:12:30.000000000 -0400
-@@ -12,7 +12,7 @@ no_syscall_list_h = 1
- # Generate the list of SYS_* macros for the system calls (__NR_* macros).
- # We generate not only SYS_<syscall>, pointing at SYS_<abi>_<syscall> if
- # it exists, but also define SYS_<abi>_<syscall> for all ABIs.
--$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
-+$(objpfx)syscall-list.h $(objpfx)syscall-list.d: $(common-objpfx)asm-unistd.h
- $(make-target-directory)
- { \
- echo '/* Generated at libc build time from kernel syscall list. */';\
-@@ -22,35 +22,9 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.
- echo '#endif'; \
- echo ''; \
- echo '#include <sgidefs.h>'; \
-- rm -f $(@:.d=.h).newt; \
-- $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \
-- -x c $(+includes) $(sysincludes) $< -D_LIBC -dM | \
-- sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
-- > $(@:.d=.h).newt; \
-- if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
-- echo '#if _MIPS_SIM == _MIPS_SIM_NABI32'; \
-- sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \
-- LC_ALL=C sort; \
-- echo '#elif _MIPS_SIM == _MIPS_SIM_ABI64'; \
-- sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \
-- LC_ALL=C sort; \
-- echo '#else'; \
-- sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \
-- LC_ALL=C sort; \
-- echo '#endif'; \
-- sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \
-- LC_ALL=C sort +1.8; \
-- else \
-- cat $(@:.d=.h).newt; \
-- fi; \
-- rm $(@:.d=.h).newt; \
-+ grep -E '^#.*(MIPS_SIM|__NR)' $(common-objpfx)asm-unistd.h \
-+ | sed 's/__NR_/SYS_/g' ; \
- } > $(@:.d=.h).new
- mv -f $(@:.d=.h).new $(@:.d=.h)
--ifneq (,$(objpfx))
-- sed $(sed-remove-objpfx) $(@:.h=.d)-t > $(@:.h=.d)-t2
-- rm -f $(@:.h=.d)-t
-- mv -f $(@:.h=.d)-t2 $(@:.h=.d)
--else
-- mv -f $(@:.h=.d)-t $(@:.h=.d)
--endif
-+ echo > $(@:.h=.d)
- endif
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-prot_grows-undefined.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-prot_grows-undefined.patch
deleted file mode 100644
index cba618ca44b8..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-prot_grows-undefined.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-2004-10-18 Maciej W. Rozycki <macro@mips.com>
-
- * sysdeps/unix/sysv/linux/mips/bits/mman.h (PROT_GROWSDOWN):
- Define.
- (PROT_GROWSUP): Likewise.
-
- Please apply.
-
- Maciej
-
-glibc-2.3.3-20041018-mips-prot_grows-1
-diff -up --recursive --new-file glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/bits/mman.h glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/bits/mman.h
---- glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/bits/mman.h Sat Mar 8 03:26:00 2003
-+++ glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/bits/mman.h Mon Oct 18 14:48:57 2004
-@@ -1,5 +1,5 @@
- /* Definitions for POSIX memory map interface. Linux/MIPS version.
-- Copyright (C) 1997, 2000, 2003 Free Software Foundation, Inc.
-+ Copyright (C) 1997, 2000, 2003, 2004 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -34,6 +34,10 @@
- #define PROT_WRITE 0x2 /* Page can be written. */
- #define PROT_EXEC 0x4 /* Page can be executed. */
- #define PROT_NONE 0x0 /* Page can not be accessed. */
-+#define PROT_GROWSDOWN 0x01000000 /* Extend change to start of
-+ growsdown vma (mprotect only). */
-+#define PROT_GROWSUP 0x02000000 /* Extend change to start of
-+ growsup vma (mprotect only). */
-
- /* Sharing types (must choose one and only one of these). */
- #define MAP_SHARED 0x01 /* Share changes. */
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-rtld_deepbind-undefined.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-rtld_deepbind-undefined.patch
deleted file mode 100644
index 16080393025d..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-rtld_deepbind-undefined.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-2004-10-18 Maciej W. Rozycki <macro@mips.com>
-
- * sysdeps/mips/bits/dlfcn.h (RTLD_DEEPBIND): Define.
-
- Please apply.
-
- Maciej
-
-glibc-2.3.3-20041018-mips-rtld_deepbind-2.patch
-diff -up --recursive --new-file glibc-2.3.3-20041018.macro/sysdeps/mips/bits/dlfcn.h glibc-2.3.3-20041018/sysdeps/mips/bits/dlfcn.h
---- glibc-2.3.3-20041018.macro/sysdeps/mips/bits/dlfcn.h Sat Oct 27 02:25:51 2001
-+++ glibc-2.3.3-20041018/sysdeps/mips/bits/dlfcn.h Mon Oct 18 16:21:44 2004
-@@ -1,5 +1,6 @@
- /* System dependent definitions for run-time dynamic loading.
-- Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
-+ Copyright (C) 1996, 1997, 1999, 2000, 2001, 2004
-+ Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -24,8 +25,9 @@
- /* The MODE argument to `dlopen' contains one of the following: */
- #define RTLD_LAZY 0x0001 /* Lazy function call binding. */
- #define RTLD_NOW 0x0002 /* Immediate function call binding. */
--#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
-+#define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */
- #define RTLD_NOLOAD 0x00008 /* Do not load the object. */
-+#define RTLD_DEEPBIND 0x00010 /* Use deep binding. */
-
- /* If the following bit is set in the MODE argument to `dlopen',
- the symbols of the loaded object and its dependencies are made
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-sysdep-cancel.diff b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-sysdep-cancel.diff
deleted file mode 100644
index 0e70b8ddf1ad..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-sysdep-cancel.diff
+++ /dev/null
@@ -1,54 +0,0 @@
-Index: linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h
-===================================================================
-RCS file: /cvs/glibc/libc/linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h,v
-retrieving revision 1.2
-diff -u -r1.2 sysdep-cancel.h
---- linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 28 Jul 2003 18:45:37 -0000 1.2
-+++ linuxthreads/sysdeps/unix/sysv/linux/mips/sysdep-cancel.h 1 Jun 2004 17:19:08 -0000
-@@ -27,9 +27,6 @@
- #ifdef __PIC__
- # undef PSEUDO
- # define PSEUDO(name, syscall_name, args) \
-- .align 2; \
-- 99: la t9,__syscall_error; \
-- jr t9; \
- ENTRY (name) \
- .set noreorder; \
- .cpload t9; \
-@@ -44,25 +41,25 @@
- ret; \
- L(pseudo_cancel): \
- SAVESTK_##args; \
-- sw ra, 28(sp); \
-- sw gp, 32(sp); \
-+ sw gp, 28(sp); \
-+ sw ra, 32(sp); \
- PUSHARGS_##args; /* save syscall args */ \
- CENABLE; \
-- lw gp, 32(sp); \
-- sw v0, 44(sp); /* save mask */ \
-+ lw gp, 28(sp); \
-+ sw v0, 36(sp); /* save mask */ \
- POPARGS_##args; /* restore syscall args */ \
- .set noreorder; \
- li v0, SYS_ify (syscall_name); \
- syscall; \
- .set reorder; \
-- sw v0, 36(sp); /* save syscall result */ \
-- sw a3, 40(sp); /* save syscall error flag */ \
-- lw a0, 44(sp); /* pass mask as arg1 */ \
-+ sw v0, 40(sp); /* save syscall result */ \
-+ sw a3, 44(sp); /* save syscall error flag */ \
-+ lw a0, 36(sp); /* pass mask as arg1 */ \
- CDISABLE; \
-- lw gp, 32(sp); \
-- lw v0, 36(sp); /* restore syscall result */ \
-- lw a3, 40(sp); /* restore syscall error flag */ \
-- lw ra, 28(sp); /* restore return address */ \
-+ lw gp, 28(sp); \
-+ lw v0, 40(sp); /* restore syscall result */ \
-+ lw a3, 44(sp); /* restore syscall error flag */ \
-+ lw ra, 32(sp); /* restore return address */ \
- RESTORESTK; \
- bne a3, zero, SYSCALL_ERROR_LABEL; \
- L(pseudo_end):
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-update-__throw.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-update-__throw.patch
deleted file mode 100644
index a2c14886c13c..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-mips-update-__throw.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-2004-10-18 Maciej W. Rozycki <macro@mips.com>
-
- * sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Use
- __NTH instead of __THROW in the inline definition.
- * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set):
- Likewise.
-
- Please apply.
-
- Maciej
-
-glibc-2.3.3-20041018-mips-nth-1.patch
-diff -up --recursive --new-file glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/bits/socket.h glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/bits/socket.h
---- glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/bits/socket.h Thu Sep 27 02:25:58 2001
-+++ glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/bits/socket.h Mon Oct 18 13:12:39 2004
-@@ -1,5 +1,6 @@
- /* System-specific socket constants and types. Linux/MIPS version.
-- Copyright (C) 1991,92,1994-1999,2000,2001 Free Software Foundation, Inc.
-+ Copyright (C) 1991, 92, 1994-1999, 2000, 2001, 2004
-+ Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -261,7 +262,7 @@ extern struct cmsghdr *__cmsg_nxthdr (st
- # define _EXTERN_INLINE extern __inline
- # endif
- _EXTERN_INLINE struct cmsghdr *
--__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
-+__NTH (__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg))
- {
- if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
- /* The kernel header does this so there may be a reason. */
-diff -up --recursive --new-file glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/sys/tas.h glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/sys/tas.h
---- glibc-2.3.3-20041018.macro/sysdeps/unix/sysv/linux/mips/sys/tas.h Wed Jul 21 01:26:43 2004
-+++ glibc-2.3.3-20041018/sysdeps/unix/sysv/linux/mips/sys/tas.h Mon Oct 18 11:18:56 2004
-@@ -35,7 +35,7 @@ extern int _test_and_set (int *p, int v)
- # endif
-
- _EXTERN_INLINE int
--_test_and_set (int *p, int v) __THROW
-+__NTH (_test_and_set (int *p, int v))
- {
- int r, t;
-
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-nptl-altivec.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-nptl-altivec.patch
deleted file mode 100644
index 8ddc8afdd165..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-nptl-altivec.patch
+++ /dev/null
@@ -1,229 +0,0 @@
-diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S
---- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-05-28 16:19:18.000000000 -0500
-+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S 2004-06-14 19:28:43.131988368 -0500
-@@ -187,8 +187,8 @@
- addi r9,r9,32
-
- stvx v18,0,r10
-- stvx v11,0,r9
-- addi r19,r10,32
-+ stvx v19,0,r9
-+ addi r10,r10,32
- addi r9,r9,32
-
- stvx v20,0,r10
-@@ -221,11 +221,6 @@
- addi r10,r10,32
- addi r9,r9,32
-
-- stvx v10,0,r10
-- stvx v11,0,r9
-- addi r10,r10,32
-- addi r9,r9,32
--
- mfvscr v0
- mfspr r0,VRSAVE
- stvx v0,0,r10
-diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S
---- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S 2004-05-28 16:19:18.000000000 -0500
-+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S 2004-06-14 19:36:33.639954472 -0500
-@@ -133,8 +133,8 @@
- addi r9,r9,32
-
- lvx v18,0,r10
-- lvx v11,0,r9
-- addi r19,r10,32
-+ lvx v19,0,r9
-+ addi r10,r10,32
- addi r9,r9,32
-
- lvx v20,0,r10
-diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S
---- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-05-28 16:19:18.000000000 -0500
-+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S 2004-06-14 19:39:49.580990280 -0500
-@@ -189,8 +189,8 @@
- addi r9,r9,32
-
- stvx v18,0,r10
-- stvx v11,0,r9
-- addi r19,r10,32
-+ stvx v19,0,r9
-+ addi r10,r10,32
- addi r9,r9,32
-
- stvx v20,0,r10
-@@ -223,11 +223,6 @@
- addi r10,r10,32
- addi r9,r9,32
-
-- stvx v10,0,r10
-- stvx v11,0,r9
-- addi r10,r10,32
-- addi r9,r9,32
--
- mfvscr v0
- mfspr r0,VRSAVE
- stvx v0,0,r10
-@@ -339,8 +334,8 @@
- addi r9,r9,32
-
- lvx v18,0,r10
-- lvx v11,0,r9
-- addi r19,r10,32
-+ lvx v19,0,r9
-+ addi r10,r10,32
- addi r9,r9,32
-
- lvx v20,0,r10
-diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S
---- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S 2004-05-28 16:19:18.000000000 -0500
-+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S 2004-06-14 19:27:34.406052600 -0500
-@@ -268,21 +268,22 @@
- stfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r3)
-
- ld r5,.LC__dl_hwcap@toc(r2)
-- li r10,0
- # ifdef SHARED
- /* Load _rtld-global._dl_hwcap. */
- ld r5,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r5)
- # else
- ld r5,0(r5) /* Load extern _dl_hwcap. */
--# endif
-- andis. r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16)
-- beq L(has_no_vec)
--
-+# endif
- la r10,(SIGCONTEXT_V_RESERVE+8)(r3)
- la r9,(SIGCONTEXT_V_RESERVE+24)(r3)
-+
-+ andis. r5,r5,(PPC_FEATURE_HAS_ALTIVEC >> 16)
-+
- clrrdi r10,r10,4
-+ beq L(has_no_vec)
- clrrdi r9,r9,4
--
-+ mr r5,r10 /* Capture *v_regs value in r5. */
-+
- stvx v0,0,r10
- stvx v1,0,r9
- addi r10,r10,32
-@@ -329,8 +330,8 @@
- addi r9,r9,32
-
- stvx v18,0,r10
-- stvx v11,0,r9
-- addi r19,r10,32
-+ stvx v19,0,r9
-+ addi r10,r10,32
- addi r9,r9,32
-
- stvx v20,0,r10
-@@ -363,11 +364,6 @@
- addi r10,r10,32
- addi r9,r9,32
-
-- stvx v10,0,r10
-- stvx v11,0,r9
-- addi r10,r10,32
-- addi r9,r9,32
--
- mfvscr v0
- mfspr r0,VRSAVE
- stvx v0,0,r10
-@@ -378,7 +374,7 @@
- Store either a NULL or a quadword aligned pointer to the Vector register
- array into *v_regs.
- */
-- std r10,(SIGCONTEXT_V_REGS_PTR)(r3)
-+ std r5,(SIGCONTEXT_V_REGS_PTR)(r3)
-
- addi r5,r3,UCONTEXT_SIGMASK
- li r4,0
-diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
---- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S 2004-05-28 16:19:18.000000000 -0500
-+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S 2004-06-09 11:28:37.000000000 -0500
-@@ -293,8 +293,8 @@
- addi r9,r9,32
-
- lvx v18,0,r10
-- lvx v11,0,r9
-- addi r19,r10,32
-+ lvx v19,0,r9
-+ addi r10,r10,32
- addi r9,r9,32
-
- lvx v20,0,r10
-diff -urN libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
---- libc23-cvstip-20040607/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S 2004-05-28 16:19:18.000000000 -0500
-+++ libc23/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S 2004-06-14 19:28:05.164035488 -0500
-@@ -391,20 +391,22 @@
- stfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r3)
-
- ld r8,.LC__dl_hwcap@toc(r2)
-- li r10,0
- #ifdef SHARED
- /* Load _rtld-global._dl_hwcap. */
- ld r8,RTLD_GLOBAL_RO_DL_HWCAP_OFFSET(r8)
- #else
- ld r8,0(r8) /* Load extern _dl_hwcap. */
- #endif
-- andis. r8,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16)
-- beq L(has_no_vec)
--
- la r10,(SIGCONTEXT_V_RESERVE+8)(r3)
- la r9,(SIGCONTEXT_V_RESERVE+24)(r3)
-+
-+ andis. r8,r8,(PPC_FEATURE_HAS_ALTIVEC >> 16)
-+
- clrrdi r10,r10,4
-+ beq L(has_no_vec)
-+
- clrrdi r9,r9,4
-+ mr r8,r10 /* Capture *v_regs value in r5. */
-
- stvx v0,0,r10
- stvx v1,0,r9
-@@ -452,8 +454,8 @@
- addi r9,r9,32
-
- stvx v18,0,r10
-- stvx v11,0,r9
-- addi r19,r10,32
-+ stvx v19,0,r9
-+ addi r10,r10,32
- addi r9,r9,32
-
- stvx v20,0,r10
-@@ -486,11 +488,6 @@
- addi r10,r10,32
- addi r9,r9,32
-
-- stvx v10,0,r10
-- stvx v11,0,r9
-- addi r10,r10,32
-- addi r9,r9,32
--
- mfvscr v0
- mfspr r0,VRSAVE
- stvx v0,0,r10
-@@ -501,7 +498,7 @@
- Store either a NULL or a quadword aligned pointer to the Vector register
- array into *v_regs.
- */
-- std r10,(SIGCONTEXT_V_REGS_PTR)(r3)
-+ std r8,(SIGCONTEXT_V_REGS_PTR)(r3)
-
- mr r31,r4
- addi r5,r3,UCONTEXT_SIGMASK
-@@ -596,8 +593,8 @@
- addi r9,r9,32
-
- lvx v18,0,r10
-- lvx v11,0,r9
-- addi r19,r10,32
-+ lvx v19,0,r9
-+ addi r10,r10,32
- addi r9,r9,32
-
- lvx v20,0,r10
-
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-nptl-pthread.h-g++-fix.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-nptl-pthread.h-g++-fix.patch
deleted file mode 100644
index 755169014248..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-nptl-pthread.h-g++-fix.patch
+++ /dev/null
@@ -1,96 +0,0 @@
---- glibc-2.3.3.old/nptl/sysdeps/pthread/pthread.h 2004-09-21 19:52:49.003553536 +0000
-+++ glibc-2.3.3/nptl/sysdeps/pthread/pthread.h 2004-09-21 19:55:01.582398488 +0000
-@@ -27,6 +27,7 @@
- #include <signal.h>
- #include <bits/pthreadtypes.h>
- #include <bits/setjmp.h>
-+#include <bits/wordsize.h>
-
-
- /* Detach state. */
-@@ -63,17 +64,26 @@
- #define PTHREAD_MUTEX_INITIALIZER \
- { }
- #ifdef __USE_GNU
--# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
-- { .__data = { .__kind = PTHREAD_MUTEX_RECURSIVE_NP } }
--# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
-- { .__data = { .__kind = PTHREAD_MUTEX_ERRORCHECK_NP } }
--# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
-- { .__data = { .__kind = PTHREAD_MUTEX_ADAPTIVE_NP } }
-+# if __WORDSIZE == 64
-+# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
-+ { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
-+# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
-+ { { 0, 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
-+# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
-+ { { 0, 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
-+# else
-+# define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP \
-+ { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP } }
-+# define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP \
-+ { { 0, 0, 0, PTHREAD_MUTEX_ERRORCHECK_NP } }
-+# define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP \
-+ { { 0, 0, 0, PTHREAD_MUTEX_ADAPTIVE_NP } }
-+# endif
- #endif
-
-
- /* Read-write lock types. */
--#ifdef __USE_UNIX98
-+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
- enum
- {
- PTHREAD_RWLOCK_PREFER_READER_NP,
-@@ -81,15 +91,21 @@
- PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
- PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
- };
--#endif /* Unix98 */
-
- /* Read-write lock initializers. */
--#define PTHREAD_RWLOCK_INITIALIZER \
-+# define PTHREAD_RWLOCK_INITIALIZER \
- { }
--#ifdef __USE_GNU
--# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
-- { .__data = { .__flags = PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
--#endif
-+# ifdef __USE_GNU
-+# if __WORDSIZE == 64
-+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
-+ { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
-+ PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
-+# else
-+# define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP \
-+ { { 0, 0, 0, 0, 0, 0, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP } }
-+# endif
-+# endif
-+#endif /* Unix98 or XOpen2K */
-
-
- /* Scheduler inheritance. */
-@@ -390,9 +406,12 @@
- /* Guarantee that the initialization function INIT_ROUTINE will be called
- only once, even if pthread_once is executed several times with the
- same ONCE_CONTROL argument. ONCE_CONTROL must point to a static or
-- extern variable initialized to PTHREAD_ONCE_INIT. */
-+ extern variable initialized to PTHREAD_ONCE_INIT.
-+
-+ The initialization functions might throw exception which is why
-+ this function is not marked with __THROW. */
- extern int pthread_once (pthread_once_t *__once_control,
-- void (*__init_routine) (void)) __THROW;
-+ void (*__init_routine) (void));
-
-
- /* Functions for handling cancellation.
-@@ -699,7 +718,7 @@
- #endif
-
-
--#ifdef __USE_UNIX98
-+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
- /* Functions for handling read-write locks. */
-
- /* Initialize read-write lock RWLOCK using attributes ATTR, or use
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-res_init.patch b/sys-libs/glibc/files/2.3.4/glibc-2.3.4-res_init.patch
deleted file mode 100644
index fa907de4d3b7..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4-res_init.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-2004-08-12 H.J. Lu <hongjiu.lu@intel.com>
-
- * resolv/res_libc.c: Move definition of __res_maybe_init ...
- * resolv/res_init.c: ... here.
-
-2004-08-11 Andreas Schwab <schwab@suse.de>
-
- * resolv/res_libc.c: Move definition of __res_initstamp ...
- * resolv/res_init.c: ... here.
-
---- resolv/res_init.c.res_init 2004-08-11 14:23:06.000000000 -0700
-+++ resolv/res_init.c 2004-08-12 16:29:09.000000000 -0700
-@@ -106,6 +106,10 @@ static u_int32_t net_mask __P((struct in
- # define isascii(c) (!(c & 0200))
- #endif
-
-+#ifdef _LIBC
-+unsigned long long int __res_initstamp attribute_hidden;
-+#endif
-+
- /*
- * Resolver state default settings.
- */
-@@ -162,7 +166,6 @@ __res_vinit(res_state statp, int preinit
- int dots;
- #endif
- #ifdef _LIBC
-- extern unsigned long long int __res_initstamp attribute_hidden;
- statp->_u._ext.initstamp = __res_initstamp;
- #endif
-
-@@ -574,6 +577,39 @@ libc_hidden_def (__res_nclose)
- #endif
-
- #ifdef _LIBC
-+/* Initialize resp if RES_INIT is not yet set or if res_init in some other
-+ thread requested re-initializing. */
-+int
-+__res_maybe_init (res_state resp, int preinit)
-+{
-+ if (resp->options & RES_INIT) {
-+ if (__res_initstamp != resp->_u._ext.initstamp) {
-+ if (resp->nscount > 0) {
-+ __res_nclose (resp);
-+ for (int ns = 0; ns < MAXNS; ns++) {
-+ free (resp->_u._ext.nsaddrs[ns]);
-+ resp->_u._ext.nsaddrs[ns] = NULL;
-+ }
-+ return __res_vinit (resp, 1);
-+ }
-+ }
-+ return 0;
-+ } else if (preinit) {
-+ if (!resp->retrans)
-+ resp->retrans = RES_TIMEOUT;
-+ if (!resp->retry)
-+ resp->retry = 4;
-+ resp->options = RES_DEFAULT;
-+ if (!resp->id)
-+ resp->id = res_randomid ();
-+ return __res_vinit (resp, 1);
-+ } else
-+ return __res_ninit (resp);
-+}
-+libc_hidden_def (__res_maybe_init)
-+#endif
-+
-+#ifdef _LIBC
- # ifdef _LIBC_REENTRANT
- /* This is called when a thread is exiting to free resources held in _res. */
- static void __attribute__ ((section ("__libc_thread_freeres_fn")))
---- resolv/res_libc.c.res_init 2004-08-11 14:23:06.000000000 -0700
-+++ resolv/res_libc.c 2004-08-12 16:28:00.000000000 -0700
-@@ -28,7 +28,7 @@
- out) since res_init() should go into libc.so but the rest of that
- file should not. */
-
--unsigned long long int __res_initstamp attribute_hidden;
-+extern unsigned long long int __res_initstamp attribute_hidden;
- /* We have atomic increment operations on 64-bit platforms. */
- #if __WORDSIZE == 64
- # define atomicinclock(lock) (void) 0
-@@ -94,37 +94,6 @@ res_init(void) {
-
- return (__res_vinit(&_res, 1));
- }
--
--/* Initialize resp if RES_INIT is not yet set or if res_init in some other
-- thread requested re-initializing. */
--int
--__res_maybe_init (res_state resp, int preinit)
--{
-- if (resp->options & RES_INIT) {
-- if (__res_initstamp != resp->_u._ext.initstamp) {
-- if (resp->nscount > 0) {
-- __res_nclose (resp);
-- for (int ns = 0; ns < MAXNS; ns++) {
-- free (resp->_u._ext.nsaddrs[ns]);
-- resp->_u._ext.nsaddrs[ns] = NULL;
-- }
-- return __res_vinit (resp, 1);
-- }
-- }
-- return 0;
-- } else if (preinit) {
-- if (!resp->retrans)
-- resp->retrans = RES_TIMEOUT;
-- if (!resp->retry)
-- resp->retry = 4;
-- resp->options = RES_DEFAULT;
-- if (!resp->id)
-- resp->id = res_randomid ();
-- return __res_vinit (resp, 1);
-- } else
-- return __res_ninit (resp);
--}
--libc_hidden_def (__res_maybe_init)
-
- /* This needs to be after the use of _res in res_init, above. */
- #undef _res
diff --git a/sys-libs/glibc/files/2.3.4/glibc-2.3.4.20040808-i386-got-fix.diff b/sys-libs/glibc/files/2.3.4/glibc-2.3.4.20040808-i386-got-fix.diff
deleted file mode 100644
index ea9a99ebe21a..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-2.3.4.20040808-i386-got-fix.diff
+++ /dev/null
@@ -1,129 +0,0 @@
---- sysdeps/i386/elf/start.S.orig 1969-12-31 19:00:00.000000000 -0500
-+++ sysdeps/i386/elf/start.S 2004-08-08 10:07:01.718652784 -0400
-@@ -0,0 +1,126 @@
-+/* Startup code compliant to the ELF i386 ABI.
-+ Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004
-+ Free Software 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. */
-+
-+/* This is the canonical entry point, usually the first thing in the text
-+ segment. The SVR4/i386 ABI (pages 3-31, 3-32) says that when the entry
-+ point runs, most registers' values are unspecified, except for:
-+
-+ %edx Contains a function pointer to be registered with `atexit'.
-+ This is how the dynamic linker arranges to have DT_FINI
-+ functions called for shared libraries that have been loaded
-+ before this code runs.
-+
-+ %esp The stack contains the arguments and environment:
-+ 0(%esp) argc
-+ 4(%esp) argv[0]
-+ ...
-+ (4*argc)(%esp) NULL
-+ (4*(argc+1))(%esp) envp[0]
-+ ...
-+ NULL
-+*/
-+
-+#include "bp-sym.h"
-+
-+ .text
-+ .globl _start
-+ .type _start,@function
-+_start:
-+ /* Clear the frame pointer. The ABI suggests this be done, to mark
-+ the outermost frame obviously. */
-+ xorl %ebp, %ebp
-+
-+ /* Extract the arguments as encoded on the stack and set up
-+ the arguments for `main': argc, argv. envp will be determined
-+ later in __libc_start_main. */
-+ popl %esi /* Pop the argument count. */
-+ movl %esp, %ecx /* argv starts just at the current stack top.*/
-+
-+ /* Before pushing the arguments align the stack to a 16-byte
-+ (SSE needs 16-byte alignment) boundary to avoid penalties from
-+ misaligned accesses. Thanks to Edward Seidl <seidl@janed.com>
-+ for pointing this out. */
-+ andl $0xfffffff0, %esp
-+ pushl %eax /* Push garbage because we allocate
-+ 28 more bytes. */
-+
-+ /* Provide the highest stack address to the user code (for stacks
-+ which grow downwards). */
-+ pushl %esp
-+
-+ pushl %edx /* Push address of the shared library
-+ termination function. */
-+
-+#ifdef SHARED
-+ /* Load PIC register. */
-+ call 1f
-+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
-+
-+ /* Push address of our own entry points to .fini and .init. */
-+ leal __libc_csu_fini@GOTOFF(%ebx), %eax
-+ pushl %eax
-+ leal __libc_csu_init@GOTOFF(%ebx), %eax
-+ pushl %eax
-+
-+ pushl %ecx /* Push second argument: argv. */
-+ pushl %esi /* Push first argument: argc. */
-+
-+ pushl BP_SYM (main)@GOT(%ebx)
-+
-+ /* Call the user's main function, and exit with its value.
-+ But let the libc call main. */
-+ call BP_SYM (__libc_start_main)@PLT
-+#else
-+ /* Push address of our own entry points to .fini and .init. */
-+ pushl $__libc_csu_fini
-+ pushl $__libc_csu_init
-+
-+ pushl %ecx /* Push second argument: argv. */
-+ pushl %esi /* Push first argument: argc. */
-+
-+ pushl $BP_SYM (main)
-+
-+ /* Call the user's main function, and exit with its value.
-+ But let the libc call main. */
-+ call BP_SYM (__libc_start_main)
-+#endif
-+
-+ hlt /* Crash if somehow `exit' does return. */
-+
-+#ifdef SHARED
-+1: movl (%esp), %ebx
-+ ret
-+#endif
-+
-+/* To fulfill the System V/i386 ABI we need this symbol. Yuck, it's so
-+ meaningless since we don't support machines < 80386. */
-+ .section .rodata
-+ .globl _fp_hw
-+_fp_hw: .long 3
-+ .size _fp_hw, 4
-+ .type _fp_hw,@object
-+
-+/* Define a symbol for the first piece of initialized data. */
-+ .data
-+ .globl __data_start
-+__data_start:
-+ .long 0
-+ .weak data_start
-+ data_start = __data_start
diff --git a/sys-libs/glibc/files/2.3.4/glibc-gentoo-libdir.patch b/sys-libs/glibc/files/2.3.4/glibc-gentoo-libdir.patch
deleted file mode 100644
index 01f414bb1255..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-gentoo-libdir.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff -Nru glibc-2.3.3.old/sysdeps/unix/sysv/linux/configure glibc-2.3.3/sysdeps/unix/sysv/linux/configure
---- glibc-2.3.3.old/sysdeps/unix/sysv/linux/configure 2004-09-06 12:33:39.320387104 -0400
-+++ glibc-2.3.3/sysdeps/unix/sysv/linux/configure 2004-09-06 12:34:42.575770824 -0400
-@@ -224,29 +224,13 @@
- # in /lib and /etc.
- case "$prefix" in
- /usr | /usr/)
-- # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
-- case $machine in
-- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
-- mips/mips64/n64/* )
-- libc_cv_slibdir="/lib64"
-+ libc_cv_slibdir="/@GENTOO_LIBDIR@"
- if test "$libdir" = '${exec_prefix}/lib'; then
-- libdir='${exec_prefix}/lib64';
-+ libdir='${exec_prefix}/@GENTOO_LIBDIR@'
- # Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
- fi
-- ;;
-- mips/mips64/n32/* )
-- libc_cv_slibdir="/lib32"
-- if test "$libdir" = '${exec_prefix}/lib'; then
-- libdir='${exec_prefix}/lib32';
-- # Locale data can be shared between 32bit and 64bit libraries
-- libc_cv_localedir='${exec_prefix}/lib/locale'
-- fi
-- ;;
-- *)
-- libc_cv_slibdir="/lib"
-- ;;
-- esac
-+
- # Allow the user to override the path with --sysconfdir
- if test $sysconfdir = '${prefix}/etc'; then
- libc_cv_sysconfdir=/etc
diff --git a/sys-libs/glibc/files/2.3.4/glibc-sec-hotfix-20040916.patch b/sys-libs/glibc/files/2.3.4/glibc-sec-hotfix-20040916.patch
deleted file mode 100644
index 3858a0f9c9d1..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc-sec-hotfix-20040916.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-diff -Nru glibc-2.3.3.old/elf/rtld.c glibc-2.3.3/elf/rtld.c
---- glibc-2.3.3.old/elf/rtld.c 2004-09-16 15:02:16.000000000 -0400
-+++ glibc-2.3.3/elf/rtld.c 2004-09-16 15:04:58.000000000 -0400
-@@ -2041,6 +2041,30 @@
- GLRO(dl_profile_output)
- = &"/var/tmp\0/var/profile"[INTUSE(__libc_enable_secure) ? 9 : 0];
-
-+ /* Extra security for SUID binaries. Remove all dangerous environment
-+ variables. */
-+ if (__builtin_expect (INTUSE(__libc_enable_secure), 0))
-+ {
-+ static const char unsecure_envvars[] =
-+#ifdef EXTRA_UNSECURE_ENVVARS
-+ EXTRA_UNSECURE_ENVVARS
-+#endif
-+ UNSECURE_ENVVARS;
-+ const char *nextp;
-+
-+ nextp = unsecure_envvars;
-+ do
-+ {
-+ unsetenv (nextp);
-+ /* We could use rawmemchr but this need not be fast. */
-+ nextp = (char *) (strchr) (nextp, '\0') + 1;
-+ }
-+ while (*nextp != '\0');
-+
-+ if (__access ("/etc/suid-debug", F_OK) != 0)
-+ unsetenv ("MALLOC_CHECK_");
-+ }
-+
- while ((envline = _dl_next_ld_env_entry (&runp)) != NULL)
- {
- size_t len = 0;
-@@ -2188,33 +2212,10 @@
- /* The caller wants this information. */
- *modep = mode;
-
-- /* Extra security for SUID binaries. Remove all dangerous environment
-- variables. */
-- if (__builtin_expect (INTUSE(__libc_enable_secure), 0))
-- {
-- static const char unsecure_envvars[] =
--#ifdef EXTRA_UNSECURE_ENVVARS
-- EXTRA_UNSECURE_ENVVARS
--#endif
-- UNSECURE_ENVVARS;
-- const char *nextp;
--
-- nextp = unsecure_envvars;
-- do
-- {
-- unsetenv (nextp);
-- /* We could use rawmemchr but this need not be fast. */
-- nextp = (char *) (strchr) (nextp, '\0') + 1;
-- }
-- while (*nextp != '\0');
--
-- if (__access ("/etc/suid-debug", F_OK) != 0)
-- unsetenv ("MALLOC_CHECK_");
-- }
- /* If we have to run the dynamic linker in debugging mode and the
- LD_DEBUG_OUTPUT environment variable is given, we write the debug
- messages to this file. */
-- else if (any_debug && debug_output != NULL)
-+ if (any_debug && debug_output != NULL)
- {
- #ifdef O_NOFOLLOW
- const int flags = O_WRONLY | O_APPEND | O_CREAT | O_NOFOLLOW;
-diff -Nru glibc-2.3.3.old/malloc/malloc.c glibc-2.3.3/malloc/malloc.c
---- glibc-2.3.3.old/malloc/malloc.c 2004-09-16 15:03:22.000000000 -0400
-+++ glibc-2.3.3/malloc/malloc.c 2004-09-16 15:04:58.000000000 -0400
-@@ -321,6 +321,10 @@
- #define assert(x) ((void)0)
- #endif
-
-+#include <abort-instr.h>
-+#ifndef ABORT_INSTRUCTION
-+#define ABORT_INSTRUCTION
-+#endif
-
- /*
- INTERNAL_SIZE_T is the word-size used for internal bookkeeping
-diff -Nru glibc-2.3.3.old/sysdeps/generic/unsecvars.h glibc-2.3.3/sysdeps/generic/unsecvars.h
---- glibc-2.3.3.old/sysdeps/generic/unsecvars.h 2004-09-16 15:03:11.000000000 -0400
-+++ glibc-2.3.3/sysdeps/generic/unsecvars.h 2004-09-16 15:04:58.000000000 -0400
-@@ -3,6 +3,8 @@
- with a '\0' explicitly. */
- #define UNSECURE_ENVVARS \
- "LD_PRELOAD\0" \
-+ "LD_DEBUG\0" \
-+ "LD_TRACE_PRELINKING\0" \
- "LD_LIBRARY_PATH\0" \
- "LD_ORIGIN_PATH\0" \
- "LD_DEBUG_OUTPUT\0" \
diff --git a/sys-libs/glibc/files/2.3.4/glibc234-alpha-xstat.patch b/sys-libs/glibc/files/2.3.4/glibc234-alpha-xstat.patch
deleted file mode 100644
index b68f57e4688c..000000000000
--- a/sys-libs/glibc/files/2.3.4/glibc234-alpha-xstat.patch
+++ /dev/null
@@ -1,231 +0,0 @@
-diff -u -p -r1.83 kernel-features.h
---- sysdeps/unix/sysv/linux/kernel-features.h 26 Jan 2005 20:01:10 -0000 1.83
-+++ sysdeps/unix/sysv/linux/kernel-features.h 18 Feb 2005 06:21:10 -0000
-@@ -413,6 +413,11 @@
- # define __ASSUME_GETDENTS32_D_TYPE 1
- #endif
-
-+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */
-+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__
-+# define __ASSUME_STAT64_SYSCALL 1
-+#endif
-+
- /* Starting with version 2.5.3, the initial location returned by `brk'
- after exec is always rounded up to the next page. */
- #if __LINUX_KERNEL_VERSION >= 132355
-diff -u -p -r1.1 fxstat.c
---- sysdeps/unix/sysv/linux/alpha/fxstat.c 11 Mar 2004 02:58:44 -0000 1.1
-+++ sysdeps/unix/sysv/linux/alpha/fxstat.c 18 Feb 2005 06:21:10 -0000
-@@ -1,5 +1,5 @@
- /* fxstat using old-style Unix stat system call.
-- Copyright (C) 2004 Free Software Foundation, Inc.
-+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -35,27 +35,39 @@ int
- __fxstat (int vers, int fd, struct stat *buf)
- {
- INTERNAL_SYSCALL_DECL (err);
-- int result, errno_out;
-+ int result;
- struct kernel_stat kbuf;
-
-+#if __ASSUME_STAT64_SYSCALL > 0
-+ if (vers == _STAT_VER_KERNEL64)
-+ {
-+ result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
-+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-+ return result;
-+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
-+ return -1;
-+ }
-+#elif defined __NR_fstat64
- if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
- {
-+ int errno_out;
- result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return result;
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
- if (errno_out != ENOSYS)
-- goto fail;
-+ {
-+ __set_errno (errno_out);
-+ return -1;
-+ }
- __libc_missing_axp_stat64 = 1;
- }
-+#endif
-
- result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return __xstat_conv (vers, &kbuf, buf);
-- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
--
-- fail:
-- __set_errno (errno_out);
-+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
- return -1;
- }
- hidden_def (__fxstat)
-diff -u -p -r1.1 lxstat.c
---- sysdeps/unix/sysv/linux/alpha/lxstat.c 11 Mar 2004 02:58:44 -0000 1.1
-+++ sysdeps/unix/sysv/linux/alpha/lxstat.c 18 Feb 2005 06:21:10 -0000
-@@ -1,5 +1,5 @@
- /* lxstat using old-style Unix stat system call.
-- Copyright (C) 2004 Free Software Foundation, Inc.
-+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -35,27 +35,39 @@ int
- __lxstat (int vers, const char *name, struct stat *buf)
- {
- INTERNAL_SYSCALL_DECL (err);
-- int result, errno_out;
-+ int result;
- struct kernel_stat kbuf;
-
-+#if __ASSUME_STAT64_SYSCALL > 0
-+ if (vers == _STAT_VER_KERNEL64)
-+ {
-+ result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
-+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-+ return result;
-+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
-+ return -1;
-+ }
-+#elif defined __NR_lstat64
- if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
- {
-+ int errno_out;
- result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return result;
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
- if (errno_out != ENOSYS)
-- goto fail;
-+ {
-+ __set_errno (errno_out);
-+ return -1;
-+ }
- __libc_missing_axp_stat64 = 1;
- }
-+#endif
-
- result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return __xstat_conv (vers, &kbuf, buf);
-- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
--
-- fail:
-- __set_errno (errno_out);
-+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
- return -1;
- }
- hidden_def (__lxstat)
-diff -u -p -r1.1 xstat.c
---- sysdeps/unix/sysv/linux/alpha/xstat.c 11 Mar 2004 02:58:44 -0000 1.1
-+++ sysdeps/unix/sysv/linux/alpha/xstat.c 18 Feb 2005 06:21:10 -0000
-@@ -1,5 +1,5 @@
- /* xstat using old-style Unix stat system call.
-- Copyright (C) 2004 Free Software Foundation, Inc.
-+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -35,27 +35,39 @@ int
- __xstat (int vers, const char *name, struct stat *buf)
- {
- INTERNAL_SYSCALL_DECL (err);
-- int result, errno_out;
-+ int result;
- struct kernel_stat kbuf;
-
-+#if __ASSUME_STAT64_SYSCALL > 0
-+ if (vers == _STAT_VER_KERNEL64)
-+ {
-+ result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
-+ if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-+ return result;
-+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
-+ return -1;
-+ }
-+#elif defined __NR_stat64
- if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
- {
-+ int errno_out;
- result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return result;
- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
- if (errno_out != ENOSYS)
-- goto fail;
-+ {
-+ __set_errno (errno_out);
-+ return -1;
-+ }
- __libc_missing_axp_stat64 = 1;
- }
-+#endif
-
- result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf);
- if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
- return __xstat_conv (vers, &kbuf, buf);
-- errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
--
-- fail:
-- __set_errno (errno_out);
-+ __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
- return -1;
- }
- hidden_def (__xstat)
-diff -u -p -r1.6 xstatconv.c
---- sysdeps/unix/sysv/linux/alpha/xstatconv.c 11 Mar 2004 02:58:44 -0000 1.6
-+++ sysdeps/unix/sysv/linux/alpha/xstatconv.c 26 Feb 2005 13:58:07 -0000
-@@ -1,5 +1,5 @@
- /* Convert between the kernel's `struct stat' format, and libc's.
-- Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
-+ Copyright (C) 1997, 2003, 2004, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -22,9 +22,14 @@
- #include <sys/stat.h>
- #include <kernel_stat.h>
- #include <xstatconv.h>
-+#include <sys/syscall.h>
-
-
-+#ifdef __NR_stat64
-+# if __ASSUME_STAT64_SYSCALL == 0
- int __libc_missing_axp_stat64;
-+# endif
-+#endif
-
- int
- __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
-diff -u -p -r1.1 xstatconv.h
---- sysdeps/unix/sysv/linux/alpha/xstatconv.h 11 Mar 2004 02:58:44 -0000 1.1
-+++ sysdeps/unix/sysv/linux/alpha/xstatconv.h 26 Feb 2005 13:58:07 -0000
-@@ -1,5 +1,5 @@
- /* Convert between the kernel's `struct stat' format, and libc's.
-- Copyright (C) 2004 Free Software Foundation, Inc.
-+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
-@@ -18,7 +18,12 @@
- 02111-1307 USA. */
-
- #include "kernel-features.h"
-+#include <sys/syscall.h>
-
-+#ifdef __NR_stat64
-+# if __ASSUME_STAT64_SYSCALL == 0
- extern int __libc_missing_axp_stat64 attribute_hidden;
-+# endif
-+#endif
- extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
- attribute_hidden;
diff --git a/sys-libs/glibc/files/2.3.4/host.conf b/sys-libs/glibc/files/2.3.4/host.conf
deleted file mode 100644
index b37a26b7ca06..000000000000
--- a/sys-libs/glibc/files/2.3.4/host.conf
+++ /dev/null
@@ -1,33 +0,0 @@
-# /etc/host.conf:
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.4/host.conf,v 1.2 2004/11/24 05:31:58 vapier Exp $
-
-# The file /etc/host.conf contains configuration information specific to
-# the resolver library. It should contain one configuration keyword per
-# line, followed by appropriate configuration information. The keywords
-# recognized are order, trim, mdns, multi, nospoof, spoof, and reorder.
-
-
-
-# This keyword specifies how host lookups are to be performed. It
-# should be followed by one or more lookup methods, separated by
-# commas. Valid methods are bind, hosts, and nis.
-#
-order hosts, bind
-
-
-# Valid values are on and off. If set to on, the resolv+ library treats
-# the .local top level domain as link-local domain and sends multicast
-# DNS requests to the multicast address 224.0.0.251 port 5353 instead
-# of normal DNS requests. If you already use the .local domain in your
-# nameserver configuration you will have to switch this option off.
-#
-mdns off
-
-
-# Valid values are on and off. If set to on, the resolv+ library
-# will return all valid addresses for a host that appears in the
-# /etc/hosts file, instead of only the first. This is off by
-# default, as it may cause a substantial performance loss at sites
-# with large hosts files.
-#
-multi off
diff --git a/sys-libs/glibc/files/2.3.4/hppa-no-pie.patch b/sys-libs/glibc/files/2.3.4/hppa-no-pie.patch
deleted file mode 100644
index a91072c25ba4..000000000000
--- a/sys-libs/glibc/files/2.3.4/hppa-no-pie.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-PIE support is broken on PARISC in this glibc so make sure we dont force
-building nscd as a PIE or bad things happen.
-
---- nscd/Makefile
-+++ nscd/Makefile
-@@ -35,7 +35,7 @@
- ifeq ($(have-thread-library),yes)
-
- others := nscd_nischeck
--ifneq (yesyes,$(have-fpie)$(build-shared))
-+ifneq (yes,$(build-shared))
- others += nscd
- endif
- install-sbin := nscd nscd_nischeck
-@@ -60,27 +60,10 @@
- CFLAGS-nscd_getgr_r.c = -fexceptions
- CFLAGS-nscd_gethst_r.c = -fexceptions
-
--ifeq (yesyes,$(have-fpie)$(build-shared))
--CFLAGS-nscd.c = -fpie
--CFLAGS-connections.c = -fpie
--CFLAGS-pwdcache.c = -fpie
--CFLAGS-getpwnam_r.c = -fpie
--CFLAGS-getpwuid_r.c = -fpie
--CFLAGS-grpcache.c = -fpie
--CFLAGS-getgrnam_r.c = -fpie
--CFLAGS-getgrgid_r.c = -fpie
--CFLAGS-hstcache.c = -fpie
--CFLAGS-gethstbyad_r.c = -fpie
--CFLAGS-gethstbynm2_r.c = -fpie
--CFLAGS-dbg_log.c = -fpie
--CFLAGS-nscd_conf.c = -fpie
--CFLAGS-nscd_stat.c = -fpie
--CFLAGS-cache.c = -fpie
--CFLAGS-xmalloc.c = -fpie
--CFLAGS-xstrdup.c = -fpie
-+ifeq (yes,$(build-shared))
-
- $(objpfx)nscd: $(addprefix $(objpfx),$(nscd-modules:=.o))
-- $(LINK.o) -pie -Wl,-O1 \
-+ $(LINK.o) -Wl,-O1 \
- $(sysdep-LDFLAGS) $(config-LDFLAGS) \
- $(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
- $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
diff --git a/sys-libs/glibc/files/2.3.5/glibc-2.3.5-frandom-detect.patch b/sys-libs/glibc/files/2.3.5/glibc-2.3.5-frandom-detect.patch
deleted file mode 100644
index 3b1a71a5ef60..000000000000
--- a/sys-libs/glibc/files/2.3.5/glibc-2.3.5-frandom-detect.patch
+++ /dev/null
@@ -1,102 +0,0 @@
---- config.h.in
-+++ config.h.in
-@@ -215,4 +215,7 @@
- #undef HAVE_LIBIDN
-
-+/* Defined if economical random device is available. */
-+#undef HAVE_DEV_ERANDOM
-+
- /* Define if inlined system calls are available. */
- #undef HAVE_INLINED_SYSCALLS
---- configure.in
-+++ configure.in
-@@ -264,4 +264,11 @@
- AC_SUBST(all_warnings)
-
-+dnl See whether the user wants to disable checking for /dev/erandom
-+AC_ARG_ENABLE([dev-erandom],
-+ AC_HELP_STRING([--disable-dev-erandom],
-+ [disable testing for /dev/erandom]),
-+ [try_dev_erandom=$enableval],
-+ [try_dev_erandom=yes])
-+
- AC_CANONICAL_HOST
-
-@@ -1974,4 +1981,19 @@
- AC_SUBST(sizeof_long_double)
-
-+dnl check whether we have an economical random device
-+if test "$try_dev_erandom" = yes ; then
-+ AC_CACHE_CHECK(for economical random device, ac_cv_have_dev_random,
-+ [if test -r "/dev/erandom" ; then
-+ ac_cv_have_dev_erandom=yes; else ac_cv_have_dev_erandom=no; fi])
-+ if test "$ac_cv_have_dev_erandom" = yes; then
-+ AC_DEFINE(HAVE_DEV_ERANDOM,1,
-+ [defined if the system supports an economical random device])
-+ fi
-+else
-+ AC_MSG_CHECKING(for economical random device)
-+ ac_cv_have_dev_erandom=no
-+ AC_MSG_RESULT(has been disabled)
-+fi
-+
- ### End of automated tests.
- ### Now run sysdeps configure fragments.
---- configure
-+++ configure
-@@ -884,6 +884,7 @@
- --enable-kernel=VERSION compile for compatibility with kernel not older than
- VERSION
- --enable-all-warnings enable all useful warnings gcc can issue
-+ --disable-dev-erandom disable testing for /dev/erandom
-
- Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
-@@ -1697,6 +1698,14 @@
- fi;
-
-
-+# Check whether --enable-dev-erandom or --disable-dev-erandom was given.
-+if test "${enable_dev_erandom+set}" = set; then
-+ enableval="$enable_dev_erandom"
-+ try_dev_erandom=$enableval
-+else
-+ try_dev_erandom=yes
-+fi;
-+
- # Make sure we can run config.sub.
- $ac_config_sub sun4 >/dev/null 2>&1 ||
- { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-@@ -7449,6 +7458,32 @@
- sizeof_long_double=$ac_cv_sizeof_long_double
-
-
-+if test "$try_dev_erandom" = yes ; then
-+ echo "$as_me:$LINENO: checking for economical random device" >&5
-+echo $ECHO_N "checking for economical random device... $ECHO_C" >&6
-+if test "${ac_cv_have_dev_random+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ if test -r "/dev/erandom" ; then
-+ ac_cv_have_dev_erandom=yes; else ac_cv_have_dev_erandom=no; fi
-+fi
-+echo "$as_me:$LINENO: result: $ac_cv_have_dev_random" >&5
-+echo "${ECHO_T}$ac_cv_have_dev_random" >&6
-+ if test "$ac_cv_have_dev_erandom" = yes; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define HAVE_DEV_ERANDOM 1
-+_ACEOF
-+
-+ fi
-+else
-+ echo "$as_me:$LINENO: checking for economical random device" >&5
-+echo $ECHO_N "checking for economical random device... $ECHO_C" >&6
-+ ac_cv_have_dev_erandom=no
-+ echo "$as_me:$LINENO: result: has been disabled" >&5
-+echo "${ECHO_T}has been disabled" >&6
-+fi
-+
- ### End of automated tests.
- ### Now run sysdeps configure fragments.
-
diff --git a/sys-libs/glibc/files/2.3.5/glibc-2.3.5-propolice-guard-functions.patch b/sys-libs/glibc/files/2.3.5/glibc-2.3.5-propolice-guard-functions.patch
deleted file mode 100644
index 3a75cf1298af..000000000000
--- a/sys-libs/glibc/files/2.3.5/glibc-2.3.5-propolice-guard-functions.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-The configure check for SSP is taken from glibc HEAD.
-
-diff -ur glibc-2.3.5-orig/config.make.in glibc-2.3.5/config.make.in
---- glibc-2.3.5-orig/config.make.in 2006-01-18 00:31:17.000000000 -0500
-+++ glibc-2.3.5/config.make.in 2006-01-18 00:33:25.000000000 -0500
-@@ -61,6 +61,7 @@
- have-selinux = @have_selinux@
- have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
- fno-unit-at-a-time = @fno_unit_at_a_time@
-+have-ssp = @libc_cv_ssp@
- bind-now = @bindnow@
-
- static-libgcc = @libc_cv_gcc_static_libgcc@
-diff -ur glibc-2.3.5-orig/configure glibc-2.3.5/configure
---- glibc-2.3.5-orig/configure 2006-01-18 00:31:17.000000000 -0500
-+++ glibc-2.3.5/configure 2006-01-18 00:35:54.000000000 -0500
-@@ -313,7 +313,7 @@
- # include <unistd.h>
- #endif"
-
--ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
-+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
- ac_subst_files=''
-
- # Initialize some variables set by options.
-@@ -5785,6 +5785,33 @@
- fi
-
-
-+echo "$as_me:$LINENO: checking for -fstack-protector" >&5
-+echo $ECHO_N "checking for -fstack-protector... $ECHO_C" >&6
-+if test "${libc_cv_ssp+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat > conftest.c <<EOF
-+int foo;
-+main () { return 0;}
-+EOF
-+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
-+ -o conftest conftest.c 1>&5'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }
-+then
-+ libc_cv_ssp=yes
-+else
-+ libc_cv_ssp=no
-+fi
-+rm -f conftest*
-+fi
-+echo "$as_me:$LINENO: result: $libc_cv_ssp" >&5
-+echo "${ECHO_T}$libc_cv_ssp" >&6
-+
-+
- if test $elf != yes; then
- echo "$as_me:$LINENO: checking for .init and .fini sections" >&5
- echo $ECHO_N "checking for .init and .fini sections... $ECHO_C" >&6
-@@ -8424,6 +8451,7 @@
- s,@libc_cv_z_execstack@,$libc_cv_z_execstack,;t t
- s,@libc_cv_fpie@,$libc_cv_fpie,;t t
- s,@fno_unit_at_a_time@,$fno_unit_at_a_time,;t t
-+s,@libc_cv_ssp@,$libc_cv_ssp,;t t
- s,@libc_cv_have_initfini@,$libc_cv_have_initfini,;t t
- s,@libc_cv_cpp_asm_debuginfo@,$libc_cv_cpp_asm_debuginfo,;t t
- s,@no_whole_archive@,$no_whole_archive,;t t
-diff -ur glibc-2.3.5-orig/configure.in glibc-2.3.5/configure.in
---- glibc-2.3.5-orig/configure.in 2006-01-18 00:31:17.000000000 -0500
-+++ glibc-2.3.5/configure.in 2006-01-18 00:35:50.000000000 -0500
-@@ -1500,6 +1500,21 @@
- fi
- AC_SUBST(fno_unit_at_a_time)
-
-+AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
-+cat > conftest.c <<EOF
-+int foo;
-+main () { return 0;}
-+EOF
-+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
-+ -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
-+then
-+ libc_cv_ssp=yes
-+else
-+ libc_cv_ssp=no
-+fi
-+rm -f conftest*])
-+AC_SUBST(libc_cv_ssp)
-+
- if test $elf != yes; then
- AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
- [AC_TRY_COMPILE(, [asm (".section .init");
-diff -ur glibc-2.3.5-orig/sysdeps/generic/libc-start.c glibc-2.3.5/sysdeps/generic/libc-start.c
---- glibc-2.3.5-orig/sysdeps/generic/libc-start.c 2006-01-18 00:31:35.000000000 -0500
-+++ glibc-2.3.5/sysdeps/generic/libc-start.c 2006-01-18 00:30:39.000000000 -0500
-@@ -188,6 +188,9 @@
- GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
- #endif
-
-+ /* call the __guard_setup to set up the random __guard value */
-+ __guard_setup (); /* pappy@gentoo.org (pappy rules) */
-+
- #ifdef HAVE_CLEANUP_JMP_BUF
- /* Memory for the cancellation buffer. */
- struct pthread_unwind_buf unwind_buf;
-diff -ur glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Dist glibc-2.3.5/sysdeps/unix/sysv/linux/Dist
---- glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Dist 2006-01-18 00:31:35.000000000 -0500
-+++ glibc-2.3.5/sysdeps/unix/sysv/linux/Dist 2006-01-18 00:30:39.000000000 -0500
-@@ -1,3 +1,4 @@
-+ssp.c
- bits/initspin.h
- cmsg_nxthdr.c
- dl-brk.c
-diff -ur glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Makefile glibc-2.3.5/sysdeps/unix/sysv/linux/Makefile
---- glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Makefile 2006-01-18 00:31:35.000000000 -0500
-+++ glibc-2.3.5/sysdeps/unix/sysv/linux/Makefile 2006-01-18 00:33:03.000000000 -0500
-@@ -1,5 +1,8 @@
- ifeq ($(subdir),csu)
--sysdep_routines += errno-loc
-+sysdep_routines += errno-loc ssp
-+ifeq (yes,$(have-ssp))
-+CFLAGS-ssp.c += -fno-stack-protector
-+endif
- endif
-
- ifeq ($(subdir),assert)
-diff -ur glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Versions glibc-2.3.5/sysdeps/unix/sysv/linux/Versions
---- glibc-2.3.5-orig/sysdeps/unix/sysv/linux/Versions 2006-01-18 00:31:35.000000000 -0500
-+++ glibc-2.3.5/sysdeps/unix/sysv/linux/Versions 2006-01-18 00:30:39.000000000 -0500
-@@ -108,6 +108,8 @@
- GLIBC_2.3.2 {
- # New kernel interfaces.
- epoll_create; epoll_ctl; epoll_wait;
-+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
-+ __guard; __guard_setup; __stack_smash_handler;
- }
- GLIBC_2.3.3 {
- gnu_dev_major; gnu_dev_minor; gnu_dev_makedev;
diff --git a/sys-libs/glibc/files/2.3.5/ssp.c b/sys-libs/glibc/files/2.3.5/ssp.c
deleted file mode 100644
index 880158d5cd31..000000000000
--- a/sys-libs/glibc/files/2.3.5/ssp.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.5/ssp.c,v 1.3 2005/06/07 01:38:58 vapier Exp $
- *
- * This is a modified version of Hiroaki Etoh's stack smashing routines
- * implemented for glibc.
- *
- * The following people have contributed input to this code.
- * 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>
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#ifdef __SSP__
-# error ssp.c has to be built w/ -fno-stack-protector
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/un.h>
-#include <sys/syslog.h>
-#include <sys/time.h>
-#ifdef __SSP_USE_ERANDOM__
-# include <sys/sysctl.h>
-#endif
-
-#ifdef __PROPOLICE_BLOCK_SEGV__
-# define SSP_SIGTYPE SIGSEGV
-#elif __PROPOLICE_BLOCK_KILL__
-# define SSP_SIGTYPE SIGKILL
-#else
-# define SSP_SIGTYPE SIGABRT
-#endif
-
-unsigned long __guard = 0UL;
-
-/* Use of __* functions from the rest of glibc here avoids
- * initialisation problems for executables preloaded with
- * libraries that overload the associated standard library
- * functions.
- */
-#ifdef __UCLIBC__
-extern int __libc_open(__const char *file, int flags, ...);
-extern ssize_t __libc_read(int fd, void *buf, size_t count);
-extern int __libc_close(int fd);
-#else
-# define __libc_open(file, flags) __open(file, flags)
-# define __libc_read(fd, buf, count) __read(fd, buf, count)
-# define __libc_close(fd) __close(fd)
-# define __libc_write(fd, buf, count) __write(fd, buf, count)
-#endif
-
-void __guard_setup(void) __attribute__ ((constructor));
-void __guard_setup(void)
-{
- size_t size;
-
- if (__guard != 0UL)
- return;
-
- /* Start with the "terminator canary". */
- __guard = 0xFF0A0D00UL;
-
-#ifndef __SSP_QUICK_CANARY__
-# ifdef __SSP_USE_ERANDOM__
- {
- int mib[3];
- /* Random is another depth in Linux, hence an array of 3. */
- mib[0] = CTL_KERN;
- mib[1] = KERN_RANDOM;
- mib[2] = RANDOM_ERANDOM;
-
- size = sizeof(unsigned long);
- if (__sysctl(mib, 3, &__guard, &size, NULL, 0) != (-1))
- if (__guard != 0UL)
- return;
- }
-# endif /* ifdef __SSP_USE_ERANDOM__ */
- /*
- * Attempt to open kernel pseudo random device if one exists before
- * opening urandom to avoid system entropy depletion.
- */
- {
- int fd;
-
-# ifdef __SSP_USE_ERANDOM__
- if ((fd = __libc_open("/dev/erandom", O_RDONLY)) == (-1))
-# endif
- fd = __libc_open("/dev/urandom", O_RDONLY);
- if (fd != (-1)) {
- size = __libc_read(fd, (char *) &__guard, sizeof(__guard));
- __libc_close(fd);
- if (size == sizeof(__guard))
- return;
- }
- }
-#endif /* ifndef __SSP_QUICK_CANARY__ */
-
- /* Everything failed? Or we are using a weakened model of the
- * terminator canary */
- {
- struct timeval tv;
- __gettimeofday(&tv, NULL);
- __guard ^= tv.tv_usec ^ tv.tv_sec;
- }
-}
-
-void __stack_smash_handler(char func[], int damaged __attribute__ ((unused)));
-void __stack_smash_handler(char func[], int damaged)
-{
- extern char *__progname;
- const char message[] = ": stack smashing attack in function ";
- struct sigaction sa;
- sigset_t mask;
-
- sigfillset(&mask);
-
- sigdelset(&mask, SSP_SIGTYPE); /* Block all signal handlers */
- sigprocmask(SIG_BLOCK, &mask, NULL); /* except SSP_SIGTYPE */
-
- /* Print error message to stderr and syslog */
-#if 1 /* syslog() causes issues with glibc #94325 */
- __libc_write(STDERR_FILENO, __progname, strlen(__progname));
- __libc_write(STDERR_FILENO, message, strlen(message));
- __libc_write(STDERR_FILENO, func, strlen(func));
- __libc_write(STDERR_FILENO, "()\n", 3);
- //_syscall3(int, _ssp_syslog, int, type, char *, bufp, int, len)
- //_ssp_syslog(LOG_INFO,
-#else
- fprintf(stderr, "%s%s%s()\n", __progname, message, func);
- syslog(LOG_INFO, "%s%s%s()", __progname, message, func);
-#endif
-
- /* Make the default handler associated with the signal handler */
- memset(&sa, 0, sizeof(struct sigaction));
- sigfillset(&sa.sa_mask); /* Block all signals */
- sa.sa_flags = 0;
- sa.sa_handler = SIG_DFL;
- sigaction(SSP_SIGTYPE, &sa, NULL);
- (void) kill(getpid(), SSP_SIGTYPE);
- _exit(127);
-}
diff --git a/sys-libs/glibc/files/2.3.6/glibc-2.3.6-propolice-guard-functions.patch b/sys-libs/glibc/files/2.3.6/glibc-2.3.6-propolice-guard-functions.patch
deleted file mode 100644
index 8779a2c0f91e..000000000000
--- a/sys-libs/glibc/files/2.3.6/glibc-2.3.6-propolice-guard-functions.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-The configure check for SSP was taken from glibc HEAD
-
-diff -ur glibc-2.3.6-orig/config.make.in glibc-2.3.6/config.make.in
---- glibc-2.3.6-orig/config.make.in 2006-01-17 14:22:02.000000000 -0500
-+++ glibc-2.3.6/config.make.in 2006-01-17 14:22:39.000000000 -0500
-@@ -62,6 +62,7 @@
- have-libaudit = @have_libaudit@
- have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
- fno-unit-at-a-time = @fno_unit_at_a_time@
-+have-ssp = @libc_cv_ssp@
- bind-now = @bindnow@
-
- static-libgcc = @libc_cv_gcc_static_libgcc@
-diff -ur glibc-2.3.6-orig/configure glibc-2.3.6/configure
---- glibc-2.3.6-orig/configure 2006-01-17 14:22:17.000000000 -0500
-+++ glibc-2.3.6/configure 2006-01-17 14:18:24.000000000 -0500
-@@ -313,7 +313,7 @@
- # include <unistd.h>
- #endif"
-
--ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
-+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_ssp libc_cv_have_initfini libc_cv_cpp_asm_debuginfo no_whole_archive exceptions LIBGD have_libaudit have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
- ac_subst_files=''
-
- # Initialize some variables set by options.
-@@ -5785,6 +5785,33 @@
- fi
-
-
-+echo "$as_me:$LINENO: checking for -fstack-protector" >&5
-+echo $ECHO_N "checking for -fstack-protector... $ECHO_C" >&6
-+if test "${libc_cv_ssp+set}" = set; then
-+ echo $ECHO_N "(cached) $ECHO_C" >&6
-+else
-+ cat > conftest.c <<EOF
-+int foo;
-+main () { return 0;}
-+EOF
-+if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
-+ -o conftest conftest.c 1>&5'
-+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-+ (eval $ac_try) 2>&5
-+ ac_status=$?
-+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
-+ (exit $ac_status); }; }
-+then
-+ libc_cv_ssp=yes
-+else
-+ libc_cv_ssp=no
-+fi
-+rm -f conftest*
-+fi
-+echo "$as_me:$LINENO: result: $libc_cv_ssp" >&5
-+echo "${ECHO_T}$libc_cv_ssp" >&6
-+
-+
- if test $elf != yes; then
- echo "$as_me:$LINENO: checking for .init and .fini sections" >&5
- echo $ECHO_N "checking for .init and .fini sections... $ECHO_C" >&6
-@@ -8504,6 +8531,7 @@
- s,@libc_cv_z_execstack@,$libc_cv_z_execstack,;t t
- s,@libc_cv_fpie@,$libc_cv_fpie,;t t
- s,@fno_unit_at_a_time@,$fno_unit_at_a_time,;t t
-+s,@libc_cv_ssp@,$libc_cv_ssp,;t t
- s,@libc_cv_have_initfini@,$libc_cv_have_initfini,;t t
- s,@libc_cv_cpp_asm_debuginfo@,$libc_cv_cpp_asm_debuginfo,;t t
- s,@no_whole_archive@,$no_whole_archive,;t t
-diff -ur glibc-2.3.6-orig/configure.in glibc-2.3.6/configure.in
---- glibc-2.3.6-orig/configure.in 2006-01-17 14:22:17.000000000 -0500
-+++ glibc-2.3.6/configure.in 2006-01-17 14:18:24.000000000 -0500
-@@ -1500,6 +1500,21 @@
- fi
- AC_SUBST(fno_unit_at_a_time)
-
-+AC_CACHE_CHECK(for -fstack-protector, libc_cv_ssp, [dnl
-+cat > conftest.c <<EOF
-+int foo;
-+main () { return 0;}
-+EOF
-+if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fstack-protector
-+ -o conftest conftest.c 1>&AS_MESSAGE_LOG_FD])
-+then
-+ libc_cv_ssp=yes
-+else
-+ libc_cv_ssp=no
-+fi
-+rm -f conftest*])
-+AC_SUBST(libc_cv_ssp)
-+
- if test $elf != yes; then
- AC_CACHE_CHECK(for .init and .fini sections, libc_cv_have_initfini,
- [AC_TRY_COMPILE(, [asm (".section .init");
-diff -ur glibc-2.3.6-orig/sysdeps/generic/libc-start.c glibc-2.3.6/sysdeps/generic/libc-start.c
---- glibc-2.3.6-orig/sysdeps/generic/libc-start.c 2006-01-17 14:22:17.000000000 -0500
-+++ glibc-2.3.6/sysdeps/generic/libc-start.c 2006-01-17 14:18:24.000000000 -0500
-@@ -188,6 +188,9 @@
- GLRO(dl_debug_printf) ("\ntransferring control: %s\n\n", argv[0]);
- #endif
-
-+ /* call the __guard_setup to set up the random __guard value */
-+ __guard_setup (); /* pappy@gentoo.org (pappy rules) */
-+
- #ifdef HAVE_CLEANUP_JMP_BUF
- /* Memory for the cancellation buffer. */
- struct pthread_unwind_buf unwind_buf;
-diff -ur glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Dist glibc-2.3.6/sysdeps/unix/sysv/linux/Dist
---- glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Dist 2006-01-17 14:22:17.000000000 -0500
-+++ glibc-2.3.6/sysdeps/unix/sysv/linux/Dist 2006-01-17 14:18:24.000000000 -0500
-@@ -1,3 +1,4 @@
-+ssp.c
- bits/initspin.h
- cmsg_nxthdr.c
- dl-brk.c
-diff -ur glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Makefile glibc-2.3.6/sysdeps/unix/sysv/linux/Makefile
---- glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Makefile 2006-01-17 14:22:17.000000000 -0500
-+++ glibc-2.3.6/sysdeps/unix/sysv/linux/Makefile 2006-01-17 14:18:24.000000000 -0500
-@@ -1,5 +1,8 @@
- ifeq ($(subdir),csu)
--sysdep_routines += errno-loc
-+sysdep_routines += errno-loc ssp
-+ifeq (yes,$(have-ssp))
-+CFLAGS-ssp.c += -fno-stack-protector
-+endif
- endif
-
- ifeq ($(subdir),assert)
-diff -ur glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Versions glibc-2.3.6/sysdeps/unix/sysv/linux/Versions
---- glibc-2.3.6-orig/sysdeps/unix/sysv/linux/Versions 2006-01-17 14:22:17.000000000 -0500
-+++ glibc-2.3.6/sysdeps/unix/sysv/linux/Versions 2006-01-17 14:18:24.000000000 -0500
-@@ -108,6 +108,8 @@
- GLIBC_2.3.2 {
- # New kernel interfaces.
- epoll_create; epoll_ctl; epoll_wait;
-+ # global objects and functions for the propolice patch in gcc - moved from libgcc by pappy@gentoo.org
-+ __guard; __guard_setup; __stack_smash_handler;
- }
- GLIBC_2.3.3 {
- gnu_dev_major; gnu_dev_minor; gnu_dev_makedev;
diff --git a/sys-libs/glibc/files/2.3.6/host.conf b/sys-libs/glibc/files/2.3.6/host.conf
deleted file mode 100644
index eab7426ef0d7..000000000000
--- a/sys-libs/glibc/files/2.3.6/host.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-# /etc/host.conf:
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/2.3.6/host.conf,v 1.1 2006/02/21 23:35:21 vapier Exp $
-
-# The file /etc/host.conf contains configuration information specific to
-# the resolver library. It should contain one configuration keyword per
-# line, followed by appropriate configuration information. The keywords
-# recognized are order, trim, mdns, multi, nospoof, spoof, and reorder.
-
-
-
-# This keyword specifies how host lookups are to be performed. It
-# should be followed by one or more lookup methods, separated by
-# commas. Valid methods are bind, hosts, and nis.
-#
-order hosts, bind
-
-
-# Valid values are on and off. If set to on, the resolv+ library
-# will return all valid addresses for a host that appears in the
-# /etc/hosts file, instead of only the first. This is off by
-# default, as it may cause a substantial performance loss at sites
-# with large hosts files.
-#
-multi off
diff --git a/sys-libs/glibc/files/2.4/glibc-gentoo-libdir.patch b/sys-libs/glibc/files/2.4/glibc-gentoo-libdir.patch
deleted file mode 100644
index f263746774f6..000000000000
--- a/sys-libs/glibc/files/2.4/glibc-gentoo-libdir.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- glibc-2.4/sysdeps/unix/sysv/linux/configure
-+++ glibc-2.4/sysdeps/unix/sysv/linux/configure
-@@ -224,23 +224,12 @@
- # in /lib and /etc.
- case "$prefix" in
- /usr | /usr/)
-- # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
-- # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
-- # and libc_cv_localedir.
-- test -n "$libc_cv_slibdir" || \
-- case $machine in
-- sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
-- libc_cv_slibdir="/lib64"
-+ libc_cv_slibdir="/@GENTOO_LIBDIR@"
- if test "$libdir" = '${exec_prefix}/lib'; then
-- libdir='${exec_prefix}/lib64';
-+ libdir='${exec_prefix}/@GENTOO_LIBDIR@'
- # Locale data can be shared between 32bit and 64bit libraries
- libc_cv_localedir='${exec_prefix}/lib/locale'
- fi
-- ;;
-- *)
-- libc_cv_slibdir="/lib"
-- ;;
-- esac
- # Allow the user to override the path with --sysconfdir
- if test $sysconfdir = '${prefix}/etc'; then
- libc_cv_sysconfdir=/etc
diff --git a/sys-libs/glibc/files/2.4/ssp_simple.c b/sys-libs/glibc/files/2.4/ssp_simple.c
deleted file mode 100644
index ec16dc60d5f2..000000000000
--- a/sys-libs/glibc/files/2.4/ssp_simple.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Just do:
- * # gcc -fno-stack-protector -s -shared -fPIC ssp_simple.c -o /lib/libssp_simple.so
- * # echo '/lib/libssp_simple.so' > /etc/ld.so.preload
- * # emerge glibc
- * # rm -f /lib/libssp_simple.so /etc/ld.so.preload
- */
-
-#include <syslog.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-unsigned long __guard = 0UL; static void __guard_setup(void) __attribute__ ((constructor));
-void __stack_smash_handler(char func[], int damaged __attribute__ ((unused)));
-static void __guard_setup(void) { if (__guard != 0UL) return; __guard = 0xFF0A0D00UL; }
-
-void __stack_smash_handler(char func[], int damaged) {
- syslog(LOG_CRIT, "stack overflow in function %s(); %s=%p __guard_setup=%p __guard=%p " \
- "PPID=%d PID=%d UID=%d EUID=%d GID=%d EGID=%d",
- func, func, __guard_setup, __guard,
- getppid(), getpid(), getuid(), geteuid(), getgid(), getegid());
- _exit(127);
-}
diff --git a/sys-libs/glibc/files/fix-sysctl_h.patch b/sys-libs/glibc/files/fix-sysctl_h.patch
deleted file mode 100644
index 2c490844c81a..000000000000
--- a/sys-libs/glibc/files/fix-sysctl_h.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- linux.orig/include/linux/sysctl.h.orig 2003-05-18 22:12:39.000000000 +0200
-+++ linux.fixed/include/linux/sysctl.h 2003-05-18 22:13:58.000000000 +0200
-@@ -35,6 +35,10 @@
- the largest acceptable value for the nlen
- member of a struct __sysctl_args to have? */
-
-+#ifndef __user
-+#define __user
-+#endif
-+
- struct __sysctl_args {
- int __user *name;
- int nlen;
diff --git a/sys-libs/glibc/files/glibc-2.2.2-test-lfs-timeout.patch b/sys-libs/glibc/files/glibc-2.2.2-test-lfs-timeout.patch
deleted file mode 100644
index ac4de72dad00..000000000000
--- a/sys-libs/glibc/files/glibc-2.2.2-test-lfs-timeout.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- test-lfs.c~ Fri Feb 9 18:04:07 2001
-+++ test-lfs.c Sat Feb 17 04:30:18 2001
-@@ -34,7 +34,7 @@
- #define PREPARE do_prepare
-
- /* We might need a bit longer timeout. */
--#define TIMEOUT 20 /* sec */
-+#define TIMEOUT 120 /* sec */
-
- /* This defines the `main' function and some more. */
- #include <test-skeleton.c>
diff --git a/sys-libs/glibc/files/glibc-sec-hotfix-20040804.patch b/sys-libs/glibc/files/glibc-sec-hotfix-20040804.patch
deleted file mode 100644
index 14ffd90b5b28..000000000000
--- a/sys-libs/glibc/files/glibc-sec-hotfix-20040804.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-#! /bin/sh -e
-
-# All lines beginning with `# DP:' are a description of the patch.
-# DP: Add grsecurity enhancements to glibc
-# DP: * Adds Stefan Esser's unlink sanity check
-# DP: * Removes LD_DEBUG for suid apps
-# DP: * Fixes a glibc bug where certain envvars are interpreted
-# DP: even if UNSECURE_ENVVARS says to drop them
-
-if [ $# -ne 2 ]; then
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-fi
-case "$1" in
- -patch) patch -d "$2" -f --no-backup-if-mismatch -p0 < $0;;
- -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p0 < $0;;
- *)
- echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
- exit 1
-esac
-exit 0
-
---- malloc/malloc.c 2004-08-03 18:06:35 -0400
-+++ malloc/malloc.c 2004-08-03 18:08:53 -0400
-@@ -311,6 +311,10 @@
- #define assert(x) ((void)0)
- #endif
-
-+#include <abort-instr.h>
-+#ifndef ABORT_INSTRUCTION
-+#define ABORT_INSTRUCTION
-+#endif
-
- /*
- INTERNAL_SIZE_T is the word-size used for internal bookkeeping
-@@ -1951,6 +1955,13 @@
- #define unlink(P, BK, FD) { \
- FD = P->fd; \
- BK = P->bk; \
-+ if (FD->bk != P || BK->fd != P) \
-+ { \
-+ ABORT_INSTRUCTION; \
-+ _exit(127); \
-+ while (1) \
-+ ABORT_INSTRUCTION; \
-+ } \
- FD->bk = BK; \
- BK->fd = FD; \
- }
---- sysdeps/generic/unsecvars.h 2004-08-03 18:13:13 -0400
-+++ sysdeps/generic/unsecvars.h 2004-08-03 18:11:41 -0400
-@@ -3,6 +3,8 @@
- with a '\0' explicitly. */
- #define UNSECURE_ENVVARS \
- "LD_PRELOAD\0" \
-+ "LD_DEBUG\0" \
-+ "LD_TRACE_PRELINKING\0" \
- "LD_LIBRARY_PATH\0" \
- "LD_ORIGIN_PATH\0" \
- "LD_DEBUG_OUTPUT\0" \
---- elf/rtld.c 2003-01-07 13:47:35 -0500
-+++ elf/rtld.c 2004-08-03 22:15:51 -0400
-@@ -1762,6 +1762,30 @@
- GL(dl_profile_output)
- = &"/var/tmp\0/var/profile"[INTUSE(__libc_enable_secure) ? 9 : 0];
-
-+ /* Extra security for SUID binaries. Remove all dangerous environment
-+ variables. */
-+ if (__builtin_expect (INTUSE(__libc_enable_secure), 0))
-+ {
-+ static const char unsecure_envvars[] =
-+#ifdef EXTRA_UNSECURE_ENVVARS
-+ EXTRA_UNSECURE_ENVVARS
-+#endif
-+ UNSECURE_ENVVARS;
-+ const char *nextp;
-+
-+ nextp = unsecure_envvars;
-+ do
-+ {
-+ unsetenv (nextp);
-+ /* We could use rawmemchr but this need not be fast. */
-+ nextp = (char *) (strchr) (nextp, '\0') + 1;
-+ }
-+ while (*nextp != '\0');
-+
-+ if (__access ("/etc/suid-debug", F_OK) != 0)
-+ unsetenv ("MALLOC_CHECK_");
-+ }
-+
- while ((envline = _dl_next_ld_env_entry (&runp)) != NULL)
- {
- size_t len = 0;
-@@ -1897,33 +1921,10 @@
- /* The caller wants this information. */
- *modep = mode;
-
-- /* Extra security for SUID binaries. Remove all dangerous environment
-- variables. */
-- if (__builtin_expect (INTUSE(__libc_enable_secure), 0))
-- {
-- static const char unsecure_envvars[] =
--#ifdef EXTRA_UNSECURE_ENVVARS
-- EXTRA_UNSECURE_ENVVARS
--#endif
-- UNSECURE_ENVVARS;
-- const char *nextp;
--
-- nextp = unsecure_envvars;
-- do
-- {
-- unsetenv (nextp);
-- /* We could use rawmemchr but this need not be fast. */
-- nextp = (char *) (strchr) (nextp, '\0') + 1;
-- }
-- while (*nextp != '\0');
--
-- if (__access ("/etc/suid-debug", F_OK) != 0)
-- unsetenv ("MALLOC_CHECK_");
-- }
- /* If we have to run the dynamic linker in debugging mode and the
- LD_DEBUG_OUTPUT environment variable is given, we write the debug
- messages to this file. */
-- else if (any_debug && debug_output != NULL)
-+ if (any_debug && debug_output != NULL)
- {
- #ifdef O_NOFOLLOW
- const int flags = O_WRONLY | O_APPEND | O_CREAT | O_NOFOLLOW;
diff --git a/sys-libs/glibc/files/glibc-sec-hotfix-20040916.patch b/sys-libs/glibc/files/glibc-sec-hotfix-20040916.patch
deleted file mode 100644
index 3858a0f9c9d1..000000000000
--- a/sys-libs/glibc/files/glibc-sec-hotfix-20040916.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-diff -Nru glibc-2.3.3.old/elf/rtld.c glibc-2.3.3/elf/rtld.c
---- glibc-2.3.3.old/elf/rtld.c 2004-09-16 15:02:16.000000000 -0400
-+++ glibc-2.3.3/elf/rtld.c 2004-09-16 15:04:58.000000000 -0400
-@@ -2041,6 +2041,30 @@
- GLRO(dl_profile_output)
- = &"/var/tmp\0/var/profile"[INTUSE(__libc_enable_secure) ? 9 : 0];
-
-+ /* Extra security for SUID binaries. Remove all dangerous environment
-+ variables. */
-+ if (__builtin_expect (INTUSE(__libc_enable_secure), 0))
-+ {
-+ static const char unsecure_envvars[] =
-+#ifdef EXTRA_UNSECURE_ENVVARS
-+ EXTRA_UNSECURE_ENVVARS
-+#endif
-+ UNSECURE_ENVVARS;
-+ const char *nextp;
-+
-+ nextp = unsecure_envvars;
-+ do
-+ {
-+ unsetenv (nextp);
-+ /* We could use rawmemchr but this need not be fast. */
-+ nextp = (char *) (strchr) (nextp, '\0') + 1;
-+ }
-+ while (*nextp != '\0');
-+
-+ if (__access ("/etc/suid-debug", F_OK) != 0)
-+ unsetenv ("MALLOC_CHECK_");
-+ }
-+
- while ((envline = _dl_next_ld_env_entry (&runp)) != NULL)
- {
- size_t len = 0;
-@@ -2188,33 +2212,10 @@
- /* The caller wants this information. */
- *modep = mode;
-
-- /* Extra security for SUID binaries. Remove all dangerous environment
-- variables. */
-- if (__builtin_expect (INTUSE(__libc_enable_secure), 0))
-- {
-- static const char unsecure_envvars[] =
--#ifdef EXTRA_UNSECURE_ENVVARS
-- EXTRA_UNSECURE_ENVVARS
--#endif
-- UNSECURE_ENVVARS;
-- const char *nextp;
--
-- nextp = unsecure_envvars;
-- do
-- {
-- unsetenv (nextp);
-- /* We could use rawmemchr but this need not be fast. */
-- nextp = (char *) (strchr) (nextp, '\0') + 1;
-- }
-- while (*nextp != '\0');
--
-- if (__access ("/etc/suid-debug", F_OK) != 0)
-- unsetenv ("MALLOC_CHECK_");
-- }
- /* If we have to run the dynamic linker in debugging mode and the
- LD_DEBUG_OUTPUT environment variable is given, we write the debug
- messages to this file. */
-- else if (any_debug && debug_output != NULL)
-+ if (any_debug && debug_output != NULL)
- {
- #ifdef O_NOFOLLOW
- const int flags = O_WRONLY | O_APPEND | O_CREAT | O_NOFOLLOW;
-diff -Nru glibc-2.3.3.old/malloc/malloc.c glibc-2.3.3/malloc/malloc.c
---- glibc-2.3.3.old/malloc/malloc.c 2004-09-16 15:03:22.000000000 -0400
-+++ glibc-2.3.3/malloc/malloc.c 2004-09-16 15:04:58.000000000 -0400
-@@ -321,6 +321,10 @@
- #define assert(x) ((void)0)
- #endif
-
-+#include <abort-instr.h>
-+#ifndef ABORT_INSTRUCTION
-+#define ABORT_INSTRUCTION
-+#endif
-
- /*
- INTERNAL_SIZE_T is the word-size used for internal bookkeeping
-diff -Nru glibc-2.3.3.old/sysdeps/generic/unsecvars.h glibc-2.3.3/sysdeps/generic/unsecvars.h
---- glibc-2.3.3.old/sysdeps/generic/unsecvars.h 2004-09-16 15:03:11.000000000 -0400
-+++ glibc-2.3.3/sysdeps/generic/unsecvars.h 2004-09-16 15:04:58.000000000 -0400
-@@ -3,6 +3,8 @@
- with a '\0' explicitly. */
- #define UNSECURE_ENVVARS \
- "LD_PRELOAD\0" \
-+ "LD_DEBUG\0" \
-+ "LD_TRACE_PRELINKING\0" \
- "LD_LIBRARY_PATH\0" \
- "LD_ORIGIN_PATH\0" \
- "LD_DEBUG_OUTPUT\0" \
diff --git a/sys-libs/glibc/files/locales.build b/sys-libs/glibc/files/locales.build
deleted file mode 100644
index ce2a88cfa430..000000000000
--- a/sys-libs/glibc/files/locales.build
+++ /dev/null
@@ -1,25 +0,0 @@
-# This file names the list of locales to be built when glibc is installed.
-# The format is <locale>/<charmap>, where <locale> is a locale from the
-# /usr/share/i18n/locales directory, and <charmap> is name of one of the files
-# in /usr/share/i18n/charmaps/. All blank lines and lines starting with # are
-# ignored. Here is an example:
-# en_US/ISO-8859-1
-#
-# For the full list, see the file SUPPORTED in the glibc tarball:
-# glibc/localedata/SUPPORTED
-
-en_US/ISO-8859-1
-en_US.UTF-8/UTF-8
-ja_JP.EUC-JP/EUC-JP
-ja_JP.UTF-8/UTF-8
-ja_JP/EUC-JP
-en_HK/ISO-8859-1
-en_PH/ISO-8859-1
-de_DE/ISO-8859-1
-de_DE@euro/ISO-8859-15
-es_MX/ISO-8859-1
-fa_IR/UTF-8
-fr_FR/ISO-8859-1
-fr_FR@euro/ISO-8859-15
-it_IT/ISO-8859-1
-
diff --git a/sys-libs/glibc/files/nscd.conf b/sys-libs/glibc/files/nscd.conf
deleted file mode 100644
index 226dda377f6d..000000000000
--- a/sys-libs/glibc/files/nscd.conf
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# /etc/nscd.conf
-#
-# An example Name Service Cache config file. This file is needed by nscd.
-#
-# Legal entries are:
-#
-# logfile <file>
-# debug-level <level>
-# threads <#threads to use>
-# server-user <user to run server as instead of root>
-# server-user is ignored if nscd is started with -S parameters
-#
-# enable-cache <service> <yes|no>
-# positive-time-to-live <service> <time in seconds>
-# negative-time-to-live <service> <time in seconds>
-# suggested-size <service> <prime number>
-# check-files <service> <yes|no>
-#
-# Currently supported cache names (services): passwd, group, hosts
-#
-
-
-# logfile /var/log/nscd.log
-# threads 6
-# server-user nobody
- debug-level 0
-
- enable-cache passwd yes
- positive-time-to-live passwd 600
- negative-time-to-live passwd 20
- suggested-size passwd 211
- check-files passwd yes
-
- enable-cache group yes
- positive-time-to-live group 3600
- negative-time-to-live group 60
- suggested-size group 211
- check-files group yes
-
- enable-cache hosts yes
- positive-time-to-live hosts 3600
- negative-time-to-live hosts 20
- suggested-size hosts 211
- check-files hosts yes
diff --git a/sys-libs/glibc/files/test-__thread.c b/sys-libs/glibc/files/test-__thread.c
deleted file mode 100644
index be37c0e2acc2..000000000000
--- a/sys-libs/glibc/files/test-__thread.c
+++ /dev/null
@@ -1,7 +0,0 @@
-extern __thread int i;
-
-int main() {
-
- return 0;
-}
-
diff --git a/sys-libs/glibc/files/test-sysctl_h.c b/sys-libs/glibc/files/test-sysctl_h.c
deleted file mode 100644
index 1512b4d5bca1..000000000000
--- a/sys-libs/glibc/files/test-sysctl_h.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <linux/sysctl.h>
-
-int main()
-{
- return 0;
-}
-
diff --git a/sys-libs/glibc/glibc-2.3.2-r12.ebuild b/sys-libs/glibc/glibc-2.3.2-r12.ebuild
deleted file mode 100644
index 729e45dc5b95..000000000000
--- a/sys-libs/glibc/glibc-2.3.2-r12.ebuild
+++ /dev/null
@@ -1,726 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.2-r12.ebuild,v 1.27 2009/09/23 22:04:09 patrick Exp $
-
-inherit eutils flag-o-matic toolchain-funcs
-
-# Branch update support. Following will disable:
-# BRANCH_UPDATE=
-BRANCH_UPDATE="20031115"
-
-# Minimum kernel version for --enable-kernel
-export MIN_KV="2.4.1"
-# Minimum kernel version for enabling TLS and NPTL ...
-# NOTE: do not change this if you do not know what
-# you are doing !
-export MIN_NPTL_KV="2.6.0"
-
-# (very) Theoretical cross-compiler support
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} = ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-MY_PV="${PV/_}"
-S="${WORKDIR}/${P%_*}"
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-SRC_URI="http://ftp.gnu.org/gnu/glibc/glibc-${MY_PV}.tar.bz2
- ftp://sources.redhat.com/pub/glibc/snapshots/glibc-${MY_PV}.tar.bz2
- http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-${MY_PV}.tar.bz2
- ftp://sources.redhat.com/pub/glibc/snapshots/glibc-linuxthreads-${MY_PV}.tar.bz2
- mirror://gentoo/${P}-branch-update-${BRANCH_UPDATE}.patch.bz2
- mirror://gentoo/${P}-manpages.tar.bz2
- hppa? ( mirror://gentoo/${P}-hppa-patches-p1.tar.bz2 )"
-
-LICENSE="LGPL-2"
-[[ ${CTARGET} != ${CHOST} ]] \
- && SLOT="${CTARGET}-2.2" \
- || SLOT="2.2"
-KEYWORDS="alpha amd64 arm hppa ia64 mips ppc s390 sh sparc x86"
-IUSE="build nls nptl userlocales"
-RESTRICT="strip" # we'll handle stripping ourself #46186
-
-# We need new cleanup attribute support from gcc for NPTL among things ...
-DEPEND=">=sys-devel/gcc-3.2.3-r1
- x86? ( nptl? ( >=sys-devel/gcc-3.3.1-r1 ) )
- >=sys-devel/binutils-2.14.90.0.6-r1
- virtual/os-headers
- nls? ( sys-devel/gettext )"
-RDEPEND="nls? ( sys-devel/gettext )"
-PDEPEND="ppc? ( >=sys-kernel/linux-headers-2.4.22 )"
-PROVIDE="virtual/libc"
-
-# Try to get a kernel source tree with version equal or greater
-# than $1. We basically just try a few default locations. The
-# version need to be that which KV_to_int() returns ...
-get_KHV() {
- local headers=
-
- [ -z "$1" ] && return 1
-
- # - First check if linux-headers are installed (or symlink
- # to current kernel ...)
- # - Ok, do we have access to the current kernel's headers ?
- # - Last option ... maybe its a weird bootstrap with /lib
- # binded to the chroot ...
-
- # We do not really support more than 2 arguments ...
- if [ -n "$2" ]
- then
- headers="$2"
- else
- # We try to find the current kernel's headers first,
- # as we would rather build against linux 2.5 headers ...
- headers="/lib/modules/`uname -r`/build/include \
- ${ROOT}/lib/modules/`uname -r`/build/include \
- /usr/src/linux/include \
- ${ROOT}/usr/src/linux/include \
- ${ROOT}/usr/include"
- fi
-
- for x in ${headers}
- do
- local header="${x}/linux/version.h"
-
- if [ -f ${header} ]
- then
-
- local version="`grep 'LINUX_VERSION_CODE' ${header} | \
- sed -e 's:^.*LINUX_VERSION_CODE[[:space:]]*::'`"
-
- if [ "${version}" -ge "$1" ]
- then
- echo "${x}"
-
- return 0
- fi
- fi
- done
-
- return 1
-}
-
-use_nptl() {
- # Enable NPTL support if:
- # - We have 'nptl' in USE
- # - We have linux-2.5 or later kernel (should prob check for 2.4.20 ...)
- if use nptl && [ "`get_KV`" -ge "`KV_to_int ${MIN_NPTL_KV}`" ]
- then
- # Enable NPTL support if:
- # - We have 'x86' in USE and:
- # - a CHOST of "i486-pc-linux-gnu"
- # - a CHOST of "i586-pc-linux-gnu"
- # - a CHOST of "i686-pc-linux-gnu"
- # - Or we have 'alpha' in USE
- # - Or we have 'amd64' in USE
- # - Or we have 'mips' in USE
- # - Or we have 'ppc' in USE
- case $(tc-arch ${CTARGET}) in
- "x86")
- if [ "${CHOST/-*}" = "i486" -o \
- "${CHOST/-*}" = "i586" -o \
- "${CHOST/-*}" = "i686" ]
- then
- return 0
- fi
- ;;
- "alpha"|"amd64"|"mips"|"ppc")
- return 0
- ;;
- *)
- return 1
- ;;
- esac
- fi
-
- return 1
-}
-
-install_locales() {
- einfo "Installing Locale data..."
- make PARALLELMFLAGS="${MAKEOPTS}" \
- install_root=${D} \
- localedata/install-locales -C ${buildtarget} || die
- keepdir /usr/lib/locale/ru_RU/LC_MESSAGES
-}
-
-setup_locales() {
- if ! use userlocales ; then
- einfo "userlocales not enabled, installing -ALL- locales..."
- elif [[ -e ${ROOT}/etc/locales.build ]] ; then
- einfo "Installing locales in /etc/locales.build..."
- echo 'SUPPORTED-LOCALES=\' > SUPPORTED.locales
- cat "${ROOT}"/etc/locales.build | grep -v -e ^$ -e ^\# | sed 's/$/\ \\/g' \
- >> SUPPORTED.locales
- cat SUPPORTED.locales > ${S}/localedata/SUPPORTED || die
- elif [ -e ${FILESDIR}/locales.build ]; then
- einfo "Installing locales in ${FILESDIR}/locales.build..."
- echo 'SUPPORTED-LOCALES=\' > SUPPORTED.locales
- cat ${FILESDIR}/locales.build | grep -v -e ^$ -e ^\# | sed 's/$/\ \\/g' \
- >> SUPPORTED.locales
- cat SUPPORTED.locales > ${S}/localedata/SUPPORTED || die
- else
- einfo "Installing -ALL- locales..."
- fi
- install_locales || die
-}
-
-glibc_setup() {
- # Check if we are going to downgrade, we don't like that
- #local old_version
- #
- #old_version="`best_version glibc`"
- #old_version="${old_version/sys-libs\/glibc-/}"
- #
- #if [ "$old_version" ]; then
- # if [ `python -c "import portage; print int(portage.vercmp(\"${PV}\",\"$old_version\"))"` -lt 0 ]; then
- # if [ "${FORCE_DOWNGRADE}" ]; then
- # ewarn "downgrading glibc, still not recommended, but we'll do as you wish"
- # else
- # eerror "Downgrading glibc is not supported and we strongly recommend that"
- # eerror "you don't do it as it WILL break all applications compiled against"
- # eerror "the new version (most likely including python and portage)."
- # eerror "If you are REALLY sure that you want to do it set "
- # eerror " FORCE_DOWNGRADE=1"
- # eerror "when you try it again."
- # die "glibc downgrade"
- # fi
- # fi
- #fi
-
- # We need gcc 3.2 or later ...
- if [ "`gcc-major-version`" -ne "3" -o "`gcc-minor-version`" -lt "2" ]
- then
- echo
- eerror "As of glibc-2.3, gcc-3.2 or later is needed"
- eerror "for the build to succeed."
- die "GCC too old"
- fi
-
- echo
-
- if use_nptl
- then
- # The use_nptl should have already taken care of kernel version,
- # arch and CHOST, so now just check if we can find suitable kernel
- # source tree or headers ....
- einfon "Checking for sufficient version kernel headers ... "
- if ! get_KHV "`KV_to_int ${MIN_NPTL_KV}`" &> /dev/null
- then
- echo "no"
- echo
- eerror "Could not find a kernel source tree or headers with"
- eerror "version ${MIN_NPTL_KV} or later! Please correct this"
- eerror "and try again."
- die "Insufficient kernel headers present!"
- else
- echo "yes"
- fi
- fi
-
- if [ "$(KV_to_int $(uname -r))" -gt "`KV_to_int '2.5.68'`" ]
- then
- local KERNEL_HEADERS="$(get_KHV "`KV_to_int ${MIN_NPTL_KV}`")"
-
- einfon "Checking kernel headers for broken sysctl.h ... "
- if ! gcc -I"${KERNEL_HEADERS}" \
- -c ${FILESDIR}/test-sysctl_h.c -o ${T}/test1.o &> /dev/null
- then
- echo "yes"
- echo
- eerror "Your version of:"
- echo
- eerror " ${KERNEL_HEADERS}/linux/sysctl.h"
- echo
- eerror "is broken (from a user space perspective). Please apply"
- eerror "the following patch:"
- echo
- eerror "*******************************************************"
- cat ${FILESDIR}/fix-sysctl_h.patch
- eerror "*******************************************************"
- echo
- einfo "To fix, just do this:"
- einfo "cd ${KERNEL_HEADERS}/linux/"
- einfo "patch -p3 < ${FILESDIR}/fix-sysctl_h.patch"
- echo
- die "Broken linux/sysctl.h header included in kernel sources!"
- else
- echo "no"
- fi
- fi
-
- if use_nptl
- then
- einfon "Checking gcc for __thread support ... "
- if ! gcc -c ${FILESDIR}/test-__thread.c -o ${T}/test2.o &> /dev/null
- then
- echo "no"
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "please update to gcc-3.2.2-r1 or later, and try again."
- die "No __thread support in gcc!"
- else
- echo "yes"
- fi
-
- elif use nptl &> /dev/null
- then
- echo
- # Just tell the user not to expect too much ...
- ewarn "You have \"nptl\" in your USE, but your kernel version or"
- ewarn "architecture does not support it!"
- fi
-
- echo
-}
-
-src_unpack() {
-
- unpack glibc-${MY_PV}.tar.bz2
-
- # Needed for s390/linux-2.6 headers
- cp ${FILESDIR}/2.3.2/posix_fadvise64.c \
- ${S}/sysdeps/unix/sysv/linux/s390/s390-32/posix_fadvise64.c \
- || die
-
- # we only need to check this one time. Bug #61856
- glibc_setup
-
- # Extract pre-made man pages. Otherwise we need perl, which is a no-no.
- mkdir -p ${S}/man; cd ${S}/man
- use_nptl || tar xjf ${DISTDIR}/glibc-${MY_PV}-manpages.tar.bz2
-
- cd ${S}
- # Extract our threads package ...
- if (! use_nptl) && [[ -z ${BRANCH_UPDATE} ]] ; then
- unpack glibc-linuxthreads-${MY_PV}.tar.bz2
- fi
-
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- epatch ${DISTDIR}/${P}-branch-update-${BRANCH_UPDATE}.patch.bz2
- fi
-
- if use_nptl ; then
- epatch ${FILESDIR}/2.3.2/${P}-redhat-nptl-fixes.patch
- else
- epatch ${FILESDIR}/2.3.2/${P}-redhat-linuxthreads-fixes.patch
- fi
-
- # To circumvent problems with propolice __guard and
- # __guard_setup__stack_smash_handler
- #
- # http://www.gentoo.org/proj/en/hardened/etdyn-ssp.xml
- if [[ $(tc-arch ${CTARGET}) != "hppa" ]] ; then
- cd ${S}; epatch ${FILESDIR}/${PV}/${P}-propolice-guard-functions-v2.patch
- fi
-
- # With latest versions of glibc, a lot of apps failed on a PaX enabled
- # system with:
- #
- # cannot enable executable stack as shared object requires: Permission denied
- #
- # This is due to PaX 'exec-protecting' the stack, and ld.so then trying
- # to make the stack executable due to some libraries not containing the
- # PT_GNU_STACK section. Bug #32960. <azarah@gentoo.org> (12 Nov 2003).
- epatch ${FILESDIR}/2.3.2/${PN}-2.3.2-dl_execstack-PaX-support.patch
-
- # Upstream patch to fix assert.h
- epatch ${FILESDIR}/2.3.2/${P}-assert.patch
-
- # This next patch fixes a test that will timeout due to ReiserFS' slow handling of sparse files
-# cd ${S}/io; epatch ${FILESDIR}/glibc-2.2.2-test-lfs-timeout.patch
-
- # This add back glibc 2.2 compadibility. See bug #8766 and #9586 for more info,
- # and also:
- #
- # http://lists.debian.org/debian-glibc/2002/debian-glibc-200210/msg00093.html
- #
- # We should think about remoing it in the future after things have settled.
- #
- # Thanks to Jan Gutter <jangutter@tuks.co.za> for reporting it.
- #
- # <azarah@gentoo.org> (26 Oct 2002).
- cd ${S}; epatch ${FILESDIR}/2.3.1/${PN}-2.3.1-ctype-compat-v3.patch
-
- # One more compat issue which breaks sun-jdk-1.3.1. See bug #8766 for more
- # info, and also:
- #
- # http://sources.redhat.com/ml/libc-alpha/2002-04/msg00143.html
- #
- # Thanks to Jan Gutter <jangutter@tuks.co.za> for reporting it.
- #
- # <azarah@gentoo.org> (30 Oct 2002).
- cd ${S}; epatch ${FILESDIR}/2.3.1/${PN}-2.3.1-libc_wait-compat.patch
-
- # One more compat issue ... libc_stack_end is missing from ld.so.
- # Got this one from diffing redhat glibc tarball .. would help if
- # they used patches and not modified tarball ...
- #
- # <azarah@gentoo.org> (7 Nov 2002).
-# cd ${S}; epatch ${FILESDIR}/2.3.1/${PN}-2.3.1-stack_end-compat.patch
-
- # The mathinline.h header omits the middle term of a ?: expression. This
- # is a gcc extension, but since the ISO standard forbids it, it's a
- # GLIBC bug (bug #27142). See also:
- #
- # http://bugs.gentoo.org/show_bug.cgi?id=27142
- #
- cd ${S}; epatch ${FILESDIR}/${PV}/${P}-fix-omitted-operand-in-mathinline_h.patch
-
- # We do not want name_insert() in iconvconfig.c to be defined inside
- # write_output() as it causes issues with PaX.
- cd ${S}; epatch ${FILESDIR}/${PV}/${P}-iconvconfig-name_insert.patch
-
- # Fix broken reverse resolving for IPv6 addresses, bug #42492.
- cd ${S}; epatch ${FILESDIR}/${PV}/${P}-ipv6-bytestring-fix.patch
-
- # A few patches only for the MIPS platform. Descriptions of what they
- # do can be found in the patch headers.
- # <tuxus@gentoo.org> thx <dragon@gentoo.org> (11 Jan 2003)
- # <kumba@gentoo.org> remove tst-rndseek-mips & ulps-mips patches
- if [[ $(tc-arch ${CTARGET}) == "mips" ]] ; then
- cd ${S}
- epatch ${FILESDIR}/2.3.1/${PN}-2.3.1-fpu-cw-mips.patch
- epatch ${FILESDIR}/2.3.1/${PN}-2.3.1-libgcc-compat-mips.patch
- epatch ${FILESDIR}/2.3.1/${PN}-2.3.1-librt-mips.patch
- epatch ${FILESDIR}/2.3.2/${P}-mips-add-n32-n64-sysdep-cancel.patch
- epatch ${FILESDIR}/2.3.2/${P}-mips-configure-for-n64-symver.patch
- epatch ${FILESDIR}/2.3.2/${P}-mips-pread-linux2.5.patch
- epatch ${FILESDIR}/2.3.2/${P}-mips-fix-nested-entend-pairs.patch
- fi
-
- if [[ $(tc-arch ${CTARGET}) == "alpha" ]] ; then
- cd ${S}
- # Fix compatability with compaq compilers by ifdef'ing out some
- # 2.3.2 additions.
- # <taviso@gentoo.org> (14 Jun 2003).
- epatch ${FILESDIR}/2.3.2/${P}-decc-compaq.patch
-
- # Fix compilation with >=gcc-3.2.3 (01 Nov 2003 agriffis)
- epatch ${FILESDIR}/2.3.2/${P}-alpha-pwrite.patch
- epatch ${FILESDIR}/2.3.2/${P}-alpha-crti.patch
-
- # Fix building with 2.6 headers #52764
- epatch ${FILESDIR}/2.3.2/${P}-alpha-sysdeps.patch
- fi
-
- if [[ $(tc-arch ${CTARGET}) == "amd64" ]] ; then
- cd ${S}; epatch ${FILESDIR}/2.3.2/${P}-amd64-nomultilib.patch
- fi
-
- if [[ $(tc-arch ${CTARGET}) == "ia64" ]] ; then
- # The basically problem is glibc doesn't store information about
- # what the kernel interface is so that it can't efficiently set up
- # parameters for system calls. This patch from H.J. Lu fixes it:
- #
- # http://sources.redhat.com/ml/libc-alpha/2003-09/msg00165.html
- #
- cd ${S}; epatch ${FILESDIR}/2.3.2/${P}-ia64-LOAD_ARGS-fixup.patch
- fi
-
- if [[ $(tc-arch ${CTARGET}) == "hppa" ]] ; then
- cd ${WORKDIR}
- unpack ${P}-hppa-patches-p1.tar.bz2
- cd ${S}
- epatch "${FILESDIR}"/2.3.4/hppa-no-pie.patch
- EPATCH_EXCLUDE="010* 020* 030* 040* 050* 055*"
- for i in ${EPATCH_EXCLUDE}
- do
- rm -f ${WORKDIR}/${P}-hppa-patches/$i
- done
- for i in ${WORKDIR}/${P}-hppa-patches/*
- do
- einfo Applying `basename $i`...
- patch -p1 < $i
- done
- einfo Applying glibc23-07-hppa-atomicity.dpatch...
- patch -p 1 < ${FILESDIR}/2.3.1/glibc23-07-hppa-atomicity.dpatch
- fi
-
- if [[ $(tc-arch ${CTARGET}) == "s390" ]] ; then
- # The deprecated ustat.h causes problems on s390
- #
- # http://sources.redhat.com/ml/bug-glibc/2003-08/msg00020.html
- #
- # Closes Bug 47415
- cd ${S}/sysdeps/unix/sysv/linux; epatch ${FILESDIR}/2.3.2/${P}-s390-deprecated-ustat-fixup.patch
- fi
-
- if [[ $(tc-arch ${CTARGET}) == "arm" ]] ; then
- cd ${S}
- # sjlj exceptions causes undefined frame variables (ported from cvs)
- epatch ${FILESDIR}/2.3.2/${P}-framestate-USING_SJLJ_EXCEPTIONS.patch
- # BUS_ISA is needed in ioperm.c but is defined in linux/input.h
- epatch ${FILESDIR}/2.3.2/${P}-arm-bus-defines.patch
- # armformat fixes the linker script creation (taken from netwinder.org glibc rpm)
- epatch ${FILESDIR}/2.3.2/${P}-armformat.patch
- fi
-
- # Fix info leakage #59526
- cd ${S}; epatch ${FILESDIR}/glibc-sec-hotfix-20040804.patch
-
- # Improved handled temporary files. bug #66358
- epatch ${FILESDIR}/2.3.3/${PN}-2.3.3-tempfile.patch
-
- # Fix permissions on some of the scripts
- chmod u+x ${S}/scripts/*.sh
-}
-
-setup_flags() {
- # Over-zealous CFLAGS can often cause problems. What may work for one person may not
- # work for another. To avoid a large influx of bugs relating to failed builds, we
- # strip most CFLAGS out to ensure as few problems as possible.
- strip-flags
- strip-unsupported-flags
-
- # -freorder-blocks for all but ia64 s390 s390x
- use ppc || append-flags "-freorder-blocks"
-
- # Sparc/Sparc64 support
- if use sparc
- then
-
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- replace-flags "-fcall-used-g7" ""
- append-flags "-fcall-used-g6"
-
- # Sparc64 Only support...
- if [ "${PROFILE_ARCH}" = "sparc64" ]
- then
-
- # Get rid of -mcpu options, the CHOST will fix this up
- replace-flags "-mcpu=ultrasparc" ""
- replace-flags "-mcpu=v9" ""
-
- # Get rid of flags known to fail
- replace-flags "-mvis" ""
-
- # Setup the CHOST properly to insure "sparcv9"
- # This passes -mcpu=ultrasparc -Wa,-Av9a to the compiler
- [ "${CHOST}" == "sparc-unknown-linux-gnu" ] && \
- export CHOST="sparcv9-unknown-linux-gnu"
- fi
- fi
-
- # We don't want these flags for glibc
- filter-flags -fomit-frame-pointer -malign-double
- filter-ldflags -pie
-
- # Lock glibc at -O2 -- linuxthreads needs it and we want to be conservative here
- append-flags -O2
- export LDFLAGS="${LDFLAGS//-Wl,--relax}"
-}
-
-src_compile() {
- local myconf=
- local myconf_nptl=
-
- setup_flags
-
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
-
- use nls || myconf="${myconf} --disable-nls"
-
- if use_nptl
- then
- local kernelheaders="$(get_KHV "`KV_to_int ${MIN_NPTL_KV}`")"
-
- # NTPL and Thread Local Storage support.
- myconf="${myconf} --with-tls --with-__thread \
- --enable-add-ons=nptl \
- --enable-kernel=${MIN_NPTL_KV} \
- --with-headers=${kernelheaders}"
- else
- myconf="${myconf} --without-__thread \
- --enable-add-ons=linuxthreads"
-
- # If we build for the build system we use the kernel headers from the target
- # We also now set it without "build" as well, else it might use the
- # current kernel's headers, which might just fail (the linux-headers
- # package is usually well tested...)
-# ( use build || use sparc ) \
-# && myconf="${myconf} --with-headers=${ROOT}usr/include"
- myconf="${myconf} --with-headers=${ROOT}usr/include"
-
- # If kernel version and headers in ${ROOT}/usr/include are ok,
- # then enable --enable-kernel=${MIN_KV} ...
- if [ "`get_KV`" -ge "`KV_to_int ${MIN_KV}`" -a \
- -n "$(get_KHV "`KV_to_int ${MIN_KV}`" "${ROOT}/usr/include")" ]
- then
- myconf="${myconf} --enable-kernel=${MIN_KV}"
- else
- myconf="${myconf} --enable-kernel=2.2.5"
- fi
- fi
-
- # some silly people set LD_RUN_PATH and that breaks things.
- # see bug 19043
- unset LD_RUN_PATH
-
- einfo "Configuring GLIBC..."
- rm -rf ${S}/buildhere
- mkdir -p ${S}/buildhere
- cd ${S}/buildhere
- ../configure --build=${CHOST} \
- --host=${CHOST} \
- --with-gd=no \
- --without-cvs \
- --disable-profile \
- --prefix=/usr \
- --mandir=/usr/share/man \
- --infodir=/usr/share/info \
- --libexecdir=/usr/lib/misc \
- ${myconf} || die
-
- einfo "Building GLIBC..."
- cd ${S}/buildhere
- make PARALLELMFLAGS="${MAKEOPTS}" || die
-# einfo "Doing GLIBC checks..."
-# make check
-}
-
-src_test() {
- # This is wrong, but glibc's tests fail bad when screwing
- # around with sandbox, so lets just punt it
- unset LD_PRELOAD
-
- cd ${S}/buildhere
- make check || die "make check failed :("
-}
-
-src_install() {
- local buildtarget="buildhere"
-
- setup_flags
-
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
-
- einfo "Installing GLIBC..."
- make PARALLELMFLAGS="${MAKEOPTS}" \
- install_root=${D} \
- install -C ${buildtarget} || die
- # now, strip everything but the thread libs #46186
- mkdir ${T}/thread-backup
- mv ${D}/lib/lib{pthread,thread_db}* ${T}/thread-backup/
- env -uRESTRICT CHOST=${CTARGET} prepallstrip
- mv ${T}/thread-backup/* ${D}/lib/
-
- # If librt.so is a symlink, change it into linker script (Redhat)
- if [ -L "${D}/usr/lib/librt.so" -a "${LIBRT_LINKERSCRIPT}" = "yes" ]
- then
- local LIBRTSO="`cd ${D}/lib; echo librt.so.*`"
- local LIBPTHREADSO="`cd ${D}/lib; echo libpthread.so.*`"
-
- rm -f ${D}/usr/lib/librt.so
- cat > ${D}/usr/lib/librt.so <<EOF
-/* GNU ld script
- librt.so.1 needs libpthread.so.0 to come before libc.so.6*
- in search scope. */
-EOF
- grep "OUTPUT_FORMAT" ${D}/usr/lib/libc.so >> ${D}/usr/lib/librt.so
- echo "GROUP ( /lib/${LIBPTHREADSO} /lib/${LIBRTSO} )" \
- >> ${D}/usr/lib/librt.so
-
- for x in ${D}/usr/lib/librt.so.[1-9]
- do
- [ -L "${x}" ] && rm -f ${x}
- done
- fi
-
- if ! use build
- then
- if ! has noinfo ${FEATURES} ; then
- einfo "Installing Info pages..."
- make PARALLELMFLAGS="${MAKEOPTS}" \
- install_root=${D} \
- info -C ${buildtarget} || die
- fi
-
- setup_locales
-
- einfo "Installing man pages and docs..."
- # Install linuxthreads man pages
- use_nptl || {
- dodir /usr/share/man/man3
- doman ${S}/man/*.3thr
- }
-
- # Install nscd config file
- insinto /etc ; doins ${FILESDIR}/nscd.conf
- exeinto /etc/init.d ; doexe ${FILESDIR}/nscd
- doins "${FILESDIR}"/nsswitch.conf
-
- dodoc BUGS ChangeLog* CONFORMANCE FAQ INTERFACE \
- NEWS NOTES PROJECTS README*
- else
- rm -rf ${D}/usr/share ${D}/usr/lib/gconv
-
- einfo "Installing Timezone data..."
- make PARALLELMFLAGS="${MAKEOPTS}" \
- install_root=${D} \
- timezone/install-others -C ${buildtarget} || die
- fi
- insinto /etc
- # This is our new config file for building locales
- doins ${FILESDIR}/locales.build
-
- # Is this next line actually needed or does the makefile get it right?
- # It previously has 0755 perms which was killing things.
- fperms 4755 /usr/lib/misc/pt_chown
-
- # Currently libraries in /usr/lib/gconv do not get loaded if not
- # in search path ...
-# insinto /etc/env.d
-# doins ${FILESDIR}/03glibc
-
- rm -f ${D}/etc/ld.so.cache
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f ${D}/etc/localtime
-
- # Some things want this, notably ash.
- dosym /usr/lib/libbsd-compat.a /usr/lib/libbsd.a
-}
-
-pkg_preinst() {
- # Shouldnt need to keep this updated
- [[ -e ${ROOT}/etc/locales.build ]] && rm -f "${D}"/etc/locales.build
-}
-
-pkg_postinst() {
- # Correct me if I am wrong here, but my /etc/localtime is a file
- # created by zic ....
- # I am thinking that it should only be recreated if no /etc/localtime
- # exists, or if it is an invalid symlink.
- #
- # For invalid symlink:
- # -f && -e will fail
- # -L will succeed
- #
- if [ ! -e ${ROOT}/etc/localtime ]
- then
- echo "Please remember to set your timezone using the zic command."
- rm -f ${ROOT}/etc/localtime
- ln -s ../usr/share/zoneinfo/Factory ${ROOT}/etc/localtime
- fi
-
- if [ -x ${ROOT}/usr/sbin/iconvconfig ]
- then
- # Generate fastloading iconv module configuration file.
- ${ROOT}/usr/sbin/iconvconfig --prefix=${ROOT}
- fi
-
- # Reload init ...
- if [ "${ROOT}" = "/" ]
- then
- /sbin/telinit U &> /dev/null
- fi
-}
diff --git a/sys-libs/glibc/glibc-2.3.5-r3.ebuild b/sys-libs/glibc/glibc-2.3.5-r3.ebuild
deleted file mode 100644
index 847a1b7df736..000000000000
--- a/sys-libs/glibc/glibc-2.3.5-r3.ebuild
+++ /dev/null
@@ -1,1285 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5-r3.ebuild,v 1.38 2009/12/10 01:31:25 vapier Exp $
-
-# 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/
-
-KEYWORDS="-* alpha amd64 arm -hppa ia64 m68k mips ppc ~s390 sh sparc x86"
-
-BRANCH_UPDATE=""
-
-# From linuxthreads/man
-GLIBC_MANPAGE_VERSION="2.3.5"
-
-# From manual
-GLIBC_INFOPAGE_VERSION="2.3.5"
-
-# Gentoo patchset
-PATCH_VER="1.16"
-
-# C Stubbs addon (contained in fedora, so ignoring)
-#CSTUBS_VER="2.1.2"
-#CSTUBS_TARBALL="c_stubs-${CSTUBS_VER}.tar.bz2"
-#CSTUBS_URI="mirror://gentoo/${CSTUBS_TARBALL}"
-
-# Fedora addons (from RHEL's glibc-2.3.4-2.src.rpm)
-FEDORA_VER="20041219T2331"
-FEDORA_TARBALL="glibc-fedora-${FEDORA_VER}.tar.bz2"
-FEDORA_URI="mirror://gentoo/${FEDORA_TARBALL}"
-
-GENTOO_TOOLCHAIN_BASE_URI="mirror://gentoo"
-
-### PUNT OUT TO ECLASS?? ###
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-LICENSE="LGPL-2"
-
-IUSE="nls build nptl nptlonly erandom hardened userlocales multilib selinux glibc-compat20 glibc-omitfp linuxthreads-tls profile"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- PROVIDE="virtual/libc"
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-
-GLIBC_RELEASE_VER=$(get_version_component_range 1-3)
-
-# Don't set this to :-, - allows BRANCH_UPDATE=""
-BRANCH_UPDATE=${BRANCH_UPDATE-$(get_version_component_range 4)}
-
-# (Recent snapshots fails with 2.6.5 and earlier with NPTL)
-NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-"2.6.6"}
-LT_KERNEL_VERSION=${LT_KERNEL_VERSION:-"2.4.1"}
-
-### SRC_URI ###
-
-# This function handles the basics of setting the SRC_URI for a glibc ebuild.
-# To use, set SRC_URI with:
-#
-# SRC_URI="$(get_glibc_src_uri)"
-#
-# Other than the variables normally set by portage, this function's behavior
-# can be altered by setting the following:
-#
-# GENTOO_TOOLCHAIN_BASE_URI
-# This sets the base URI for all gentoo-specific patch files. Note
-# that this variable is only important for a brief period of time,
-# before your source files get picked up by mirrors. However, it is
-# still highly suggested that you keep files in this location
-# available.
-#
-# BRANCH_UPDATE
-# If set, this variable signals that we should be using the main
-# release tarball (determined by ebuild version) and applying a
-# CVS branch update patch against it. The location of this branch
-# update patch is assumed to be in ${GENTOO_TOOLCHAIN_BASE_URI}.
-# Just like with SNAPSHOT, this variable is ignored if the ebuild
-# has a _pre suffix.
-#
-# PATCH_VER
-# PATCH_GLIBC_VER
-# This should be set to the version of the gentoo patch tarball.
-# The resulting filename of this tarball will be:
-# glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
-#
-# GLIBC_MANPAGE_VERSION
-# GLIBC_INFOPAGE_VERSION
-# The version of glibc for which we will download pages. This will
-# default to ${GLIBC_RELEASE_VER}, but we may not want to pre-generate man pages
-# for prerelease test ebuilds for example. This allows you to
-# continue using pre-generated manpages from the last stable release.
-# If set to "none", this will prevent the downloading of manpages,
-# which is useful for individual library targets.
-#
-get_glibc_src_uri() {
- GENTOO_TOOLCHAIN_BASE_URI=${GENTOO_TOOLCHAIN_BASE_URI:-"mirror://gentoo"}
-
-# GLIBC_SRC_URI="http://ftp.gnu.org/gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
-# http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-${GLIBC_RELEASE_VER}.tar.bz2
-# http://ftp.gnu.org/gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2
- GLIBC_SRC_URI="mirror://gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-linuxthreads-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2"
-
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2"
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2"
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2"
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2"
- fi
-
- if [[ -n ${CSTUBS_URI} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI} ${CSTUBS_URI}"
- fi
-
- if [[ -n ${FEDORA_URI} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI} ${FEDORA_URI}"
- fi
-
- echo "${GLIBC_SRC_URI}"
-}
-
-SRC_URI=$(get_glibc_src_uri)
-S=${WORKDIR}/glibc-${GLIBC_RELEASE_VER}
-
-### EXPORTED FUNCTIONS ###
-toolchain-glibc_src_unpack() {
- # Check NPTL support _before_ we unpack things to save some time
- want_nptl && check_nptl_support
-
- unpack glibc-${GLIBC_RELEASE_VER}.tar.bz2
-
- cd "${S}"
- unpack glibc-linuxthreads-${GLIBC_RELEASE_VER}.tar.bz2
- unpack glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2
-
- [[ -n ${CSTUBS_TARBALL} ]] && unpack ${CSTUBS_TARBALL}
- [[ -n ${FEDORA_TARBALL} ]] && unpack ${FEDORA_TARBALL}
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${WORKDIR}"
- unpack glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- fi
-
- # XXX: We should do the branchupdate, before extracting the manpages and
- # infopages else it does not help much (mtimes change if there is a change
- # to them with branchupdate)
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- cd "${S}"
- epatch "${DISTDIR}"/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
-
- # Snapshot date patch
- einfo "Patching version to display snapshot date ..."
- sed -i -e "s:\(#define RELEASE\).*:\1 \"${BRANCH_UPDATE}\":" version.h
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- cd "${WORKDIR}"
- unpack glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- cd "${S}"
- unpack glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${S}"
- EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset ${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-${PATCH_VER} ..." \
- EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \
- EPATCH_SUFFIX="patch" \
- ARCH=$(tc-arch) \
- epatch "${WORKDIR}"/patches
- fi
-}
-
-toolchain-glibc_src_compile() {
- # Set gconvdir to /usr/$(get_libdir)/gconv on archs with multiple ABIs
- local MAKEFLAGS=""
- has_multilib_profile && MAKEFLAGS="gconvdir=$(alt_usrlibdir)/gconv"
-
- echo
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
- echo
-
- if want_linuxthreads ; then
- glibc_do_configure linuxthreads
- einfo "Building GLIBC with linuxthreads..."
- make PARALLELMFLAGS="${MAKEOPTS}" ${MAKEFLAGS} || die
- fi
- if want_nptl ; then
- # ... and then do the optional nptl build
- unset LD_ASSUME_KERNEL
- glibc_do_configure nptl
- einfo "Building GLIBC with NPTL..."
- make PARALLELMFLAGS="${MAKEOPTS}" ${MAKEFLAGS} || die
- fi
-}
-
-toolchain-glibc_src_test() {
- # This is wrong, but glibc's tests fail bad when screwing
- # around with sandbox, so lets just punt it
- unset LD_PRELOAD
-
- # do the linuxthreads build unless we're using nptlonly
- if want_linuxthreads ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
- einfo "Checking GLIBC with linuxthreads..."
- make check || die "linuxthreads glibc did not pass make check"
- fi
- if want_nptl ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- unset LD_ASSUME_KERNEL || :
- einfo "Checking GLIBC with NPTL..."
- make check || die "nptl glibc did not pass make check"
- fi
-}
-
-toolchain-glibc_pkg_preinst() {
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && ! { want_nptl && want_linuxthreads; }; then
- addwrite "${ROOT}"/$(alt_libdir)/
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # Shouldnt need to keep this updated
- [[ -e ${ROOT}/etc/locales.build ]] && rm -f "${D}"/etc/locales.build
-}
-
-toolchain-glibc_src_install() {
- # Need to dodir first because it might not exist (bad amd64 profiles)
- dodir $(alt_usrlibdir)
-
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
-
- if want_linuxthreads ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
- einfo "Installing GLIBC ${ABI} with linuxthreads ..."
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${D}" \
- install || die
- else # nptlonly
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- einfo "Installing GLIBC ${ABI} with NPTL ..."
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${D}" \
- install || die
- fi
-
- if is_crosscompile ; then
- # punt all the junk not needed by a cross-compiler
- rm -rf "${D}"$(alt_prefix)/{bin,etc,$(get_libdir)/{gconv,misc},sbin,share}
- else
- # zoneinfo stuff is now provided by the timezone-data package
- rm -rf "${D}"/usr/share/zoneinfo
- rm -f "${D}"/usr/bin/tzselect
- rm -f "${D}"/usr/sbin/{zic,zdump}
- fi
-
- if want_linuxthreads && want_nptl ; then
- einfo "Installing NPTL to $(alt_libdir)/tls/..."
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- mkdir -p "${D}"$(alt_libdir)/tls/
-
- libcsofile=$(basename "${D}"$(alt_libdir)/libc-*.so)
- cp -a libc.so "${D}"$(alt_libdir)/tls/${libcsofile} || die
- dosym ${libcsofile} $(alt_libdir)/tls/$(ls libc.so.*)
-
- libmsofile=$(basename "${D}"$(alt_libdir)/libm-*.so)
- pushd math > /dev/null
- cp -a libm.so "${D}"$(alt_libdir)/tls/${libmsofile} || die
- dosym ${libmsofile} $(alt_libdir)/tls/$(ls libm.so.*)
- popd > /dev/null
-
- librtsofile=$(basename "${D}"$(alt_libdir)/librt-*.so)
- pushd rt > /dev/null
- cp -a librt.so "${D}"$(alt_libdir)/tls/${librtsofile} || die
- dosym ${librtsofile} $(alt_libdir)/tls/$(ls librt.so.*)
- popd > /dev/null
-
- libthreaddbsofile=$(basename "${D}"$(alt_libdir)/libthread_db-*.so)
- pushd nptl_db > /dev/null
- cp -a libthread_db.so "${D}"$(alt_libdir)/tls/${libthreaddbsofile} || die
- dosym ${libthreaddbsofile} $(alt_libdir)/tls/$(ls libthread_db.so.*)
- popd > /dev/null
-
- libpthreadsofile=libpthread-${GLIBC_RELEASE_VER}.so
- cp -a nptl/libpthread.so "${D}"$(alt_libdir)/tls/${libpthreadsofile} || die
- dosym ${libpthreadsofile} $(alt_libdir)/tls/libpthread.so.0
-
- # and now for the static libs
- mkdir -p "${D}"$(alt_usrlibdir)/nptl
- cp -a libc.a nptl/libpthread.a nptl/libpthread_nonshared.a rt/librt.a \
- "${D}"$(alt_usrlibdir)/nptl
-
- # linker script crap
- for lib in libc libpthread; do
- sed -e "s:$(alt_libdir)/${lib}.so:$(alt_libdir)/tls/${lib}.so:g" \
- -e "s:$(alt_usrlibdir)/${lib}_nonshared.a:$(alt_usrlibdir)/nptl/${lib}_nonshared.a:g" \
- "${D}"$(alt_usrlibdir)/${lib}.so \
- > "${D}"$(alt_usrlibdir)/nptl/${lib}.so
-
- chmod 755 "${D}"$(alt_usrlibdir)/nptl/${lib}.so
- done
-
- dosym ../librt.so $(alt_usrlibdir)/nptl/librt.so
-
- # last but not least... headers.
- mkdir -p "${D}"/nptl "${D}"$(alt_headers)/nptl
- make install_root="${D}"/nptl install-headers PARALLELMFLAGS="${MAKEOPTS} -j1"
- pushd "${D}"/nptl/$(alt_headers) > /dev/null
- for i in $(find . -type f) ; do
- if ! [[ -f ${D}$(alt_headers)/$i ]] \
- || ! cmp -s $i ${D}$(alt_headers)/$i; then
- mkdir -p ${D}$(alt_headers)/nptl/`dirname $i`
- cp -a $i ${D}$(alt_headers)/nptl/$i
- fi
- done
- popd > /dev/null
- rm -rf ${D}/nptl
- fi
-
- # We'll take care of the cache ourselves
- rm -f ${D}/etc/ld.so.cache
-
- # Some things want this, notably ash.
- dosym libbsd-compat.a $(alt_usrlibdir)/libbsd.a
-
- # Handle includes for different ABIs
- prep_ml_includes $(alt_headers)
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install the sys-include symlink so that when
- # we build a 2nd stage cross-compiler, gcc finds the target
- # system headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym include $(alt_prefix)/sys-include
- dosym . $(alt_prefix)/usr
- return 0
- fi
-
- # Everything past this point just needs to be done once... don't waste time building locale files twice...
- is_final_abi || return 0
-
- if want_linuxthreads ; then
- MYMAINBUILDDIR=build-${ABI}-${CTARGET}-linuxthreads
- else
- MYMAINBUILDDIR=build-${ABI}-${CTARGET}-nptl
- fi
- cd "${WORKDIR}"/${MYMAINBUILDDIR}
- if ! use build ; then
- if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- einfo "Installing info pages..."
-
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root=${D} \
- info -i
- fi
-
- setup_locales
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- einfo "Installing man pages..."
-
- # Install linuxthreads man pages even if nptl is enabled
- cd "${WORKDIR}"/man
- doman *.3thr
- fi
-
- # Install nscd config file
- insinto /etc
- doins ${FILESDIR}/nscd.conf
- doins "${FILESDIR}"/nsswitch.conf
-
- doinitd "${FILESDIR}"/nscd
-
- cd ${S}
- dodoc BUGS ChangeLog* CONFORMANCE FAQ INTERFACE NEWS NOTES PROJECTS README*
- else
- rm -rf ${D}/usr/share
- for dir in $(get_all_libdirs); do
- rm -rf ${D}/usr/${dir}/gconv &> /dev/null
- done
-
- einfo "Installing Timezone data..."
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root=${D} \
- timezone/install-others || die
- fi
-
- # Is this next line actually needed or does the makefile get it right?
- # It previously has 0755 perms which was killing things.
- fperms 4711 $(alt_prefix)/lib/misc/glibc/pt_chown
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f ${D}/etc/localtime
-
- insinto /etc
- # This is our new config file for building locales
- doins ${FILESDIR}/locales.build
- # example host.conf with multicast dns disabled by default
- doins ${FILESDIR}/2.3.4/host.conf
-
- # simple test to make sure our new glibc isnt completely broken.
- # for now, skip the multilib scenario. also make sure we don't
- # test with statically built binaries since they will fail.
- [[ ${CBUILD} != ${CHOST} ]] && return 0
- [[ $(get_libdir) != "lib" ]] && return 0
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest/statically linked} != "${striptest}" ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
-
-toolchain-glibc_pkg_postinst() {
- # Mixing nptlonly and -nptlonly glibc can prove dangerous if libpthread
- # isn't removed in unmerge which happens sometimes. See bug #87671
- if ! is_crosscompile && want_linuxthreads ; then
- for libdir in $(get_all_libdirs) ; do
- for f in ${ROOT}/${libdir}/libpthread-2.* ${ROOT}/${libdir}/libpthread-0.6* ; do
- if [[ -f ${f} ]] ; then
- rm -f ${f}
- ldconfig
- fi
- done
- done
- fi
-
- if ! is_crosscompile && [ -x "${ROOT}/usr/sbin/iconvconfig" ] ; then
- # Generate fastloading iconv module configuration file.
- ${ROOT}/usr/sbin/iconvconfig --prefix=${ROOT}
- fi
-
- if [ ! -e "${ROOT}/lib/ld.so.1" ] && use ppc64 && ! has_multilib_profile ; then
- ## SHOULDN'T THIS BE lib64??
- ln -s ld64.so.1 ${ROOT}/lib/ld.so.1
- fi
-
- # Reload init ...
- if ! is_crosscompile && [ "${ROOT}" = "/" ] ; then
- /sbin/telinit U &> /dev/null
- fi
-
- # warn the few multicast-dns-by-default users we've had about the change
- # in behavior...
- echo
- einfo "Gentoo's glibc now disables multicast dns by default in our"
- einfo "example host.conf. To re-enable this functionality, simply"
- einfo "remove the line that disables it (mdns off)."
- echo
-
- if want_nptl && want_linuxthreads ; then
- einfo "The default behavior of glibc on your system is to use NPTL. If"
- einfo "you want to use linuxthreads for a particular program, start it"
- einfo "by executing 'LD_ASSUME_KERNEL=${LT_KERNEL_VERSION} <program> [<options>]'"
- echo
- fi
-}
-
-### SUPPORT FUNCTIONS ###
-# We need to be able to set alternative headers for
-# compiling for non-native platform
-# Will also become useful for testing kernel-headers without screwing up
-# the whole system.
-# note: intentionally undocumented.
-alt_headers() {
- if [[ -z ${ALT_HEADERS} ]] ; then
- if is_crosscompile ; then
- ALT_HEADERS="/usr/${CTARGET}/include"
- else
- ALT_HEADERS="/usr/include"
- fi
- fi
- echo "${ALT_HEADERS}"
-}
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS=$(alt_headers)
- tc-is-cross-compiler && ALT_BUILD_HEADERS=${ROOT}$(alt_headers)
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_prefix() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}
- else
- echo /usr
- fi
-}
-
-alt_libdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /$(get_libdir)
- fi
-}
-
-alt_usrlibdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /usr/$(get_libdir)
- fi
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- strip-unsupported-flags
- filter-flags -m32 -m64 -mabi=*
-
- unset CBUILD_OPT CTARGET_OPT
- if has_multilib_profile ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- case $(tc-arch) in
- amd64)
- # Punt this when amd64's 2004.3 is removed
- CFLAGS_x86="-m32"
- ;;
- ppc)
- append-flags "-freorder-blocks"
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
- filter-flags "-mvis"
-
- if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
- case ${ABI} in
- sparc64)
- filter-flags -Wa,-xarch -Wa,-A
-
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparc64b-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9b"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
- else
- CTARGET_OPT="sparc64-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9a"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a"
- fi
- ;;
- *)
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- else
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- ;;
- esac
- else
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- elif { is_crosscompile && want_nptl; } || is-flag "-mcpu=ultrasparc2" || is-flag "-mcpu=ultrasparc"; then
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- fi
- ;;
- esac
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- if $(tc-getCC ${CTARGET}) -v 2>&1 | grep -q 'gcc version 3.[0123]'; then
- append-flags -finline-limit=2000
- fi
-
- # We don't want these flags for glibc
- filter-ldflags -pie
-
- # Lock glibc at -O2 -- linuxthreads needs it and we want to be
- # conservative here
- filter-flags -O?
- append-flags -O2
-}
-
-check_kheader_version() {
- local header="$(alt_build_headers)/linux/version.h"
-
- [[ -z $1 ]] && return 1
-
- if [ -f "${header}" ] ; then
- local version="`grep 'LINUX_VERSION_CODE' ${header} | \
- sed -e 's:^.*LINUX_VERSION_CODE[[:space:]]*::'`"
-
- if [ "${version}" -ge "$1" ] ; then
- return 0
- fi
- fi
-
- return 1
-}
-
-check_nptl_support() {
- local min_kernel_version="$(KV_to_int "${NPTL_KERNEL_VERSION}")"
-
- echo
-
- einfon "Checking gcc for __thread support ... "
- if want__thread ; then
- echo "yes"
- else
- echo "no"
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "please update to gcc-3.2.2-r1 or later, and try again."
- die "No __thread support in gcc!"
- fi
-
- # Building fails on an non-supporting kernel
- einfon "Checking kernel version (>=${NPTL_KERNEL_VERSION}) ... "
- if [ "`get_KV`" -lt "${min_kernel_version}" ] ; then
- echo "no"
- echo
- eerror "You need a kernel of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "Kernel version too low!"
- else
- echo "yes"
- fi
-
- # Building fails with too low linux-headers
- einfon "Checking linux-headers version (>=${NPTL_KERNEL_VERSION}) ... "
- if ! check_kheader_version "${min_kernel_version}"; then
- echo "no"
- echo
- eerror "You need linux-headers of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "linux-headers version too low!"
- else
- echo "yes"
- fi
-
- echo
-}
-
-want_nptl() {
- want_tls || return 1
- use nptl || return 1
-
- # Archs that can use NPTL
- case $(tc-arch) in
- alpha|amd64|ia64|mips|ppc|ppc64|s390|sh|x86)
- return 0;
- ;;
- sparc)
- # >= v9 is needed for nptl.
- [[ "${PROFILE_ARCH}" == "sparc" ]] && return 1
- return 0;
- ;;
- esac
-
- return 1
-}
-
-want_linuxthreads() {
- ! use nptlonly && return 0
- want_nptl || return 0
- return 1
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- alpha|amd64|ia64|mips|ppc|ppc64|s390|sh)
- return 0;
- ;;
- sparc)
- # 2.3.6 should have tls support on sparc64
- # when using newer binutils
- case ${CTARGET/-*} in
- sparc64*) return 1 ;;
- *) return 0 ;;
- esac
- ;;
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- ;;
- esac
-
- return 1
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- $(tc-getCC ${CTARGET}) -c ${FILESDIR}/test-__thread.c -o ${T}/test2.o &> /dev/null
- WANT__THREAD=$?
-
- return ${WANT__THREAD}
-}
-
-install_locales() {
- unset LANGUAGE LANG LC_ALL
- cd "${WORKDIR}"/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}"
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root=${D} localedata/install-locales || die
-}
-
-setup_locales() {
- if use !userlocales ; then
- einfo "userlocales not enabled, installing -ALL- locales..."
- install_locales || die
- elif [ -e /etc/locales.build ] ; then
- einfo "Installing locales in /etc/locales.build..."
- echo 'SUPPORTED-LOCALES=\' > SUPPORTED.locales
- cat /etc/locales.build | grep -v -e ^$ -e ^\# | sed 's/$/\ \\/g' \
- >> SUPPORTED.locales
- cat SUPPORTED.locales > ${S}/localedata/SUPPORTED || die
- install_locales || die
- elif [ -e ${FILESDIR}/locales.build ] ; then
- einfo "Installing locales in ${FILESDIR}/locales.build..."
- echo 'SUPPORTED-LOCALES=\' > SUPPORTED.locales
- cat ${FILESDIR}/locales.build | grep -v -e ^$ -e ^\# | sed 's/$/\ \\/g' \
- >> SUPPORTED.locales
- cat SUPPORTED.locales > ${S}/localedata/SUPPORTED || die
- install_locales || die
- else
- einfo "Installing -ALL- locales..."
- install_locales || die
- fi
-}
-
-glibc_do_configure() {
- local myconf
-
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
- # silly users
- unset LD_RUN_PATH
-
- # set addons
- pushd ${S} > /dev/null
- ADDONS=$(echo */configure | sed -e 's!/configure!!g;s!\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)!!g;s! \+$!!;s! !,!g;s!^!,!;/^,\*$/d')
- use glibc-compat20 && [[ -d glibc-compat ]] && ADDONS="${ADDONS},glibc-compat"
- popd > /dev/null
-
- use nls || myconf="${myconf} --disable-nls"
- use erandom || myconf="${myconf} --disable-dev-erandom"
-
- use glibc-omitfp && myconf="${myconf} --enable-omitfp"
-
- [[ ${CTARGET} == *-softfloat-* ]] && myconf="${myconf} --without-fp"
-
- if [ "$1" == "linuxthreads" ] ; then
- if want_tls && [[ ${CTARGET} != i[45]86-* ]] ; then
- myconf="${myconf} --with-tls"
-
- if want__thread && use linuxthreads-tls ; then
- myconf="${myconf} --with-__thread"
- else
- myconf="${myconf} --without-__thread"
- fi
- else
- myconf="${myconf} --without-tls --without-__thread"
- fi
-
- myconf="${myconf} --enable-add-ons=linuxthreads${ADDONS}"
- myconf="${myconf} --enable-kernel=${LT_KERNEL_VERSION}"
- elif [ "$1" == "nptl" ] ; then
- myconf="${myconf} --with-tls --with-__thread"
- myconf="${myconf} --enable-add-ons=nptl${ADDONS}"
- myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}"
- else
- die "invalid pthread option"
- fi
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. ! USE build
- # 3. only for the primary ABI on multilib systems
- if use selinux && ! use build; then
- if use multilib || has_multilib_profile; then
- if is_final_abi; then
- myconf="${myconf} --with-selinux"
- else
- myconf="${myconf} --without-selinux"
- fi
- else
- myconf="${myconf} --with-selinux"
- fi
- else
- myconf="${myconf} --without-selinux"
- fi
-
- # Pick out the correct location for build headers
- myconf="${myconf}
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- --without-gd
- --with-headers=$(alt_build_headers)
- --prefix=$(alt_prefix)
- --mandir=$(alt_prefix)/share/man
- --infodir=$(alt_prefix)/share/info
- --libexecdir=$(alt_prefix)/lib/misc/glibc
- ${EXTRA_ECONF}"
-
- has_version app-admin/eselect-compiler || export CC="$(tc-getCC ${CTARGET})"
-
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1
- mkdir -p ${GBUILDDIR}
- cd ${GBUILDDIR}
- einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}"
- ${S}/configure ${myconf} || die "failed to configure glibc"
-}
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- addwrite ${ROOT}/
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- addwrite ${ROOT}/usr
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- addwrite ${ROOT}/usr/X11R6
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-use_multilib() {
- case ${CTARGET} in
- sparc64*|mips64*|x86_64*|powerpc64*|s390x*)
- has_multilib_profile || use multilib ;;
- *) false ;;
- esac
-}
-
-# Setup toolchain variables that would be defined in the profiles for these archs.
-setup_env() {
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET}
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
- # and fall back on CFLAGS.
- local VAR=CFLAGS_${CTARGET//[-.]/_}
- CFLAGS=${!VAR-${CFLAGS}}
- fi
-
- setup_flags
-
- export ABI=${ABI:-${DEFAULT_ABI:-default}}
-
- if is_crosscompile || tc-is-cross-compiler ; then
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because
- # glibc's configure script checks CFLAGS for some targets (like mips)
- export CFLAGS="${!VAR} ${CFLAGS}"
- fi
-}
-
-### /ECLASS PUNTAGE ###
-
-if is_crosscompile ; then
- SLOT="${CTARGET}-2.2"
-else
- SLOT="2.2"
-fi
-
-# we'll handle stripping ourself #46186
-RESTRICT="strip"
-EMULTILIB_PKG="true"
-
-# We need new cleanup attribute support from gcc for NPTL among things ...
-# We also need linux26-headers if using NPTL. Including kernel headers is
-# incredibly unreliable, and this new linux-headers release from plasmaroo
-# should work with userspace apps, at least on amd64 and ppc64.
-#
-# We need a new-enough binutils for as-needed
-DEPEND=">=sys-devel/gcc-3.2.3-r1
- nptl? ( >=sys-devel/gcc-3.3.1-r1 >=sys-kernel/linux-headers-${NPTL_KERNEL_VERSION} )
- >=sys-devel/binutils-2.15
- >=sys-devel/gcc-config-1.3.9
- virtual/os-headers
- nls? ( sys-devel/gettext )
- selinux? ( !build? ( sys-libs/libselinux ) )"
-RDEPEND="nls? ( sys-devel/gettext )
- selinux? ( !build? ( sys-libs/libselinux ) )"
-
-if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
-
- if [[ ${CATEGORY} == *-linux* ]] ; then
- if [[ ${CATEGORY/mips} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} >=${CATEGORY}/mips-headers-2.6.10"
- else
- DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
- fi
- fi
-else
- DEPEND="${DEPEND} sys-libs/timezone-data"
- RDEPEND="${RDEPEND} sys-libs/timezone-data"
-fi
-
-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
- fi
-
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
-
- # give some sort of warning about the nptl logic changes...
- if want_nptl && want_linuxthreads ; then
-
- ewarn "Warning! Gentoo's GLIBC with NPTL enabled now behaves like the"
- ewarn "glibc from almost every other distribution out there. This means"
- ewarn "that glibc is compiled -twice-, once with linuxthreads and once"
- ewarn "with nptl. The NPTL version is installed to lib/tls and is still"
- ewarn "used by default. If you do not need nor want the linuxthreads"
- ewarn "fallback, you can disable this behavior by adding nptlonly to"
- ewarn "USE to save yourself some compile time."
-
- ebeep
- epause 5
- fi
-}
-
-src_unpack() {
- setup_env
-
- case $(tc-arch) in
- hppa)
- GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 2000-all-2.3.2-propolice-guard-functions-v3.patch"
- use hardened || GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 6490_hppa_hardened-disable__init_arrays.patch"
- ;;
- mips)
- GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 3000-all-2.3.4-dl_execstack-PaX-support.patch"
- use_multilib \
- && GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 6680_mips_nolib3264.patch" \
- || GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 5005_all_enable-multilib-with-cross-compile.patch"
- ;;
- amd64)
- if ! has_multilib_profile && ! is_crosscompile ; then
- # the gentoo-libdir patch hack conflicts with these
- GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 5005_all_enable-multilib-with-cross-compile.patch"
- fi
- ;;
- esac
-
- GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 5020_all_nomalloccheck.patch"
-
- toolchain-glibc_src_unpack
-
- # XXX: do not package ssp up into tarballs, leave it in FILESDIR
- cd "${S}"
- cp "${FILESDIR}"/2.3.5/ssp.c sysdeps/unix/sysv/linux/ || die "could not find ssp.c"
- rm -f "${WORKDIR}"/patches/2*
- epatch "${FILESDIR}"/2.3.5/glibc-2.3.5-propolice-guard-functions.patch
- epatch "${FILESDIR}"/2.3.5/glibc-2.3.5-frandom-detect.patch
-
- case $(tc-arch) in
- alpha)
- # Is this still needed?
- rm -f sysdeps/alpha/alphaev6/memcpy.S
- ;;
- amd64)
- if ! has_multilib_profile && ! is_crosscompile; then
- # CONF_LIBDIR support
- epatch ${FILESDIR}/2.3.4/glibc-gentoo-libdir.patch
- sed -i -e "s:@GENTOO_LIBDIR@:$(get_libdir):g" ${S}/sysdeps/unix/sysv/linux/configure
- fi
- ;;
- ppc64)
- # setup lib -- seems like a good place to set this up
- has_multilib_profile || get_libdir_override lib64
- ;;
- esac
-
- # Glibc is stupid sometimes, and doesn't realize that with a
- # static C-Only gcc, -lgcc_eh doesn't exist.
- # http://sources.redhat.com/ml/libc-alpha/2003-09/msg00100.html
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- echo 'int main(){}' > ${T}/gcc_eh_test.c
- if ! $(tc-getCC ${CTARGET}) ${T}/gcc_eh_test.c -lgcc_eh 2>/dev/null ; then
- sed -i -e 's:-lgcc_eh::' Makeconfig || die "sed gcc_eh"
- fi
-
- # Some configure checks fail on the first emerge through because they
- # try to link. This doesn't work well if we don't have a libc yet.
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- if is_crosscompile && use build; then
- rm ${S}/sysdeps/sparc/sparc64/elf/configure{,.in}
- rm ${S}/nptl/sysdeps/pthread/configure{,.in}
- fi
-
- cd "${WORKDIR}"
- find . -type f '(' -size 0 -o -name "*.orig" ')' -exec rm -f {} \;
- find . -name configure -exec touch {} \;
-
- # Fix permissions on some of the scripts
- chmod u+x "${S}"/scripts/*.sh
-}
-
-src_compile() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Building multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_compile
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
- fi
-
- toolchain-glibc_src_compile
-}
-
-src_test() {
- setup_env
-
- if [[ -z ${OABI} ]] && has_multilib_profile ; then
- OABI=${ABI}
- einfo "Testing multilib glibc for ABIs: $(get_install_abis)"
- for ABI in $(get_install_abis) ; do
- export ABI
- einfo " Testing ${ABI} glibc"
- src_test
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
-
- toolchain-glibc_src_test
-}
-
-src_strip() {
- # Now, strip everything but the thread libs #46186, as well as the dynamic
- # linker, else we cannot set breakpoints in shared libraries due to bugs in
- # gdb. Also want to grab stuff in tls subdir. whee.
-#when new portage supports this ...
-# env \
-# -uRESTRICT \
-# CHOST=${CTARGET} \
-# STRIP_MASK="/*/{,tls/}{ld-,lib{pthread,thread_db}}*" \
-# prepallstrip
- pushd "${D}" > /dev/null
-
- if ! is_crosscompile ; then
- mkdir -p "${T}"/strip-backup
- for x in $(find "${D}" -maxdepth 3 \
- '(' -name 'ld-*' -o -name 'libpthread*' -o -name 'libthread_db*' ')' \
- -a '(' '!' -name '*.a' ')' -type f -printf '%P ')
- do
- mkdir -p "${T}/strip-backup/${x%/*}"
- cp -a -- "${D}/${x}" "${T}/strip-backup/${x}" || die "backing up ${x}"
- done
- fi
- env -uRESTRICT CHOST=${CTARGET} prepallstrip
- if ! is_crosscompile ; then
- cp -a -- "${T}"/strip-backup/* "${D}"/ || die "restoring non-stripped libs"
- fi
-
- popd > /dev/null
-}
-
-src_install() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Installing multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_install
- done
- ABI=${OABI}
- unset OABI
- src_strip
- return 0
- fi
- fi
-
- # Handle stupid lib32 BS
- unset OLD_LIBDIR
- if ! is_crosscompile ; then
- if [[ $(tc-arch) == "amd64" && ${ABI} == "x86" && $(get_libdir) != "lib" ]] ; then
- OLD_LIBDIR=$(get_libdir)
- LIBDIR_x86="lib"
- fi
-
- if [[ $(tc-arch) == "ppc64" && ${ABI} == "ppc" && $(get_libdir) != "lib" ]] ; then
- OLD_LIBDIR=$(get_libdir)
- LIBDIR_ppc="lib"
- fi
- fi
-
- toolchain-glibc_src_install
- [[ -z ${OABI} ]] && src_strip
-
- # Handle stupid lib32 BS on amd64 and ppc64
- if [[ -n ${OLD_LIBDIR} ]] ; then
- cd "${S}"
- [[ $(tc-arch) == "amd64" ]] && LIBDIR_x86=${OLD_LIBDIR}
- [[ $(tc-arch) == "ppc64" ]] && LIBDIR_ppc=${OLD_LIBDIR}
- unset OLD_LIBDIR
-
- mv "${D}"/lib "${D}"/$(get_libdir)
- mv "${D}"/usr/lib "${D}"/usr/$(get_libdir)
- dodir /lib
- dodir /usr/lib
- mv "${D}"/usr/$(get_libdir)/locale "${D}"/usr/lib
- [[ $(tc-arch) == "amd64" ]] && dosym ../$(get_libdir)/ld-linux.so.2 /lib/ld-linux.so.2
- [[ $(tc-arch) == "ppc64" ]] && dosym ../$(get_libdir)/ld.so.1 /lib/ld.so.1
-
- for f in "${D}"/usr/$(get_libdir)/*.so; do
- local basef=$(basename "${f}")
- if [[ -L ${f} ]] ; then
- local target=$(readlink "${f}")
- target=${target/\/lib\//\/$(get_libdir)\/}
- rm "${f}"
- dosym "${target}" /usr/$(get_libdir)/"${basef}"
- fi
- done
-
- dosed "s:/lib/:/$(get_libdir)/:g" /usr/$(get_libdir)/lib{c,pthread}.so
-
- if want_nptl && want_linuxthreads ; then
- dosed "s:/lib/:/$(get_libdir)/:g" /usr/$(get_libdir)/nptl/lib{c,pthread}.so
- fi
- fi
-
- # PPC NPTL fix
- if [[ $(tc-arch) == "ppc" ]] && use nptl && ! use nptlonly ; then
- cp ${WORKDIR}/build-default-${CTARGET}-nptl/elf/ld.so ${D}/lib/ld-${PV}.so
- fi
-}
-
-pkg_preinst() {
- toolchain-glibc_pkg_preinst
-}
-
-pkg_postinst() {
- toolchain-glibc_pkg_postinst
-}
diff --git a/sys-libs/glibc/glibc-2.3.6-r4.ebuild b/sys-libs/glibc/glibc-2.3.6-r4.ebuild
deleted file mode 100644
index fc86e76ed726..000000000000
--- a/sys-libs/glibc/glibc-2.3.6-r4.ebuild
+++ /dev/null
@@ -1,1225 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.6-r4.ebuild,v 1.42 2009/12/10 01:31:25 vapier Exp $
-
-# 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/
-
-KEYWORDS="-* alpha amd64 arm hppa ia64 mips ppc ppc64 ~s390 sh sparc x86"
-
-BRANCH_UPDATE=""
-
-# Generated man pages
-GLIBC_MANPAGE_VERSION="2.3.6-1"
-
-# Generated stuff in manual subdir
-GLIBC_INFOPAGE_VERSION="2.3.6"
-
-# Gentoo patchset
-PATCH_VER="1.17"
-
-GENTOO_TOOLCHAIN_BASE_URI="mirror://gentoo"
-GENTOO_TOOLCHAIN_DEV_URI="http://dev.gentoo.org/~azarah/glibc/XXX http://dev.gentoo.org/~vapier/dist/XXX"
-
-### PUNT OUT TO ECLASS?? ###
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-LICENSE="LGPL-2"
-
-IUSE="nls build nptl nptlonly erandom hardened multilib selinux glibc-compat20 glibc-omitfp profile"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- PROVIDE="virtual/libc"
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-just_headers() {
- is_crosscompile && use crosscompile_opts_headers-only
-}
-
-GLIBC_RELEASE_VER=$(get_version_component_range 1-3)
-
-# Don't set this to :-, - allows BRANCH_UPDATE=""
-BRANCH_UPDATE=${BRANCH_UPDATE-$(get_version_component_range 4)}
-
-# (Recent snapshots fails with 2.6.5 and earlier with NPTL)
-NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-"2.6.9"}
-LT_KERNEL_VERSION=${LT_KERNEL_VERSION:-"2.4.1"}
-
-### SRC_URI ###
-
-# This function handles the basics of setting the SRC_URI for a glibc ebuild.
-# To use, set SRC_URI with:
-#
-# SRC_URI="$(get_glibc_src_uri)"
-#
-# Other than the variables normally set by portage, this function's behavior
-# can be altered by setting the following:
-#
-# GENTOO_TOOLCHAIN_BASE_URI
-# This sets the base URI for all gentoo-specific patch files. Note
-# that this variable is only important for a brief period of time,
-# before your source files get picked up by mirrors. However, it is
-# still highly suggested that you keep files in this location
-# available.
-#
-# BRANCH_UPDATE
-# If set, this variable signals that we should be using the main
-# release tarball (determined by ebuild version) and applying a
-# CVS branch update patch against it. The location of this branch
-# update patch is assumed to be in ${GENTOO_TOOLCHAIN_BASE_URI}.
-# Just like with SNAPSHOT, this variable is ignored if the ebuild
-# has a _pre suffix.
-#
-# PATCH_VER
-# PATCH_GLIBC_VER
-# This should be set to the version of the gentoo patch tarball.
-# The resulting filename of this tarball will be:
-# glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
-#
-# GLIBC_MANPAGE_VERSION
-# GLIBC_INFOPAGE_VERSION
-# The version of glibc for which we will download pages. This will
-# default to ${GLIBC_RELEASE_VER}, but we may not want to pre-generate man pages
-# for prerelease test ebuilds for example. This allows you to
-# continue using pre-generated manpages from the last stable release.
-# If set to "none", this will prevent the downloading of manpages,
-# which is useful for individual library targets.
-#
-get_glibc_src_uri() {
- GENTOO_TOOLCHAIN_BASE_URI=${GENTOO_TOOLCHAIN_BASE_URI:-"mirror://gentoo"}
-
-# GLIBC_SRC_URI="http://ftp.gnu.org/gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
-# http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-${GLIBC_RELEASE_VER}.tar.bz2
-# http://ftp.gnu.org/gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2
- GLIBC_SRC_URI="mirror://gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-linuxthreads-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2"
-
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2}"
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- echo "${GLIBC_SRC_URI}"
-}
-
-SRC_URI=$(get_glibc_src_uri)
-S=${WORKDIR}/glibc-${GLIBC_RELEASE_VER}
-
-### EXPORTED FUNCTIONS ###
-toolchain-glibc_src_unpack() {
- # Check NPTL support _before_ we unpack things to save some time
- want_nptl && check_nptl_support
-
- unpack glibc-${GLIBC_RELEASE_VER}.tar.bz2
-
- cd "${S}"
- unpack glibc-linuxthreads-${GLIBC_RELEASE_VER}.tar.bz2
- unpack glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${WORKDIR}"
- unpack glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- # pull out all the addons
- local d
- for d in extra/*/configure ; do
- mv "${d%/configure}" "${S}" || die "moving ${d}"
- done
- fi
-
- # XXX: We should do the branchupdate, before extracting the manpages and
- # infopages else it does not help much (mtimes change if there is a change
- # to them with branchupdate)
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- cd "${S}"
- epatch "${DISTDIR}"/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
-
- # Snapshot date patch
- einfo "Patching version to display snapshot date ..."
- sed -i -e "s:\(#define RELEASE\).*:\1 \"${BRANCH_UPDATE}\":" version.h
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- cd "${WORKDIR}"
- unpack glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- cd "${S}"
- unpack glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${S}"
- EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset ${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-${PATCH_VER} ..." \
- EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \
- EPATCH_SUFFIX="patch" \
- ARCH=$(tc-arch) \
- epatch "${WORKDIR}"/patches
- fi
-
- gnuconfig_update
-}
-
-toolchain-glibc_src_compile() {
- echo
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
- echo
-
- if want_linuxthreads ; then
- glibc_do_configure linuxthreads
- einfo "Building GLIBC with linuxthreads..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
- if want_nptl ; then
- # ... and then do the optional nptl build
- unset LD_ASSUME_KERNEL
- glibc_do_configure nptl
- einfo "Building GLIBC with NPTL..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
-}
-
-toolchain-glibc_headers_compile() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
-
- # Pick out the correct location for build headers
- local myconf="--disable-sanity-checks --enable-hacker-mode"
- myconf="${myconf}
- --enable-add-ons=linuxthreads
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(alt_build_headers)
- --prefix=/usr
- ${EXTRA_ECONF}"
-
- einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}"
- CC=gcc \
- CFLAGS="-O1 -pipe" \
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-toolchain-glibc_src_test() {
- # This is wrong, but glibc's tests fail bad when screwing
- # around with sandbox, so lets just punt it
- unset LD_PRELOAD
-
- # do the linuxthreads build unless we're using nptlonly
- if want_linuxthreads ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
- einfo "Checking GLIBC with linuxthreads..."
- make check || die "linuxthreads glibc did not pass make check"
- fi
- if want_nptl ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- unset LD_ASSUME_KERNEL || :
- einfo "Checking GLIBC with NPTL..."
- make check || die "nptl glibc did not pass make check"
- fi
-}
-
-toolchain-glibc_pkg_preinst() {
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && ! { want_nptl && want_linuxthreads; }; then
- addwrite "${ROOT}"/$(alt_libdir)/
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # Shouldnt need to keep this updated
- [[ -e ${ROOT}/etc/locale.gen ]] && rm -f "${D}"/etc/locale.gen
-}
-
-toolchain-glibc_src_install() {
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
-
- local GBUILDDIR
- if want_linuxthreads ; then
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads
- else
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
- fi
-
- local install_root=${D}
- if is_crosscompile ; then
- install_root="${install_root}/usr/${CTARGET}"
- fi
- if want_linuxthreads ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
- einfo "Installing GLIBC ${ABI} with linuxthreads ..."
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${install_root}" \
- install || die
- else # nptlonly
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- einfo "Installing GLIBC ${ABI} with NPTL ..."
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${install_root}" \
- install || die
- fi
-
- if is_crosscompile ; then
- # punt all the junk not needed by a cross-compiler
- cd "${D}"/usr/${CTARGET} || die
- rm -rf ./{,usr/}{bin,etc,sbin,share} ./{,usr/}*/{gconv,misc}
- fi
-
- if want_linuxthreads && want_nptl ; then
- einfo "Installing NPTL to $(alt_libdir)/tls/..."
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl
-
- local l src_lib
- for l in libc libm librt libpthread libthread_db ; do
- # take care of shared lib first ...
- l=${l}.so
- if [[ -e ${l} ]] ; then
- src_lib=${l}
- else
- src_lib=$(eval echo */${l})
- fi
- cp -a ${src_lib} "${D}"$(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})
-
- # then grab the linker script or the symlink ...
- if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then
- dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l}
- else
- sed \
- -e "s:/${l}:/tls/${l}:g" \
- -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \
- "${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} "${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} "${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 "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp"
- fi
-
- # We'll take care of the cache ourselves
- rm -f "${D}"/etc/ld.so.cache
-
- # Some things want this, notably ash.
- dosym libbsd-compat.a $(alt_usrlibdir)/libbsd.a
-
- # Handle includes for different ABIs
- prep_ml_includes $(alt_headers)
-
- # When cross-compiling for a non-multilib setup, make sure we have
- # lib and a proper symlink setup
- if is_crosscompile && ! use multilib && ! has_multilib_profile && [[ $(get_libdir) != "lib" ]] ; then
- cd "${D}"$(alt_libdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- cd "${D}"$(alt_usrlibdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- return 0
- fi
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems
- if has_multilib_profile ; then
- case $(tc-arch) in
- amd64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR amd64) /lib
- dosym /$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2
- ;;
- ppc64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ppc64) /lib
- dosym /$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1
- ;;
- esac
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen || die
- doman *.[0-8]
- insinto /etc
- doins locale.gen || die
-
- # Make sure all the ABI's can find the locales and so we only
- # have to generate one set
- keepdir /usr/$(get_libdir)/locale
- for l in $(get_all_libdirs) ; do
- if [[ ! -e ${D}/usr/${l}/locale ]] ; then
- dosym /usr/$(get_libdir)/locale /usr/${l}/locale
- fi
- done
-
- if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- einfo "Installing info pages..."
-
- make \
- -C "${GBUILDDIR}" \
- PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${install_root}" \
- info -i || die
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- einfo "Installing man pages..."
-
- # Install linuxthreads man pages even if nptl is enabled
- cd "${WORKDIR}"/man
- doman *.3thr
- fi
-
- # Install misc network config files
- insinto /etc
- doins "${FILESDIR}"/nscd.conf
- doins "${FILESDIR}"/nsswitch.conf
- doins "${FILESDIR}"/2.3.6/host.conf
- doinitd "${FILESDIR}"/nscd
-
- cd "${S}"
- dodoc BUGS ChangeLog* CONFORMANCE FAQ INTERFACE NEWS NOTES PROJECTS README*
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${D}"/etc/localtime
-
- # simple test to make sure our new glibc isnt completely broken.
- # for now, skip the multilib scenario. also make sure we don't
- # test with statically built binaries since they will fail.
- [[ ${CBUILD} != ${CHOST} ]] && return 0
- [[ $(get_libdir) != "lib" ]] && return 0
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest/statically linked} != "${striptest}" ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
-
-toolchain-glibc_headers_install() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- cd "${GBUILDDIR}"
- make install_root="${D}/usr/${CTARGET}" install-headers || die "install-headers failed"
- # Copy over headers that are not part of install-headers ... these
- # are pretty much taken verbatim from crosstool, see it for more details
- insinto $(alt_headers)/bits
- doins misc/syscall-list.h bits/stdio_lim.h || die "doins include bits"
- insinto $(alt_headers)/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
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include /usr/${CTARGET}/sys-include
-}
-
-toolchain-glibc_pkg_postinst() {
- # Mixing nptlonly and -nptlonly glibc can prove dangerous if libpthread
- # isn't removed in unmerge which happens sometimes. See bug #87671
- if ! is_crosscompile && want_linuxthreads && [[ ${ROOT} == "/" ]] ; then
- for libdir in $(get_all_libdirs) ; do
- for f in "${ROOT}"/${libdir}/libpthread-2.* "${ROOT}"/${libdir}/libpthread-0.6* ; do
- if [[ -f ${f} ]] ; then
- rm -f ${f}
- ldconfig
- fi
- done
- done
- fi
-
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if [[ ! -e ${ROOT}/lib/ld.so.1 ]] && use ppc64 && ! has_multilib_profile ; then
- ## SHOULDN'T THIS BE lib64??
- ln -s ld64.so.1 "${ROOT}"/lib/ld.so.1
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ...
- /sbin/telinit U &> /dev/null
-
- # if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}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"
- fi
- locale-gen --config "${locale_list}"
- fi
-
- echo
- einfo "Gentoo's glibc no longer includes mdns."
- einfo "If you want mdns, emerge the sys-auth/nss-mdns package."
- echo
-
- if want_nptl && want_linuxthreads ; then
- einfo "The default behavior of glibc on your system is to use NPTL. If"
- einfo "you want to use linuxthreads for a particular program, start it"
- einfo "by executing 'LD_ASSUME_KERNEL=${LT_KERNEL_VERSION} <program> [<options>]'"
- echo
- fi
-}
-
-### SUPPORT FUNCTIONS ###
-# We need to be able to set alternative headers for
-# compiling for non-native platform
-# Will also become useful for testing kernel-headers without screwing up
-# the whole system.
-# note: intentionally undocumented.
-alt_headers() {
- if [[ -z ${ALT_HEADERS} ]] ; then
- if is_crosscompile ; then
- ALT_HEADERS="/usr/${CTARGET}/usr/include"
- else
- ALT_HEADERS="/usr/include"
- fi
- fi
- echo "${ALT_HEADERS}"
-}
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS=$(alt_headers)
- tc-is-cross-compiler && ALT_BUILD_HEADERS=${ROOT}$(alt_headers)
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /$(get_libdir)
- fi
-}
-
-alt_usrlibdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/usr/$(get_libdir)
- else
- echo /usr/$(get_libdir)
- fi
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- strip-unsupported-flags
- filter-flags -m32 -m64 -mabi=*
-
- unset CBUILD_OPT CTARGET_OPT
- if has_multilib_profile ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- case $(tc-arch) in
- amd64)
- # Punt this when amd64's 2004.3 is removed
- CFLAGS_x86="-m32"
- ;;
- ppc)
- append-flags "-freorder-blocks"
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
- filter-flags "-mvis"
-
- if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
- case ${ABI} in
- sparc64)
- filter-flags -Wa,-xarch -Wa,-A
-
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparc64b-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9b"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
- else
- CTARGET_OPT="sparc64-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9a"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a"
- fi
- ;;
- *)
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- else
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- ;;
- esac
- else
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- elif { is_crosscompile && want_nptl; } || is-flag "-mcpu=ultrasparc2" || is-flag "-mcpu=ultrasparc"; then
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- fi
- ;;
- esac
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- if $(tc-getCC ${CTARGET}) -v 2>&1 | grep -q 'gcc version 3.[0123]'; then
- append-flags -finline-limit=2000
- fi
-
- # We dont want these flags for glibc
- filter-ldflags -pie
-
- # We cannot build glibc with Bdirect support
- filter-flags -Wl,-Bdirect
- filter-ldflags -Bdirect
- filter-ldflags -Wl,-Bdirect
-
- # Same for hashvals ...
- filter-flags -Wl,-hashvals
- filter-ldflags -hashvals
- filter-ldflags -Wl,-hashvals
-
- # Lock glibc at -O2 -- linuxthreads needs it and we want to be
- # conservative here
- filter-flags -O?
- append-flags -O2
-}
-
-check_kheader_version() {
- local header="$(alt_build_headers)/linux/version.h"
-
- [[ -z $1 ]] && return 1
-
- if [ -f "${header}" ] ; then
- local version="`grep 'LINUX_VERSION_CODE' ${header} | \
- sed -e 's:^.*LINUX_VERSION_CODE[[:space:]]*::'`"
-
- if [ "${version}" -ge "$1" ] ; then
- return 0
- fi
- fi
-
- return 1
-}
-
-check_nptl_support() {
- local min_kernel_version=$(KV_to_int "${NPTL_KERNEL_VERSION}")
-
- echo
-
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking kernel version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $([[ $(get_KV) -ge ${min_kernel_version} ]] ; echo $?) ; then
- echo
- eerror "You need a kernel of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "Kernel version too low!"
- fi
- fi
-
- # Building fails with too low linux-headers
- ebegin "Checking linux-headers version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $(check_kheader_version "${min_kernel_version}" ; echo $?) ; then
- echo
- eerror "You need linux-headers of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "linux-headers version too low!"
- fi
-
- echo
-}
-
-want_nptl() {
- want_tls || return 1
- use nptl || return 1
-
- # Archs that can use NPTL
- case $(tc-arch) in
- alpha|amd64|ia64|mips|ppc|ppc64|s390|sh|x86)
- return 0;
- ;;
- sparc)
- # >= v9 is needed for nptl.
- [[ "${PROFILE_ARCH}" == "sparc" ]] && return 1
- return 0;
- ;;
- esac
-
- return 1
-}
-
-want_linuxthreads() {
- ! use nptlonly && return 0
- want_nptl || return 0
- return 1
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- alpha|amd64|ia64|mips|ppc|ppc64|s390|sh)
- return 0;
- ;;
- sparc)
- # 2.3.6 should have tls support on sparc64
- # when using newer binutils
- case ${CTARGET/-*} in
- sparc64*) return 1 ;;
- *) return 0 ;;
- esac
- ;;
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- ;;
- esac
-
- return 1
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- echo 'extern __thread int i;' > "${T}"/test-__thread.c
- $(tc-getCC ${CTARGET}) -c "${T}"/test-__thread.c -o "${T}"/test-__thread.o &> /dev/null
- WANT__THREAD=$?
- rm -f "${T}"/test-__thread.[co]
-
- return ${WANT__THREAD}
-}
-
-glibc_do_configure() {
- local myconf
-
- # set addons
- pushd "${S}" > /dev/null
- local ADDONS=$(echo */configure | sed \
- -e 's:/configure::g' \
- -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \
- -e 's: \+$::' \
- -e 's! !,!g' \
- -e 's!^!,!' \
- -e '/^,\*$/d')
- popd > /dev/null
- use glibc-compat20 && [[ -d glibc-compat ]] && ADDONS="${ADDONS},glibc-compat"
-
- use nls || myconf="${myconf} --disable-nls"
- use erandom || myconf="${myconf} --disable-dev-erandom"
-
- use glibc-omitfp && myconf="${myconf} --enable-omitfp"
-
- [[ ${CTARGET//_/-} == *-softfloat-* ]] && myconf="${myconf} --without-fp"
-
- if [ "$1" == "linuxthreads" ] ; then
- if want_tls ; then
- myconf="${myconf} --with-tls"
-
- if want__thread && ! use glibc-compat20 ; then
- myconf="${myconf} --with-__thread"
- else
- myconf="${myconf} --without-__thread"
- fi
- else
- myconf="${myconf} --without-tls --without-__thread"
- fi
-
- myconf="${myconf} --enable-add-ons=linuxthreads${ADDONS}"
- myconf="${myconf} --enable-kernel=${LT_KERNEL_VERSION}"
- elif [ "$1" == "nptl" ] ; then
- myconf="${myconf} --with-tls --with-__thread"
- myconf="${myconf} --enable-add-ons=nptl${ADDONS}"
- myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}"
- else
- die "invalid pthread option"
- fi
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. ! USE build
- # 3. only for the primary ABI on multilib systems
- if use selinux && ! use build ; then
- if use multilib || has_multilib_profile ; then
- if is_final_abi ; then
- myconf="${myconf} --with-selinux"
- else
- myconf="${myconf} --without-selinux"
- fi
- else
- myconf="${myconf} --with-selinux"
- fi
- else
- myconf="${myconf} --without-selinux"
- fi
-
- myconf="${myconf}
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- --without-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
- ${EXTRA_ECONF}"
-
- # 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)
-
- has_version app-admin/eselect-compiler || export CC=$(tc-getCC ${CTARGET})
-
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
- einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}"
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- addwrite ${ROOT}/
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- addwrite ${ROOT}/usr
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- addwrite ${ROOT}/usr/X11R6
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-use_multilib() {
- case ${CTARGET} in
- sparc64*|mips64*|x86_64*|powerpc64*|s390x*)
- has_multilib_profile || use multilib ;;
- *) false ;;
- esac
-}
-
-# Setup toolchain variables that would be defined in the profiles for these archs.
-setup_env() {
- # These should not be set, else the zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
- # silly users
- unset LD_RUN_PATH
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET}
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
- # and fall back on CFLAGS.
- local VAR=CFLAGS_${CTARGET//[-.]/_}
- CFLAGS=${!VAR-${CFLAGS}}
- fi
-
- setup_flags
-
- export ABI=${ABI:-${DEFAULT_ABI:-default}}
-
- if is_crosscompile || tc-is-cross-compiler ; then
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because
- # glibc's configure script checks CFLAGS for some targets (like mips)
- export CFLAGS="${!VAR} ${CFLAGS}"
- fi
-}
-
-### /ECLASS PUNTAGE ###
-
-if is_crosscompile ; then
- SLOT="${CTARGET}-2.2"
-else
- SLOT="2.2"
-fi
-
-# we'll handle stripping ourself #46186
-RESTRICT="strip"
-EMULTILIB_PKG="true"
-
-# We need a new-enough binutils for as-needed
-DEPEND="!ia64? ( >=sys-devel/gcc-3.4 )
- nptl? ( >=sys-kernel/linux-headers-${NPTL_KERNEL_VERSION} )
- >=sys-devel/binutils-2.15.94
- >=sys-devel/gcc-config-1.3.12
- >=app-misc/pax-utils-0.1.10
- virtual/os-headers
- nls? ( sys-devel/gettext )
- selinux? ( !build? ( sys-libs/libselinux ) )"
-RDEPEND="nls? ( sys-devel/gettext )
- selinux? ( !build? ( sys-libs/libselinux ) )"
-
-if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
-
- if [[ ${CATEGORY} == *-linux* ]] ; then
- if [[ ${CATEGORY} == cross-mips* ]] ; then
- DEPEND="${DEPEND} >=${CATEGORY}/mips-headers-2.6.10"
- else
- DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
- fi
- fi
-else
- DEPEND="${DEPEND} sys-libs/timezone-data"
- RDEPEND="${RDEPEND} sys-libs/timezone-data"
-fi
-
-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
- fi
-
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
-
- if [[ -e /proc/xen ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty, which is probably not what you want."
- fi
-
- if ! type -p scanelf > /dev/null ; then
- eerror "You do not have pax-utils installed."
- die "install pax-utils"
- fi
-
- # give some sort of warning about the nptl logic changes...
- if want_nptl && want_linuxthreads ; then
- ewarn "Warning! Gentoo's GLIBC with NPTL enabled now behaves like the"
- ewarn "glibc from almost every other distribution out there. This means"
- ewarn "that glibc is compiled -twice-, once with linuxthreads and once"
- ewarn "with nptl. The NPTL version is installed to lib/tls and is still"
- ewarn "used by default. If you do not need nor want the linuxthreads"
- ewarn "fallback, you can disable this behavior by adding nptlonly to"
- ewarn "USE to save yourself some compile time."
-
- ebeep
- epause 5
- fi
-}
-
-src_unpack() {
- setup_env
-
- # Do not enable -Bdirect support for now.
- GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 2020_all_2.3.6-hashvals.patch"
- GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 2030_all_2.3.6-bdirect.patch"
-
- toolchain-glibc_src_unpack
-
- # XXX: do not package ssp up into tarballs, leave it in FILESDIR
- cd "${S}"
- cp "${FILESDIR}"/2.3.5/ssp.c sysdeps/unix/sysv/linux/ || die "could not find ssp.c"
- rm -f "${WORKDIR}"/patches/2*
- epatch "${FILESDIR}"/2.3.6/glibc-2.3.6-propolice-guard-functions.patch
- epatch "${FILESDIR}"/2.3.5/glibc-2.3.5-frandom-detect.patch
-
- # Glibc is stupid sometimes, and doesn't realize that with a
- # static C-Only gcc, -lgcc_eh doesn't exist.
- # http://sources.redhat.com/ml/libc-alpha/2003-09/msg00100.html
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- echo 'int main(){}' > "${T}"/gcc_eh_test.c
- if ! $(tc-getCC ${CTARGET}) "${T}"/gcc_eh_test.c -lgcc_eh 2>/dev/null ; then
- sed -i -e 's:-lgcc_eh::' Makeconfig || die "sed gcc_eh"
- fi
-
- # Some configure checks fail on the first emerge through because they
- # try to link. This doesn't work well if we don't have a libc yet.
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- if is_crosscompile && use build; then
- rm "${S}"/sysdeps/sparc/sparc64/elf/configure{,.in}
- rm "${S}"/nptl/sysdeps/pthread/configure{,.in}
- fi
-
- cd "${WORKDIR}"
- find . -type f '(' -size 0 -o -name "*.orig" ')' -exec rm -f {} \;
- find . -name configure -exec touch {} \;
-
- # Fix permissions on some of the scripts
- chmod u+x "${S}"/scripts/*.sh
-}
-
-src_compile() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Building multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_compile
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_compile
- else
- toolchain-glibc_src_compile
- fi
-}
-
-src_test() {
- setup_env
-
- if [[ -z ${OABI} ]] && has_multilib_profile ; then
- OABI=${ABI}
- einfo "Testing multilib glibc for ABIs: $(get_install_abis)"
- for ABI in $(get_install_abis) ; do
- export ABI
- einfo " Testing ${ABI} glibc"
- src_test
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
-
- toolchain-glibc_src_test
-}
-
-src_strip() {
- # Now, strip everything but the thread libs #46186, as well as the dynamic
- # linker, else we cannot set breakpoints in shared libraries due to bugs in
- # gdb. Also want to grab stuff in tls subdir. whee.
-#when new portage supports this ...
-# env \
-# -uRESTRICT \
-# CHOST=${CTARGET} \
-# STRIP_MASK="/*/{,tls/}{ld-,lib{pthread,thread_db}}*" \
-# prepallstrip
- pushd "${D}" > /dev/null
-
- if ! is_crosscompile ; then
- mkdir -p "${T}"/strip-backup
- for x in $(find "${D}" -maxdepth 3 \
- '(' -name 'ld-*' -o -name 'libpthread*' -o -name 'libthread_db*' ')' \
- -a '(' '!' -name '*.a' ')' -type f -printf '%P ')
- do
- mkdir -p "${T}/strip-backup/${x%/*}"
- cp -a -- "${D}/${x}" "${T}/strip-backup/${x}" || die "backing up ${x}"
- done
- fi
- env -uRESTRICT CHOST=${CTARGET} prepallstrip
- if ! is_crosscompile ; then
- cp -a -- "${T}"/strip-backup/* "${D}"/ || die "restoring non-stripped libs"
- fi
-
- popd > /dev/null
-}
-
-src_install() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Installing multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_install
- done
- ABI=${OABI}
- unset OABI
- src_strip
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_install
- else
- toolchain-glibc_src_install
- fi
- [[ -z ${OABI} ]] && src_strip
-}
-
-pkg_preinst() {
- toolchain-glibc_pkg_preinst
-}
-
-pkg_postinst() {
- toolchain-glibc_pkg_postinst
-}
diff --git a/sys-libs/glibc/glibc-2.3.6-r5.ebuild b/sys-libs/glibc/glibc-2.3.6-r5.ebuild
deleted file mode 100644
index cf96aaca8ab5..000000000000
--- a/sys-libs/glibc/glibc-2.3.6-r5.ebuild
+++ /dev/null
@@ -1,1230 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.6-r5.ebuild,v 1.28 2009/12/10 01:31:25 vapier Exp $
-
-# 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/
-
-KEYWORDS="-* alpha amd64 arm hppa ia64 mips ppc ppc64 ~s390 sh sparc x86"
-
-BRANCH_UPDATE=""
-
-# Generated man pages
-GLIBC_MANPAGE_VERSION="2.3.6-1"
-
-# Generated stuff in manual subdir
-GLIBC_INFOPAGE_VERSION="2.3.6"
-
-# Gentoo patchset
-PATCH_VER="1.19"
-
-GENTOO_TOOLCHAIN_BASE_URI="mirror://gentoo"
-GENTOO_TOOLCHAIN_DEV_URI="http://dev.gentoo.org/~azarah/glibc/XXX http://dev.gentoo.org/~vapier/dist/XXX"
-
-### PUNT OUT TO ECLASS?? ###
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-LICENSE="LGPL-2"
-
-IUSE="nls build nptl nptlonly erandom hardened multilib selinux glibc-compat20 glibc-omitfp profile"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- PROVIDE="virtual/libc"
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-just_headers() {
- is_crosscompile && use crosscompile_opts_headers-only
-}
-
-GLIBC_RELEASE_VER=$(get_version_component_range 1-3)
-
-# Don't set this to :-, - allows BRANCH_UPDATE=""
-BRANCH_UPDATE=${BRANCH_UPDATE-$(get_version_component_range 4)}
-
-# (Recent snapshots fails with 2.6.5 and earlier with NPTL)
-NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-"2.6.9"}
-LT_KERNEL_VERSION=${LT_KERNEL_VERSION:-"2.4.1"}
-
-### SRC_URI ###
-
-# This function handles the basics of setting the SRC_URI for a glibc ebuild.
-# To use, set SRC_URI with:
-#
-# SRC_URI="$(get_glibc_src_uri)"
-#
-# Other than the variables normally set by portage, this function's behavior
-# can be altered by setting the following:
-#
-# GENTOO_TOOLCHAIN_BASE_URI
-# This sets the base URI for all gentoo-specific patch files. Note
-# that this variable is only important for a brief period of time,
-# before your source files get picked up by mirrors. However, it is
-# still highly suggested that you keep files in this location
-# available.
-#
-# BRANCH_UPDATE
-# If set, this variable signals that we should be using the main
-# release tarball (determined by ebuild version) and applying a
-# CVS branch update patch against it. The location of this branch
-# update patch is assumed to be in ${GENTOO_TOOLCHAIN_BASE_URI}.
-# Just like with SNAPSHOT, this variable is ignored if the ebuild
-# has a _pre suffix.
-#
-# PATCH_VER
-# PATCH_GLIBC_VER
-# This should be set to the version of the gentoo patch tarball.
-# The resulting filename of this tarball will be:
-# glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
-#
-# GLIBC_MANPAGE_VERSION
-# GLIBC_INFOPAGE_VERSION
-# The version of glibc for which we will download pages. This will
-# default to ${GLIBC_RELEASE_VER}, but we may not want to pre-generate man pages
-# for prerelease test ebuilds for example. This allows you to
-# continue using pre-generated manpages from the last stable release.
-# If set to "none", this will prevent the downloading of manpages,
-# which is useful for individual library targets.
-#
-get_glibc_src_uri() {
- GENTOO_TOOLCHAIN_BASE_URI=${GENTOO_TOOLCHAIN_BASE_URI:-"mirror://gentoo"}
-
-# GLIBC_SRC_URI="http://ftp.gnu.org/gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
-# http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-${GLIBC_RELEASE_VER}.tar.bz2
-# http://ftp.gnu.org/gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2
- GLIBC_SRC_URI="mirror://gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-linuxthreads-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2"
-
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2}"
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- echo "${GLIBC_SRC_URI}"
-}
-
-SRC_URI=$(get_glibc_src_uri)
-S=${WORKDIR}/glibc-${GLIBC_RELEASE_VER}
-
-### EXPORTED FUNCTIONS ###
-toolchain-glibc_src_unpack() {
- # Check NPTL support _before_ we unpack things to save some time
- want_nptl && check_nptl_support
-
- unpack glibc-${GLIBC_RELEASE_VER}.tar.bz2
-
- cd "${S}"
- unpack glibc-linuxthreads-${GLIBC_RELEASE_VER}.tar.bz2
- unpack glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${WORKDIR}"
- unpack glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- # pull out all the addons
- local d
- for d in extra/*/configure ; do
- mv "${d%/configure}" "${S}" || die "moving ${d}"
- done
- fi
-
- # XXX: We should do the branchupdate, before extracting the manpages and
- # infopages else it does not help much (mtimes change if there is a change
- # to them with branchupdate)
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- cd "${S}"
- epatch "${DISTDIR}"/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
-
- # Snapshot date patch
- einfo "Patching version to display snapshot date ..."
- sed -i -e "s:\(#define RELEASE\).*:\1 \"${BRANCH_UPDATE}\":" version.h
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- cd "${WORKDIR}"
- unpack glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- cd "${S}"
- unpack glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${S}"
- EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset ${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-${PATCH_VER} ..." \
- EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \
- EPATCH_SUFFIX="patch" \
- ARCH=$(tc-arch) \
- epatch "${WORKDIR}"/patches
-
- # tag, glibc is it
- [[ -e csu/Banner ]] && die "need new banner location"
- echo "Gentoo patchset ${PATCH_VER}" > csu/Banner
- fi
-
- gnuconfig_update
-}
-
-toolchain-glibc_src_compile() {
- echo
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
- echo
-
- if want_linuxthreads ; then
- glibc_do_configure linuxthreads
- einfo "Building GLIBC with linuxthreads..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
- if want_nptl ; then
- # ... and then do the optional nptl build
- unset LD_ASSUME_KERNEL
- glibc_do_configure nptl
- einfo "Building GLIBC with NPTL..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
-}
-
-toolchain-glibc_headers_compile() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
-
- # Pick out the correct location for build headers
- local myconf="--disable-sanity-checks --enable-hacker-mode"
- myconf="${myconf}
- --enable-add-ons=linuxthreads
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(alt_build_headers)
- --prefix=/usr
- ${EXTRA_ECONF}"
-
- einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}"
- CC=gcc \
- CFLAGS="-O1 -pipe" \
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-toolchain-glibc_src_test() {
- # This is wrong, but glibc's tests fail bad when screwing
- # around with sandbox, so lets just punt it
- unset LD_PRELOAD
-
- # do the linuxthreads build unless we're using nptlonly
- if want_linuxthreads ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
- einfo "Checking GLIBC with linuxthreads..."
- make check || die "linuxthreads glibc did not pass make check"
- fi
- if want_nptl ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- unset LD_ASSUME_KERNEL || :
- einfo "Checking GLIBC with NPTL..."
- make check || die "nptl glibc did not pass make check"
- fi
-}
-
-toolchain-glibc_pkg_preinst() {
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && ! { want_nptl && want_linuxthreads; }; then
- addwrite "${ROOT}"/$(alt_libdir)/
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # Shouldnt need to keep this updated
- [[ -e ${ROOT}/etc/locale.gen ]] && rm -f "${D}"/etc/locale.gen
-}
-
-toolchain-glibc_src_install() {
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
-
- local GBUILDDIR
- if want_linuxthreads ; then
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads
- else
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
- fi
-
- local install_root=${D}
- if is_crosscompile ; then
- install_root="${install_root}/usr/${CTARGET}"
- fi
- if want_linuxthreads ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
- einfo "Installing GLIBC ${ABI} with linuxthreads ..."
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${install_root}" \
- install || die
- else # nptlonly
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- einfo "Installing GLIBC ${ABI} with NPTL ..."
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${install_root}" \
- install || die
- fi
-
- if is_crosscompile ; then
- # punt all the junk not needed by a cross-compiler
- cd "${D}"/usr/${CTARGET} || die
- rm -rf ./{,usr/}{bin,etc,sbin,share} ./{,usr/}*/{gconv,misc}
- fi
-
- if want_linuxthreads && want_nptl ; then
- einfo "Installing NPTL to $(alt_libdir)/tls/..."
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl
-
- local l src_lib
- for l in libc libm librt libpthread libthread_db ; do
- # take care of shared lib first ...
- l=${l}.so
- if [[ -e ${l} ]] ; then
- src_lib=${l}
- else
- src_lib=$(eval echo */${l})
- fi
- cp -a ${src_lib} "${D}"$(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})
-
- # then grab the linker script or the symlink ...
- if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then
- dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l}
- else
- sed \
- -e "s:/${l}:/tls/${l}:g" \
- -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \
- "${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} "${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} "${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 "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp"
- fi
-
- # We'll take care of the cache ourselves
- rm -f "${D}"/etc/ld.so.cache
-
- # Some things want this, notably ash.
- dosym libbsd-compat.a $(alt_usrlibdir)/libbsd.a
-
- # Handle includes for different ABIs
- prep_ml_includes $(alt_headers)
-
- # When cross-compiling for a non-multilib setup, make sure we have
- # lib and a proper symlink setup
- if is_crosscompile && ! use multilib && ! has_multilib_profile && [[ $(get_libdir) != "lib" ]] ; then
- cd "${D}"$(alt_libdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- cd "${D}"$(alt_usrlibdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- return 0
- fi
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems
- if has_multilib_profile ; then
- case $(tc-arch) in
- amd64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR amd64) /lib
- dosym /$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2
- ;;
- ppc64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ppc64) /lib
- dosym /$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1
- ;;
- esac
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen || die
- doman *.[0-8]
- insinto /etc
- doins locale.gen || die
-
- # Make sure all the ABI's can find the locales and so we only
- # have to generate one set
- local a
- keepdir /usr/$(get_libdir)/locale
- for a in $(get_install_abis) ; do
- if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then
- dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale
- fi
- done
-
- if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- einfo "Installing info pages..."
-
- make \
- -C "${GBUILDDIR}" \
- PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${install_root}" \
- info -i || die
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- einfo "Installing man pages..."
-
- # Install linuxthreads man pages even if nptl is enabled
- cd "${WORKDIR}"/man
- doman *.3thr
- fi
-
- # Install misc network config files
- insinto /etc
- doins "${WORKDIR}"/extra/etc/*.conf || die
- doinitd "${WORKDIR}"/extra/etc/nscd || die
-
- cd "${S}"
- dodoc BUGS ChangeLog* CONFORMANCE FAQ INTERFACE NEWS NOTES PROJECTS README*
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${D}"/etc/localtime
-
- # simple test to make sure our new glibc isnt completely broken.
- # for now, skip the multilib scenario. also make sure we don't
- # test with statically built binaries since they will fail.
- [[ ${CBUILD} != ${CHOST} ]] && return 0
- [[ $(get_libdir) != "lib" ]] && return 0
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest} == *"statically linked"* ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
-
-toolchain-glibc_headers_install() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- cd "${GBUILDDIR}"
- make install_root="${D}/usr/${CTARGET}" install-headers || die "install-headers failed"
- # Copy over headers that are not part of install-headers ... these
- # are pretty much taken verbatim from crosstool, see it for more details
- insinto $(alt_headers)/bits
- doins misc/syscall-list.h bits/stdio_lim.h || die "doins include bits"
- insinto $(alt_headers)/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
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include /usr/${CTARGET}/sys-include
-}
-
-toolchain-glibc_pkg_postinst() {
- # Mixing nptlonly and -nptlonly glibc can prove dangerous if libpthread
- # isn't removed in unmerge which happens sometimes. See bug #87671
- if ! is_crosscompile && want_linuxthreads && [[ ${ROOT} == "/" ]] ; then
- for libdir in $(get_all_libdirs) ; do
- for f in "${ROOT}"/${libdir}/libpthread-2.* "${ROOT}"/${libdir}/libpthread-0.6* ; do
- if [[ -f ${f} ]] ; then
- rm -f ${f}
- ldconfig
- fi
- done
- done
- fi
-
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if [[ ! -e ${ROOT}/lib/ld.so.1 ]] && use ppc64 && ! has_multilib_profile ; then
- ## SHOULDN'T THIS BE lib64??
- ln -s ld64.so.1 "${ROOT}"/lib/ld.so.1
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ...
- /sbin/telinit U &> /dev/null
-
- # if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}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"
- fi
- local x jobs
- for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done
- locale-gen -j ${jobs:-1} --config "${locale_list}"
- fi
-
- echo
- einfo "Gentoo's glibc no longer includes mdns."
- einfo "If you want mdns, emerge the sys-auth/nss-mdns package."
- echo
-
- if want_nptl && want_linuxthreads ; then
- einfo "The default behavior of glibc on your system is to use NPTL. If"
- einfo "you want to use linuxthreads for a particular program, start it"
- einfo "by executing 'LD_ASSUME_KERNEL=${LT_KERNEL_VERSION} <program> [<options>]'"
- echo
- fi
-}
-
-### SUPPORT FUNCTIONS ###
-# We need to be able to set alternative headers for
-# compiling for non-native platform
-# Will also become useful for testing kernel-headers without screwing up
-# the whole system.
-# note: intentionally undocumented.
-alt_headers() {
- if [[ -z ${ALT_HEADERS} ]] ; then
- if is_crosscompile ; then
- ALT_HEADERS="/usr/${CTARGET}/usr/include"
- else
- ALT_HEADERS="/usr/include"
- fi
- fi
- echo "${ALT_HEADERS}"
-}
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS=$(alt_headers)
- tc-is-cross-compiler && ALT_BUILD_HEADERS=${ROOT}$(alt_headers)
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /$(get_libdir)
- fi
-}
-
-alt_usrlibdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/usr/$(get_libdir)
- else
- echo /usr/$(get_libdir)
- fi
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- strip-unsupported-flags
- filter-flags -m32 -m64 -mabi=*
-
- unset CBUILD_OPT CTARGET_OPT
- if has_multilib_profile ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- case $(tc-arch) in
- amd64)
- # Punt this when amd64's 2004.3 is removed
- CFLAGS_x86="-m32"
- ;;
- ppc)
- append-flags "-freorder-blocks"
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
- filter-flags "-mvis"
-
- if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
- case ${ABI} in
- sparc64)
- filter-flags -Wa,-xarch -Wa,-A
-
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparc64b-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9b"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
- else
- CTARGET_OPT="sparc64-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9a"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a"
- fi
- ;;
- *)
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- else
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- ;;
- esac
- else
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- elif { is_crosscompile && want_nptl; } || is-flag "-mcpu=ultrasparc2" || is-flag "-mcpu=ultrasparc"; then
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- fi
- ;;
- esac
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- if $(tc-getCC ${CTARGET}) -v 2>&1 | grep -q 'gcc version 3.[0123]'; then
- append-flags -finline-limit=2000
- fi
-
- # We dont want these flags for glibc
- filter-ldflags -pie
-
- # We cannot build glibc with Bdirect support
- filter-flags -Wl,-Bdirect
- filter-ldflags -Bdirect
- filter-ldflags -Wl,-Bdirect
-
- # Same for hashvals ...
- filter-flags -Wl,-hashvals
- filter-ldflags -hashvals
- filter-ldflags -Wl,-hashvals
-
- # Lock glibc at -O2 -- linuxthreads needs it and we want to be
- # conservative here. -fno-strict-aliasing is to work around #155906
- filter-flags -O?
- append-flags -O2 -fno-strict-aliasing
-}
-
-check_kheader_version() {
- local header="$(alt_build_headers)/linux/version.h"
-
- [[ -z $1 ]] && return 1
-
- if [ -f "${header}" ] ; then
- local version="`grep 'LINUX_VERSION_CODE' ${header} | \
- sed -e 's:^.*LINUX_VERSION_CODE[[:space:]]*::'`"
-
- if [ "${version}" -ge "$1" ] ; then
- return 0
- fi
- fi
-
- return 1
-}
-
-check_nptl_support() {
- local min_kernel_version=$(KV_to_int "${NPTL_KERNEL_VERSION}")
-
- echo
-
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking kernel version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $([[ $(get_KV) -ge ${min_kernel_version} ]] ; echo $?) ; then
- echo
- eerror "You need a kernel of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "Kernel version too low!"
- fi
- fi
-
- # Building fails with too low linux-headers
- ebegin "Checking linux-headers version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $(check_kheader_version "${min_kernel_version}" ; echo $?) ; then
- echo
- eerror "You need linux-headers of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "linux-headers version too low!"
- fi
-
- echo
-}
-
-want_nptl() {
- want_tls || return 1
- use nptl || return 1
-
- # Archs that can use NPTL
- case $(tc-arch) in
- alpha|amd64|ia64|mips|ppc|ppc64|s390|sh|x86)
- return 0;
- ;;
- sparc)
- # >= v9 is needed for nptl.
- [[ "${PROFILE_ARCH}" == "sparc" ]] && return 1
- return 0;
- ;;
- esac
-
- return 1
-}
-
-want_linuxthreads() {
- ! use nptlonly && return 0
- want_nptl || return 0
- return 1
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- alpha|amd64|ia64|mips|ppc|ppc64|s390|sh)
- return 0;
- ;;
- sparc)
- # 2.3.6 should have tls support on sparc64
- # when using newer binutils
- case ${CTARGET/-*} in
- sparc64*) return 1 ;;
- *) return 0 ;;
- esac
- ;;
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- ;;
- esac
-
- return 1
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- echo 'extern __thread int i;' > "${T}"/test-__thread.c
- $(tc-getCC ${CTARGET}) -c "${T}"/test-__thread.c -o "${T}"/test-__thread.o &> /dev/null
- WANT__THREAD=$?
- rm -f "${T}"/test-__thread.[co]
-
- return ${WANT__THREAD}
-}
-
-glibc_do_configure() {
- local myconf
-
- # set addons
- pushd "${S}" > /dev/null
- local ADDONS=$(echo */configure | sed \
- -e 's:/configure::g' \
- -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \
- -e 's: \+$::' \
- -e 's! !,!g' \
- -e 's!^!,!' \
- -e '/^,\*$/d')
- popd > /dev/null
- use glibc-compat20 && [[ -d glibc-compat ]] && ADDONS="${ADDONS},glibc-compat"
-
- use nls || myconf="${myconf} --disable-nls"
- use erandom || myconf="${myconf} --disable-dev-erandom"
-
- use glibc-omitfp && myconf="${myconf} --enable-omitfp"
-
- [[ ${CTARGET//_/-} == *-softfloat-* ]] && myconf="${myconf} --without-fp"
-
- if [ "$1" == "linuxthreads" ] ; then
- if want_tls ; then
- myconf="${myconf} --with-tls"
-
- if want__thread && ! use glibc-compat20 ; then
- myconf="${myconf} --with-__thread"
- else
- myconf="${myconf} --without-__thread"
- fi
- else
- myconf="${myconf} --without-tls --without-__thread"
- fi
-
- myconf="${myconf} --enable-add-ons=linuxthreads${ADDONS}"
- myconf="${myconf} --enable-kernel=${LT_KERNEL_VERSION}"
- elif [ "$1" == "nptl" ] ; then
- myconf="${myconf} --with-tls --with-__thread"
- myconf="${myconf} --enable-add-ons=nptl${ADDONS}"
- myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}"
- else
- die "invalid pthread option"
- fi
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. ! USE build
- # 3. only for the primary ABI on multilib systems
- if use selinux && ! use build ; then
- if use multilib || has_multilib_profile ; then
- if is_final_abi ; then
- myconf="${myconf} --with-selinux"
- else
- myconf="${myconf} --without-selinux"
- fi
- else
- myconf="${myconf} --with-selinux"
- fi
- else
- myconf="${myconf} --without-selinux"
- fi
-
- myconf="${myconf}
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- --without-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
- ${EXTRA_ECONF}"
-
- # 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)
-
- has_version app-admin/eselect-compiler || export CC=$(tc-getCC ${CTARGET})
-
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
- einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}"
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- addwrite ${ROOT}/
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- addwrite ${ROOT}/usr
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- addwrite ${ROOT}/usr/X11R6
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-use_multilib() {
- case ${CTARGET} in
- sparc64*|mips64*|x86_64*|powerpc64*|s390x*)
- has_multilib_profile || use multilib ;;
- *) false ;;
- esac
-}
-
-# Setup toolchain variables that would be defined in the profiles for these archs.
-setup_env() {
- # These should not be set, else the zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
- # silly users
- unset LD_RUN_PATH
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET}
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
- # and fall back on CFLAGS.
- local VAR=CFLAGS_${CTARGET//[-.]/_}
- CFLAGS=${!VAR-${CFLAGS}}
- fi
-
- setup_flags
-
- export ABI=${ABI:-${DEFAULT_ABI:-default}}
-
- if is_crosscompile || tc-is-cross-compiler ; then
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because
- # glibc's configure script checks CFLAGS for some targets (like mips)
- export CFLAGS="${!VAR} ${CFLAGS}"
- fi
-}
-
-### /ECLASS PUNTAGE ###
-
-if is_crosscompile ; then
- SLOT="${CTARGET}-2.2"
-else
- SLOT="2.2"
-fi
-
-# we'll handle stripping ourself #46186
-RESTRICT="strip"
-EMULTILIB_PKG="true"
-
-# We need a new-enough binutils for as-needed
-DEPEND="!ia64? ( >=sys-devel/gcc-3.4 )
- nptl? ( >=sys-kernel/linux-headers-${NPTL_KERNEL_VERSION} )
- >=sys-devel/binutils-2.15.94
- >=sys-devel/gcc-config-1.3.12
- >=app-misc/pax-utils-0.1.10
- virtual/os-headers
- nls? ( sys-devel/gettext )
- selinux? ( !build? ( sys-libs/libselinux ) )"
-RDEPEND="nls? ( sys-devel/gettext )
- selinux? ( !build? ( sys-libs/libselinux ) )"
-
-if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
-
- if [[ ${CATEGORY} == *-linux* ]] ; then
- if [[ ${CATEGORY} == cross-mips* ]] ; then
- DEPEND="${DEPEND} >=${CATEGORY}/mips-headers-2.6.10"
- else
- DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
- fi
- fi
-else
- DEPEND="${DEPEND} sys-libs/timezone-data"
- RDEPEND="${RDEPEND} sys-libs/timezone-data"
-fi
-
-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
- fi
-
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty, which is probably not what you want."
- fi
-
- if ! type -p scanelf > /dev/null ; then
- eerror "You do not have pax-utils installed."
- die "install pax-utils"
- fi
-
- # give some sort of warning about the nptl logic changes...
- if want_nptl && want_linuxthreads ; then
- ewarn "Warning! Gentoo's GLIBC with NPTL enabled now behaves like the"
- ewarn "glibc from almost every other distribution out there. This means"
- ewarn "that glibc is compiled -twice-, once with linuxthreads and once"
- ewarn "with nptl. The NPTL version is installed to lib/tls and is still"
- ewarn "used by default. If you do not need nor want the linuxthreads"
- ewarn "fallback, you can disable this behavior by adding nptlonly to"
- ewarn "USE to save yourself some compile time."
-
- ebeep
- epause 5
- fi
-}
-
-src_unpack() {
- setup_env
-
- # Do not enable -Bdirect support for now.
- GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 2020_all_2.3.6-hashvals.patch"
- GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 2030_all_2.3.6-bdirect.patch"
-
- toolchain-glibc_src_unpack
-
- # XXX: do not package ssp up into tarballs, leave it in FILESDIR
- cd "${S}"
- cp "${FILESDIR}"/2.3.5/ssp.c sysdeps/unix/sysv/linux/ || die "could not find ssp.c"
- rm -f "${WORKDIR}"/patches/2*
- epatch "${FILESDIR}"/2.3.6/glibc-2.3.6-propolice-guard-functions.patch
- epatch "${FILESDIR}"/2.3.5/glibc-2.3.5-frandom-detect.patch
-
- # Glibc is stupid sometimes, and doesn't realize that with a
- # static C-Only gcc, -lgcc_eh doesn't exist.
- # http://sources.redhat.com/ml/libc-alpha/2003-09/msg00100.html
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- echo 'int main(){}' > "${T}"/gcc_eh_test.c
- if ! $(tc-getCC ${CTARGET}) "${T}"/gcc_eh_test.c -lgcc_eh 2>/dev/null ; then
- sed -i -e 's:-lgcc_eh::' Makeconfig || die "sed gcc_eh"
- fi
-
- # Some configure checks fail on the first emerge through because they
- # try to link. This doesn't work well if we don't have a libc yet.
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- if is_crosscompile && use build; then
- rm "${S}"/sysdeps/sparc/sparc64/elf/configure{,.in}
- rm "${S}"/nptl/sysdeps/pthread/configure{,.in}
- fi
-
- cd "${WORKDIR}"
- find . -type f '(' -size 0 -o -name "*.orig" ')' -exec rm -f {} \;
- find . -name configure -exec touch {} \;
-
- # Fix permissions on some of the scripts
- chmod u+x "${S}"/scripts/*.sh
-}
-
-src_compile() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Building multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_compile
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_compile
- else
- toolchain-glibc_src_compile
- fi
-}
-
-src_test() {
- setup_env
-
- if [[ -z ${OABI} ]] && has_multilib_profile ; then
- OABI=${ABI}
- einfo "Testing multilib glibc for ABIs: $(get_install_abis)"
- for ABI in $(get_install_abis) ; do
- export ABI
- einfo " Testing ${ABI} glibc"
- src_test
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
-
- toolchain-glibc_src_test
-}
-
-src_strip() {
- # Now, strip everything but the thread libs #46186, as well as the dynamic
- # linker, else we cannot set breakpoints in shared libraries due to bugs in
- # gdb. Also want to grab stuff in tls subdir. whee.
-#when new portage supports this ...
-# env \
-# -uRESTRICT \
-# CHOST=${CTARGET} \
-# STRIP_MASK="/*/{,tls/}{ld-,lib{pthread,thread_db}}*" \
-# prepallstrip
- pushd "${D}" > /dev/null
-
- if ! is_crosscompile ; then
- mkdir -p "${T}"/strip-backup
- for x in $(find "${D}" -maxdepth 3 \
- '(' -name 'ld-*' -o -name 'libpthread*' -o -name 'libthread_db*' ')' \
- -a '(' '!' -name '*.a' ')' -type f -printf '%P ')
- do
- mkdir -p "${T}/strip-backup/${x%/*}"
- cp -a -- "${D}/${x}" "${T}/strip-backup/${x}" || die "backing up ${x}"
- done
- fi
- env -uRESTRICT CHOST=${CTARGET} prepallstrip
- if ! is_crosscompile ; then
- cp -a -- "${T}"/strip-backup/* "${D}"/ || die "restoring non-stripped libs"
- fi
-
- popd > /dev/null
-}
-
-src_install() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Installing multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_install
- done
- ABI=${OABI}
- unset OABI
- src_strip
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_install
- else
- toolchain-glibc_src_install
- fi
- [[ -z ${OABI} ]] && src_strip
-}
-
-pkg_preinst() {
- toolchain-glibc_pkg_preinst
-}
-
-pkg_postinst() {
- toolchain-glibc_pkg_postinst
-}
diff --git a/sys-libs/glibc/glibc-2.4-r4.ebuild b/sys-libs/glibc/glibc-2.4-r4.ebuild
deleted file mode 100644
index f4f9b1441400..000000000000
--- a/sys-libs/glibc/glibc-2.4-r4.ebuild
+++ /dev/null
@@ -1,1267 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.4-r4.ebuild,v 1.23 2009/12/10 01:31:26 vapier Exp $
-
-# 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/
-
-KEYWORDS="-* amd64 ~ia64 ~mips ppc ppc64 s390 sh ~sparc x86"
-
-BRANCH_UPDATE=""
-
-# Generated man pages
-GLIBC_MANPAGE_VERSION="none"
-
-# Generated stuff in manual subdir
-GLIBC_INFOPAGE_VERSION="none"
-
-# Gentoo patchset
-PATCH_VER="1.19"
-
-# PPC cpu addon
-# http://penguinppc.org/dev/glibc/glibc-powerpc-cpu-addon.html
-PPC_CPU_ADDON_VER="0.01"
-PPC_CPU_ADDON_TARBALL="glibc-powerpc-cpu-addon-v${PPC_CPU_ADDON_VER}.tgz"
-PPC_CPU_ADDON_URI="http://penguinppc.org/dev/glibc/${PPC_CPU_ADDON_TARBALL}"
-
-# LinuxThreads addon
-LT_VER="20060605"
-LT_TARBALL="glibc-linuxthreads-${LT_VER}.tar.bz2"
-LT_URI="ftp://sources.redhat.com/pub/glibc/snapshots/${LT_TARBALL} mirror://gentoo/${LT_TARBALL}"
-
-GENTOO_TOOLCHAIN_BASE_URI="mirror://gentoo"
-GENTOO_TOOLCHAIN_DEV_URI="http://dev.gentoo.org/~azarah/glibc/XXX http://dev.gentoo.org/~vapier/dist/XXX"
-
-### PUNT OUT TO ECLASS?? ###
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-LICENSE="LGPL-2"
-
-# note that nptl/nptlonly/glibc-compat20 are for upgrade checks only.
-# we dont generally support these things in this version.
-IUSE="nls build nptl nptlonly hardened multilib selinux glibc-omitfp profile glibc-compat20"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- PROVIDE="virtual/libc"
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-just_headers() {
- is_crosscompile && use crosscompile_opts_headers-only
-}
-
-GLIBC_RELEASE_VER=$(get_version_component_range 1-3)
-
-# Don't set this to :-, - allows BRANCH_UPDATE=""
-BRANCH_UPDATE=${BRANCH_UPDATE-$(get_version_component_range 4)}
-
-# (Recent snapshots fails with 2.6.5 and earlier with NPTL)
-NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-"2.6.9"}
-LT_KERNEL_VERSION=${LT_KERNEL_VERSION:-"2.4.1"}
-
-### SRC_URI ###
-
-# This function handles the basics of setting the SRC_URI for a glibc ebuild.
-# To use, set SRC_URI with:
-#
-# SRC_URI="$(get_glibc_src_uri)"
-#
-# Other than the variables normally set by portage, this function's behavior
-# can be altered by setting the following:
-#
-# GENTOO_TOOLCHAIN_BASE_URI
-# This sets the base URI for all gentoo-specific patch files. Note
-# that this variable is only important for a brief period of time,
-# before your source files get picked up by mirrors. However, it is
-# still highly suggested that you keep files in this location
-# available.
-#
-# BRANCH_UPDATE
-# If set, this variable signals that we should be using the main
-# release tarball (determined by ebuild version) and applying a
-# CVS branch update patch against it. The location of this branch
-# update patch is assumed to be in ${GENTOO_TOOLCHAIN_BASE_URI}.
-# Just like with SNAPSHOT, this variable is ignored if the ebuild
-# has a _pre suffix.
-#
-# PATCH_VER
-# PATCH_GLIBC_VER
-# This should be set to the version of the gentoo patch tarball.
-# The resulting filename of this tarball will be:
-# glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
-#
-# GLIBC_MANPAGE_VERSION
-# GLIBC_INFOPAGE_VERSION
-# The version of glibc for which we will download pages. This will
-# default to ${GLIBC_RELEASE_VER}, but we may not want to pre-generate man pages
-# for prerelease test ebuilds for example. This allows you to
-# continue using pre-generated manpages from the last stable release.
-# If set to "none", this will prevent the downloading of manpages,
-# which is useful for individual library targets.
-#
-get_glibc_src_uri() {
- GENTOO_TOOLCHAIN_BASE_URI=${GENTOO_TOOLCHAIN_BASE_URI:-"mirror://gentoo"}
-
-# GLIBC_SRC_URI="http://ftp.gnu.org/gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
-# http://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-${GLIBC_RELEASE_VER}.tar.bz2
-# http://ftp.gnu.org/gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2
- GLIBC_SRC_URI="mirror://gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-ports-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2"
-
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2}"
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- [[ -n ${LT_VER} ]] && GLIBC_SRC_URI="${GLIBC_SRC_URI} ${LT_URI}"
-
- GLIBC_SRC_URI="${GLIBC_SRC_URI} ${PPC_CPU_ADDON_URI}"
-
- echo "${GLIBC_SRC_URI}"
-}
-
-SRC_URI=$(get_glibc_src_uri)
-S=${WORKDIR}/glibc-${GLIBC_RELEASE_VER}
-
-### EXPORTED FUNCTIONS ###
-unpack_addon() {
- local addon=$1 ver=${2:-${GLIBC_RELEASE_VER}}
- unpack glibc-${addon}-${ver}.tar.bz2
- mv glibc-${addon}-${ver} ${addon} || die
-}
-toolchain-glibc_src_unpack() {
- # Check NPTL support _before_ we unpack things to save some time
- want_nptl && check_nptl_support
-
- unpack glibc-${GLIBC_RELEASE_VER}.tar.bz2
-
- cd "${S}"
- if [[ -n ${LT_VER} ]] ; then
- unpack ${LT_TARBALL}
- mv glibc-linuxthreads-${LT_VER}/* . || die
- fi
- unpack_addon libidn
- unpack_addon ports
-
- if [[ -n ${PPC_CPU_ADDON_TARBALL} ]] ; then
- cd "${S}"
- unpack ${PPC_CPU_ADDON_TARBALL}
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${WORKDIR}"
- unpack glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- # pull out all the addons
- local d
- for d in extra/*/configure ; do
- mv "${d%/configure}" "${S}" || die "moving ${d}"
- done
- fi
-
- # XXX: We should do the branchupdate, before extracting the manpages and
- # infopages else it does not help much (mtimes change if there is a change
- # to them with branchupdate)
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- cd "${S}"
- epatch "${DISTDIR}"/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
-
- # Snapshot date patch
- einfo "Patching version to display snapshot date ..."
- sed -i -e "s:\(#define RELEASE\).*:\1 \"${BRANCH_UPDATE}\":" version.h
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- cd "${WORKDIR}"
- unpack glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- cd "${S}"
- unpack glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${S}"
- EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset ${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-${PATCH_VER} ..." \
- EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \
- EPATCH_SUFFIX="patch" \
- ARCH=$(tc-arch) \
- epatch "${WORKDIR}"/patches
-
- # tag, glibc is it
- [[ -e csu/Banner ]] && die "need new banner location"
- echo "Gentoo patchset ${PATCH_VER}" > csu/Banner
- fi
-
- gnuconfig_update
-}
-
-toolchain-glibc_src_compile() {
- echo
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
- echo
-
- if want_linuxthreads ; then
- glibc_do_configure linuxthreads
- einfo "Building GLIBC with linuxthreads..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
- if want_nptl ; then
- # ... and then do the optional nptl build
- unset LD_ASSUME_KERNEL
- glibc_do_configure nptl
- einfo "Building GLIBC with NPTL..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
-}
-
-toolchain-glibc_headers_compile() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
-
- # Pick out the correct location for build headers
- local myconf="--disable-sanity-checks --enable-hacker-mode"
- myconf="${myconf}
- --enable-add-ons=nptl,ports
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(alt_build_headers)
- --prefix=/usr
- ${EXTRA_ECONF}"
-
- einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}"
- CC=gcc \
- CFLAGS="-O1 -pipe" \
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-toolchain-glibc_src_test() {
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-$1 || die "cd build-${ABI}-${CTARGET}-$1"
- unset LD_ASSUME_KERNEL
- make check || die "make check failed for ${ABI}-${CTARGET}-$1"
-}
-
-toolchain-glibc_pkg_preinst() {
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && ! { want_nptl && want_linuxthreads; }; then
- addwrite "${ROOT}"/$(alt_libdir)/
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # Shouldnt need to keep this updated
- [[ -e ${ROOT}/etc/locale.gen ]] && rm -f "${D}"/etc/locale.gen
-}
-
-toolchain-glibc_src_install() {
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
-
- local GBUILDDIR
- if want_linuxthreads ; then
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads
- else
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
- fi
-
- local install_root=${D}
- if is_crosscompile ; then
- install_root="${install_root}/usr/${CTARGET}"
- fi
- if want_linuxthreads ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
- einfo "Installing GLIBC ${ABI} with linuxthreads ..."
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${install_root}" \
- install || die
- else # nptlonly
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- einfo "Installing GLIBC ${ABI} with NPTL ..."
- make PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${install_root}" \
- install || die
- fi
-
- if is_crosscompile ; then
- # punt all the junk not needed by a cross-compiler
- cd "${D}"/usr/${CTARGET} || die
- rm -rf ./{,usr/}{bin,etc,sbin,share} ./{,usr/}*/{gconv,misc}
- fi
-
- if want_linuxthreads && want_nptl ; then
- einfo "Installing NPTL to $(alt_libdir)/tls/..."
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl
-
- local l src_lib
- for l in libc libm librt libpthread libthread_db ; do
- # take care of shared lib first ...
- l=${l}.so
- if [[ -e ${l} ]] ; then
- src_lib=${l}
- else
- src_lib=$(eval echo */${l})
- fi
- cp -a ${src_lib} "${D}"$(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})
-
- # then grab the linker script or the symlink ...
- if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then
- dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l}
- else
- sed \
- -e "s:/${l}:/tls/${l}:g" \
- -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \
- "${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} "${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} "${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 "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp"
- fi
-
- # We'll take care of the cache ourselves
- rm -f "${D}"/etc/ld.so.cache
-
- # Some things want this, notably ash.
- dosym libbsd-compat.a $(alt_usrlibdir)/libbsd.a
-
- # Handle includes for different ABIs
- prep_ml_includes $(alt_headers)
-
- # When cross-compiling for a non-multilib setup, make sure we have
- # lib and a proper symlink setup
- if is_crosscompile && ! use multilib && ! has_multilib_profile && [[ $(get_libdir) != "lib" ]] ; then
- cd "${D}"$(alt_libdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- cd "${D}"$(alt_usrlibdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- return 0
- fi
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems
- if has_multilib_profile ; then
- case $(tc-arch) in
- amd64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR amd64) /lib
- dosym /$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2
- ;;
- ppc64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ppc64) /lib
- dosym /$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1
- ;;
- esac
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen || die
- doman *.[0-8]
- insinto /etc
- doins locale.gen || die
-
- # Make sure all the ABI's can find the locales and so we only
- # have to generate one set
- local a
- keepdir /usr/$(get_libdir)/locale
- for a in $(get_install_abis) ; do
- if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then
- dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale
- fi
- done
-
- if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- einfo "Installing info pages..."
-
- make \
- -C "${GBUILDDIR}" \
- PARALLELMFLAGS="${MAKEOPTS} -j1" \
- install_root="${install_root}" \
- info -i || die
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- einfo "Installing man pages..."
-
- # Install linuxthreads man pages even if nptl is enabled
- cd "${WORKDIR}"/man
- doman *.3thr
- fi
-
- # Install misc network config files
- insinto /etc
- doins "${WORKDIR}"/extra/etc/*.conf || die
- doinitd "${WORKDIR}"/extra/etc/nscd || die
-
- cd "${S}"
- dodoc BUGS ChangeLog* CONFORMANCE FAQ INTERFACE NEWS NOTES PROJECTS README*
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${D}"/etc/localtime
-
- # simple test to make sure our new glibc isnt completely broken.
- # for now, skip the multilib scenario. also make sure we don't
- # test with statically built binaries since they will fail.
- [[ ${CBUILD} != ${CHOST} ]] && return 0
- [[ $(get_libdir) != "lib" ]] && return 0
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest} == *"statically linked"* ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
-
-toolchain-glibc_headers_install() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- cd "${GBUILDDIR}"
- make install_root="${D}/usr/${CTARGET}" install-headers || die "install-headers failed"
- # Copy over headers that are not part of install-headers ... these
- # are pretty much taken verbatim from crosstool, see it for more details
- insinto $(alt_headers)/bits
- doins misc/syscall-list.h bits/stdio_lim.h || die "doins include bits"
- insinto $(alt_headers)/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
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include /usr/${CTARGET}/sys-include
-}
-
-toolchain-glibc_pkg_postinst() {
- # Mixing nptlonly and -nptlonly glibc can prove dangerous if libpthread
- # isn't removed in unmerge which happens sometimes. See bug #87671
- if ! is_crosscompile && want_linuxthreads && [[ ${ROOT} == "/" ]] ; then
- for libdir in $(get_all_libdirs) ; do
- for f in "${ROOT}"/${libdir}/libpthread-2.* "${ROOT}"/${libdir}/libpthread-0.6* ; do
- if [[ -f ${f} ]] ; then
- rm -f ${f}
- ldconfig
- fi
- done
- done
- fi
-
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if [[ ! -e ${ROOT}/lib/ld.so.1 ]] && use ppc64 && ! has_multilib_profile ; then
- ## SHOULDN'T THIS BE lib64??
- ln -s ld64.so.1 "${ROOT}"/lib/ld.so.1
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ...
- /sbin/telinit U &> /dev/null
-
- # if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}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"
- fi
- local x jobs
- for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done
- locale-gen -j ${jobs:-1} --config "${locale_list}"
- fi
-
- echo
- einfo "Gentoo's glibc no longer includes mdns."
- einfo "If you want mdns, emerge the sys-auth/nss-mdns package."
- echo
-
- if want_nptl && want_linuxthreads ; then
- einfo "The default behavior of glibc on your system is to use NPTL. If"
- einfo "you want to use linuxthreads for a particular program, start it"
- einfo "by executing 'LD_ASSUME_KERNEL=${LT_KERNEL_VERSION} <program> [<options>]'"
- echo
- fi
-}
-
-### SUPPORT FUNCTIONS ###
-# We need to be able to set alternative headers for
-# compiling for non-native platform
-# Will also become useful for testing kernel-headers without screwing up
-# the whole system.
-# note: intentionally undocumented.
-alt_headers() {
- if [[ -z ${ALT_HEADERS} ]] ; then
- if is_crosscompile ; then
- ALT_HEADERS="/usr/${CTARGET}/usr/include"
- else
- ALT_HEADERS="/usr/include"
- fi
- fi
- echo "${ALT_HEADERS}"
-}
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS=$(alt_headers)
- tc-is-cross-compiler && ALT_BUILD_HEADERS=${ROOT}$(alt_headers)
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /$(get_libdir)
- fi
-}
-
-alt_usrlibdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/usr/$(get_libdir)
- else
- echo /usr/$(get_libdir)
- fi
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- strip-unsupported-flags
- filter-flags -m32 -m64 -mabi=*
-
- unset CBUILD_OPT CTARGET_OPT
- if has_multilib_profile ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- case $(tc-arch) in
- amd64)
- # Punt this when amd64's 2004.3 is removed
- CFLAGS_x86="-m32"
- ;;
- ppc)
- append-flags "-freorder-blocks"
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
- filter-flags "-mvis"
-
- if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
- case ${ABI} in
- sparc64)
- filter-flags -Wa,-xarch -Wa,-A
-
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparc64b-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9b"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
- else
- CTARGET_OPT="sparc64-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9a"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a"
- fi
- ;;
- *)
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- else
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- ;;
- esac
- else
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- elif { is_crosscompile && want_nptl; } || is-flag "-mcpu=ultrasparc2" || is-flag "-mcpu=ultrasparc"; then
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- fi
- ;;
- esac
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- if $(tc-getCC ${CTARGET}) -v 2>&1 | grep -q 'gcc version 3.[0123]'; then
- append-flags -finline-limit=2000
- fi
-
- # We dont want these flags for glibc
- filter-ldflags -pie
-
- # Lock glibc at -O2 -- linuxthreads needs it and we want to be
- # conservative here. -fno-strict-aliasing is to work around #155906
- filter-flags -O?
- append-flags -O2 -fno-strict-aliasing
-}
-
-check_kheader_version() {
- local header="$(alt_build_headers)/linux/version.h"
-
- [[ -z $1 ]] && return 1
-
- if [[ -f ${header} ]] ; then
- local version=$(grep 'LINUX_VERSION_CODE' ${header} | \
- sed -e 's:^.*LINUX_VERSION_CODE[[:space:]]*::')
-
- if [[ ${version} -ge "$1" ]] ; then
- return 0
- fi
- fi
-
- return 1
-}
-
-check_nptl_support() {
- local min_kernel_version=$(KV_to_int "${NPTL_KERNEL_VERSION}")
-
- echo
-
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking kernel version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $([[ $(get_KV) -ge ${min_kernel_version} ]] ; echo $?) ; then
- echo
- eerror "You need a kernel of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "Kernel version too low!"
- fi
- fi
-
- # Building fails with too low linux-headers
- ebegin "Checking linux-headers version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $(check_kheader_version "${min_kernel_version}" ; echo $?) ; then
- echo
- eerror "You need linux-headers of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "linux-headers version too low!"
- fi
-
- echo
-}
-
-want_nptl() {
- want_tls || return 1
- use nptl || return 1
-
- # Only list the arches that cannot do NPTL
- case $(tc-arch) in
- hppa|m68k) return 1;;
- sparc)
- # >= v9 is needed for nptl.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
- ;;
- esac
-
- return 0
-}
-
-want_linuxthreads() {
- ! use nptlonly && return 0
- want_nptl || return 0
- return 1
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- sparc)
- # 2.3.6 should have tls support on sparc64
- # when using newer binutils
- case ${CTARGET/-*} in
- sparc64*) return 1 ;;
- *) return 0 ;;
- esac
- ;;
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- return 1
- ;;
- esac
-
- return 0
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- echo 'extern __thread int i;' > "${T}"/test-__thread.c
- $(tc-getCC ${CTARGET}) -c "${T}"/test-__thread.c -o "${T}"/test-__thread.o &> /dev/null
- WANT__THREAD=$?
- rm -f "${T}"/test-__thread.[co]
-
- return ${WANT__THREAD}
-}
-
-glibc_do_configure() {
- local myconf
-
- # set addons
- pushd "${S}" > /dev/null
- local ADDONS=$(echo */configure | sed \
- -e 's:/configure::g' \
- -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \
- -e 's: \+$::' \
- -e 's! !,!g' \
- -e 's!^!,!' \
- -e '/^,\*$/d')
- popd > /dev/null
-
- if [[ -n ${PPC_CPU_ADDON_VER} ]] && [[ $(tc-arch) == ppc* ]] ; then
- ADDONS="${ADDONS},powerpc-cpu"
- case $(get-flag mcpu) in
- 970|power4|power5|power5+) myconf="${myconf} --with-cpu=$(get-flag mcpu)"
- esac
- fi
-
- use nls || myconf="${myconf} --disable-nls"
- myconf="${myconf} $(use_enable hardened stackguard-randomization)"
- if [[ $(<"${T}"/.ssp.compat) == "yes" ]] ; then
- myconf="${myconf} --enable-old-ssp-compat"
- else
- myconf="${myconf} --disable-old-ssp-compat"
- fi
-
- use glibc-omitfp && myconf="${myconf} --enable-omitfp"
-
- [[ ${CTARGET//_/-} == *-softfloat-* ]] && myconf="${myconf} --without-fp"
-
- if [[ $1 == "linuxthreads" ]] ; then
- if want_tls ; then
- myconf="${myconf} --with-tls"
-
- if ! want__thread || use glibc-compat20 || [[ ${LT_KERNEL_VERSION} == 2.[02].* ]] ; then
- myconf="${myconf} --without-__thread"
- else
- myconf="${myconf} --with-__thread"
- fi
- else
- myconf="${myconf} --without-tls --without-__thread"
- fi
-
- myconf="${myconf} --disable-sanity-checks"
- myconf="${myconf} --enable-add-ons=ports,linuxthreads${ADDONS}"
- myconf="${myconf} --enable-kernel=${LT_KERNEL_VERSION}"
- elif [[ $1 == "nptl" ]] ; then
- myconf="${myconf} --with-tls --with-__thread"
- myconf="${myconf} --enable-add-ons=ports,nptl${ADDONS}"
- myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}"
- else
- die "invalid pthread option"
- fi
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. ! USE build
- # 3. only for the primary ABI on multilib systems
- if use selinux && ! use build ; then
- if use multilib || has_multilib_profile ; then
- if is_final_abi ; then
- myconf="${myconf} --with-selinux"
- else
- myconf="${myconf} --without-selinux"
- fi
- else
- myconf="${myconf} --with-selinux"
- fi
- else
- myconf="${myconf} --without-selinux"
- fi
-
- myconf="${myconf}
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- --without-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
- ${EXTRA_ECONF}"
-
- # 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)
-
- has_version app-admin/eselect-compiler || export CC=$(tc-getCC ${CTARGET})
-
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
- einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}"
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- addwrite ${ROOT}/
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- addwrite ${ROOT}/usr
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- addwrite ${ROOT}/usr/X11R6
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-use_multilib() {
- case ${CTARGET} in
- sparc64*|mips64*|x86_64*|powerpc64*|s390x*)
- has_multilib_profile || use multilib ;;
- *) false ;;
- esac
-}
-
-# Setup toolchain variables that would be defined in the profiles for these archs.
-setup_env() {
- # These should not be set, else the zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
- # silly users
- unset LD_RUN_PATH
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET}
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
- # and fall back on CFLAGS.
- local VAR=CFLAGS_${CTARGET//[-.]/_}
- CFLAGS=${!VAR-${CFLAGS}}
- fi
-
- setup_flags
-
- export ABI=${ABI:-${DEFAULT_ABI:-default}}
-
- if is_crosscompile || tc-is-cross-compiler ; then
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because
- # glibc's configure script checks CFLAGS for some targets (like mips)
- export CFLAGS="${!VAR} ${CFLAGS}"
- fi
-}
-
-### /ECLASS PUNTAGE ###
-
-if is_crosscompile ; then
- SLOT="${CTARGET}-2.2"
-else
- SLOT="2.2"
-fi
-
-# we'll handle stripping ourself #46186
-RESTRICT="strip"
-EMULTILIB_PKG="true"
-
-# General: We need a new-enough binutils for as-needed
-# arch: we need to make sure our binutils/gcc supports TLS
-DEPEND=">=sys-devel/gcc-3.4.4
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 )
- ppc? ( >=sys-devel/gcc-4.1.0 )
- ppc64? ( >=sys-devel/gcc-4.1.0 )
- nptl? ( || ( >=sys-kernel/mips-headers-${NPTL_KERNEL_VERSION} >=sys-kernel/linux-headers-${NPTL_KERNEL_VERSION} ) )
- >=sys-devel/binutils-2.15.94
- >=sys-devel/gcc-config-1.3.12
- >=app-misc/pax-utils-0.1.10
- virtual/os-headers
- nls? ( sys-devel/gettext )
- selinux? ( !build? ( sys-libs/libselinux ) )"
-RDEPEND="nls? ( sys-devel/gettext )
- selinux? ( !build? ( sys-libs/libselinux ) )"
-
-if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
-
- if [[ ${CATEGORY} == *-linux* ]] ; then
- if [[ ${CATEGORY} == cross-mips* ]] ; then
- DEPEND="${DEPEND} >=${CATEGORY}/mips-headers-2.6.10"
- else
- DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
- fi
- fi
-else
- DEPEND="${DEPEND} sys-libs/timezone-data"
- RDEPEND="${RDEPEND} sys-libs/timezone-data"
-fi
-
-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
- fi
-
- if use glibc-compat20 ; then
- eerror "This version no longer provides compatibility with old broken"
- eerror "applications. If you need this support, call your vendor"
- eerror "and tell them to release an update that isn't broken."
- die "non-TLS symbol errno@glibc_2.0 not supported"
- fi
- if want_linuxthreads ; then
- ewarn "glibc-2.4 is nptl-only!"
- [[ ${CTARGET} == i386-* ]] && eerror "NPTL requires a CHOST of i486 or better"
- die "please add USE='nptl nptlonly' to make.conf"
- fi
-
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty, which is probably not what you want."
- fi
-
- if ! type -p scanelf > /dev/null ; then
- eerror "You do not have pax-utils installed."
- die "install pax-utils"
- fi
-
- # give some sort of warning about the nptl logic changes...
- if want_nptl && want_linuxthreads ; then
- ewarn "Warning! Gentoo's GLIBC with NPTL enabled now behaves like the"
- ewarn "glibc from almost every other distribution out there. This means"
- ewarn "that glibc is compiled -twice-, once with linuxthreads and once"
- ewarn "with nptl. The NPTL version is installed to lib/tls and is still"
- ewarn "used by default. If you do not need nor want the linuxthreads"
- ewarn "fallback, you can disable this behavior by adding nptlonly to"
- ewarn "USE to save yourself some compile time."
-
- ebeep
- epause 5
- fi
-}
-
-src_unpack() {
- setup_env
-
- toolchain-glibc_src_unpack
-
- # Backwards SSP support
- cd "${S}"
-# For now, we force everyone to have the extra symbols
-# einfon "Scanning system for __guard to see if we need SSP compat ... "
-# if [[ -n $(scanelf -qyls__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then
- echo "yes" > "${T}"/.ssp.compat
-# else
-# # ok, a quick scan didnt find it, so lets do a deep scan ...
-# if [[ -n $(scanelf -qyRlps__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then
-# echo "yes" > "${T}"/.ssp.compat
-# else
-# echo "no" > "${T}"/.ssp.compat
-# fi
-# fi
-# cat "${T}"/.ssp.compat
-
- # Glibc is stupid sometimes, and doesn't realize that with a
- # static C-Only gcc, -lgcc_eh doesn't exist.
- # http://sources.redhat.com/ml/libc-alpha/2003-09/msg00100.html
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- echo 'int main(){}' > "${T}"/gcc_eh_test.c
- if ! $(tc-getCC ${CTARGET}) "${T}"/gcc_eh_test.c -lgcc_eh 2>/dev/null ; then
- sed -i -e 's:-lgcc_eh::' Makeconfig || die "sed gcc_eh"
- fi
-
- # Some configure checks fail on the first emerge through because they
- # try to link. This doesn't work well if we don't have a libc yet.
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- if is_crosscompile && use build; then
- rm "${S}"/sysdeps/sparc/sparc64/elf/configure{,.in}
- rm "${S}"/nptl/sysdeps/pthread/configure{,.in}
- fi
-
- cd "${WORKDIR}"
- find . -type f '(' -size 0 -o -name "*.orig" ')' -exec rm -f {} \;
- find . -name configure -exec touch {} \;
-
- # Fix permissions on some of the scripts
- chmod u+x "${S}"/scripts/*.sh
-}
-
-src_compile() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Building multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_compile
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_compile
- else
- toolchain-glibc_src_compile
- fi
-}
-
-src_test() {
- setup_env
-
- if [[ -z ${OABI} ]] && has_multilib_profile ; then
- OABI=${ABI}
- einfo "Testing multilib glibc for ABIs: $(get_install_abis)"
- for ABI in $(get_install_abis) ; do
- export ABI
- einfo " Testing ${ABI} glibc"
- src_test
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
-
- want_linuxthreads && toolchain-glibc_src_test linuxthreads
- want_nptl && toolchain-glibc_src_test nptl
-}
-
-src_strip() {
- # Now, strip everything but the thread libs #46186, as well as the dynamic
- # linker, else we cannot set breakpoints in shared libraries due to bugs in
- # gdb. Also want to grab stuff in tls subdir. whee.
-#when new portage supports this ...
-# env \
-# -uRESTRICT \
-# CHOST=${CTARGET} \
-# STRIP_MASK="/*/{,tls/}{ld-,lib{pthread,thread_db}}*" \
-# prepallstrip
- pushd "${D}" > /dev/null
-
- if ! is_crosscompile ; then
- mkdir -p "${T}"/strip-backup
- for x in $(find "${D}" -maxdepth 3 \
- '(' -name 'ld-*' -o -name 'libpthread*' -o -name 'libthread_db*' ')' \
- -a '(' '!' -name '*.a' ')' -type f -printf '%P ')
- do
- mkdir -p "${T}/strip-backup/${x%/*}"
- cp -a -- "${D}/${x}" "${T}/strip-backup/${x}" || die "backing up ${x}"
- done
- fi
- env -uRESTRICT CHOST=${CTARGET} prepallstrip
- if ! is_crosscompile ; then
- cp -a -- "${T}"/strip-backup/* "${D}"/ || die "restoring non-stripped libs"
- fi
-
- popd > /dev/null
-}
-
-src_install() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Installing multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_install
- done
- ABI=${OABI}
- unset OABI
- src_strip
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_install
- else
- toolchain-glibc_src_install
- fi
- [[ -z ${OABI} ]] && src_strip
-}
-
-pkg_preinst() {
- toolchain-glibc_pkg_preinst
-}
-
-pkg_postinst() {
- toolchain-glibc_pkg_postinst
-}
diff --git a/sys-libs/glibc/glibc-2.5-r2.ebuild b/sys-libs/glibc/glibc-2.5-r2.ebuild
deleted file mode 100644
index a1275f939171..000000000000
--- a/sys-libs/glibc/glibc-2.5-r2.ebuild
+++ /dev/null
@@ -1,1250 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.5-r2.ebuild,v 1.21 2009/12/10 01:31:25 vapier Exp $
-
-# 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/
-
-KEYWORDS="-* alpha amd64 arm hppa ia64 mips ppc ppc64 ~s390 sh sparc x86"
-
-BRANCH_UPDATE=""
-
-# Generated man pages
-GLIBC_MANPAGE_VERSION="none"
-
-# Generated stuff in manual subdir
-GLIBC_INFOPAGE_VERSION="none"
-
-# Gentoo patchset
-PATCH_VER="1.6"
-
-GENTOO_TOOLCHAIN_BASE_URI="mirror://gentoo"
-GENTOO_TOOLCHAIN_DEV_URI="http://dev.gentoo.org/~azarah/glibc/XXX http://dev.gentoo.org/~vapier/dist/XXX"
-
-### PUNT OUT TO ECLASS?? ###
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-LICENSE="LGPL-2"
-
-IUSE="build debug nls nptl nptlonly hardened multilib selinux glibc-omitfp profile glibc-compat20"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- PROVIDE="virtual/libc"
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-just_headers() {
- is_crosscompile && use crosscompile_opts_headers-only
-}
-
-GLIBC_RELEASE_VER=$(get_version_component_range 1-3)
-
-# Don't set this to :-, - allows BRANCH_UPDATE=""
-BRANCH_UPDATE=${BRANCH_UPDATE-$(get_version_component_range 4)}
-GLIBC_PORTS_VER=${GLIBC_RELEASE_VER}
-#GLIBC_PORTS_VER="20060925"
-GLIBC_LT_VER=${GLIBC_RELEASE_VER}
-#GLIBC_LT_VER="20060605"
-
-# (Recent snapshots fails with 2.6.5 and earlier with NPTL)
-NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-"2.6.9"}
-LT_KERNEL_VERSION=${LT_KERNEL_VERSION:-"2.4.1"}
-
-[[ ${CTARGET} == hppa* ]] && NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-2.6.20}
-
-### SRC_URI ###
-
-# This function handles the basics of setting the SRC_URI for a glibc ebuild.
-# To use, set SRC_URI with:
-#
-# SRC_URI="$(get_glibc_src_uri)"
-#
-# Other than the variables normally set by portage, this function's behavior
-# can be altered by setting the following:
-#
-# GENTOO_TOOLCHAIN_BASE_URI
-# This sets the base URI for all gentoo-specific patch files. Note
-# that this variable is only important for a brief period of time,
-# before your source files get picked up by mirrors. However, it is
-# still highly suggested that you keep files in this location
-# available.
-#
-# BRANCH_UPDATE
-# If set, this variable signals that we should be using the main
-# release tarball (determined by ebuild version) and applying a
-# CVS branch update patch against it. The location of this branch
-# update patch is assumed to be in ${GENTOO_TOOLCHAIN_BASE_URI}.
-# Just like with SNAPSHOT, this variable is ignored if the ebuild
-# has a _pre suffix.
-#
-# PATCH_VER
-# PATCH_GLIBC_VER
-# This should be set to the version of the gentoo patch tarball.
-# The resulting filename of this tarball will be:
-# glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
-#
-# GLIBC_MANPAGE_VERSION
-# GLIBC_INFOPAGE_VERSION
-# The version of glibc for which we will download pages. This will
-# default to ${GLIBC_RELEASE_VER}, but we may not want to pre-generate man pages
-# for prerelease test ebuilds for example. This allows you to
-# continue using pre-generated manpages from the last stable release.
-# If set to "none", this will prevent the downloading of manpages,
-# which is useful for individual library targets.
-#
-get_glibc_src_uri() {
- GENTOO_TOOLCHAIN_BASE_URI=${GENTOO_TOOLCHAIN_BASE_URI:-"mirror://gentoo"}
-
- GLIBC_SRC_URI="mirror://gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-ports-${GLIBC_PORTS_VER}.tar.bz2
- ftp://sources.redhat.com/pub/glibc/snapshots/glibc-ports-${GLIBC_PORTS_VER}.tar.bz2
- mirror://gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2"
-
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2}"
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- if [[ -n ${GLIBC_LT_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- mirror://gnu/glibc/glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2
- ftp://sources.redhat.com/pub/glibc/snapshots/glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2"
- fi
-
- echo "${GLIBC_SRC_URI}"
-}
-
-SRC_URI=$(get_glibc_src_uri)
-S=${WORKDIR}/glibc-${GLIBC_RELEASE_VER}
-
-### EXPORTED FUNCTIONS ###
-unpack_addon() {
- local addon=$1 ver=${2:-${GLIBC_RELEASE_VER}}
- unpack glibc-${addon}-${ver}.tar.bz2
- mv glibc-${addon}-${ver} ${addon} || die
-}
-toolchain-glibc_src_unpack() {
- # Check NPTL support _before_ we unpack things to save some time
- want_nptl && check_nptl_support
-
- unpack glibc-${GLIBC_RELEASE_VER}.tar.bz2
-
- cd "${S}"
- [[ -n ${GLIBC_LT_VER} ]] && unpack glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2
- unpack_addon libidn
- unpack_addon ports ${GLIBC_PORTS_VER}
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${WORKDIR}"
- unpack glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- # pull out all the addons
- local d
- for d in extra/*/configure ; do
- mv "${d%/configure}" "${S}" || die "moving ${d}"
- done
- fi
-
- # XXX: We should do the branchupdate, before extracting the manpages and
- # infopages else it does not help much (mtimes change if there is a change
- # to them with branchupdate)
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- cd "${S}"
- epatch "${DISTDIR}"/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
-
- # Snapshot date patch
- einfo "Patching version to display snapshot date ..."
- sed -i -e "s:\(#define RELEASE\).*:\1 \"${BRANCH_UPDATE}\":" version.h
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- cd "${WORKDIR}"
- unpack glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- cd "${S}"
- unpack glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${S}"
- EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset ${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-${PATCH_VER} ..." \
- EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \
- EPATCH_SUFFIX="patch" \
- ARCH=$(tc-arch) \
- epatch "${WORKDIR}"/patches
-
- # tag, glibc is it
- [[ -e csu/Banner ]] && die "need new banner location"
- echo "Gentoo patchset ${PATCH_VER}" > csu/Banner
- fi
-
- if use hardened ; then
- cd "${S}"
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
- gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch
- epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch
- epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-inittls-nosysenter.patch
-
- einfo "Installing Hardened Gentoo SSP handler"
- cp -f "${FILESDIR}"/2.5/glibc-2.5-gentoo-stack_chk_fail.c \
- debug/stack_chk_fail.c || die
-
- if use debug ; then
- # When using Hardened Gentoo stack handler, have smashes dump core for
- # analysis - debug only, as core could be an information leak
- # (paranoia).
- sed -i \
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
- debug/Makefile \
- || die "Failed to modify debug/Makefile for debug stack handler"
- fi
-
- # Build nscd with ssp-all
- sed -i \
- -e 's:-fstack-protector$:-fstack-protector-all:' \
- nscd/Makefile \
- || die "Failed to ensure nscd builds with ssp-all"
- fi
-
- gnuconfig_update
-}
-
-toolchain-glibc_src_compile() {
- echo
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
- echo
-
- if want_linuxthreads ; then
- glibc_do_configure linuxthreads
- einfo "Building GLIBC with linuxthreads..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
- if want_nptl ; then
- # ... and then do the optional nptl build
- unset LD_ASSUME_KERNEL
- glibc_do_configure nptl
- einfo "Building GLIBC with NPTL..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
-}
-
-toolchain-glibc_headers_compile() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
-
- # Pick out the correct location for build headers
- local myconf="--disable-sanity-checks --enable-hacker-mode"
- myconf="${myconf}
- --enable-add-ons=nptl,ports
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(alt_build_headers)
- --prefix=/usr
- ${EXTRA_ECONF}"
-
- einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}"
- CC=gcc \
- CFLAGS="-O1 -pipe" \
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-toolchain-glibc_src_test() {
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-$1 || die "cd build-${ABI}-${CTARGET}-$1"
- unset LD_ASSUME_KERNEL
- make check && return 0
- einfo "make check failed - re-running with --keep-going to get the rest of the results"
- make -k check
- ewarn "make check failed for ${ABI}-${CTARGET}-$1"
- return 1
-}
-
-toolchain-glibc_pkg_preinst() {
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && ! { want_nptl && want_linuxthreads; }; then
- addwrite "${ROOT}"/$(alt_libdir)/
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # Shouldnt need to keep this updated
- [[ -e ${ROOT}/etc/locale.gen ]] && rm -f "${D}"/etc/locale.gen
-
- # simple test to make sure our new glibc isnt completely broken.
- # make sure we don't test with statically built binaries since
- # they will fail. also, skip if this glibc is a cross compiler.
- [[ ${ROOT} != "/" ]] && return 0
- is_crosscompile && return 0
- local x striptest
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest} == *"statically linked"* ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
-
-toolchain-glibc_src_install() {
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
-
- local GBUILDDIR
- if want_linuxthreads ; then
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads
- else
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
- fi
-
- local install_root=${D}
- is_crosscompile && install_root="${install_root}/usr/${CTARGET}"
- if want_linuxthreads ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
- einfo "Installing GLIBC ${ABI} with linuxthreads ..."
- make PARALLELMFLAGS="${MAKEOPTS}" \
- install_root="${install_root}" \
- install || die
- else # nptlonly
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- einfo "Installing GLIBC ${ABI} with NPTL ..."
- make PARALLELMFLAGS="${MAKEOPTS}" \
- install_root="${install_root}" \
- install || die
- fi
-
- if is_crosscompile ; then
- # punt all the junk not needed by a cross-compiler
- cd "${D}"/usr/${CTARGET} || die
- rm -rf ./{,usr/}{bin,etc,sbin,share} ./{,usr/}*/{gconv,misc}
- fi
-
- if want_linuxthreads && want_nptl ; then
- einfo "Installing NPTL to $(alt_libdir)/tls/..."
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl
-
- local l src_lib
- for l in libc libm librt libpthread libthread_db ; do
- # take care of shared lib first ...
- l=${l}.so
- if [[ -e ${l} ]] ; then
- src_lib=${l}
- else
- src_lib=$(eval echo */${l})
- fi
- cp -a ${src_lib} "${D}"$(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})
-
- # then grab the linker script or the symlink ...
- if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then
- dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l}
- else
- sed \
- -e "s:/${l}:/tls/${l}:g" \
- -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \
- "${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} "${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} "${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 "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp"
- fi
-
- # We'll take care of the cache ourselves
- rm -f "${D}"/etc/ld.so.cache
-
- # Some things want this, notably ash.
- dosym libbsd-compat.a $(alt_usrlibdir)/libbsd.a
-
- # Handle includes for different ABIs
- prep_ml_includes $(alt_headers)
-
- # When cross-compiling for a non-multilib setup, make sure we have
- # lib and a proper symlink setup
- if is_crosscompile && ! use multilib && ! has_multilib_profile && [[ $(get_libdir) != "lib" ]] ; then
- cd "${D}"$(alt_libdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- cd "${D}"$(alt_usrlibdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- return 0
- fi
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems
- if has_multilib_profile ; then
- case $(tc-arch) in
- amd64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR amd64) /lib
- dosym ../$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2
- ;;
- ppc64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ppc64) /lib
- dosym ../$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1
- ;;
- esac
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen || die
- doman *.[0-8]
- insinto /etc
- doins locale.gen || die
-
- # Make sure all the ABI's can find the locales and so we only
- # have to generate one set
- local a
- keepdir /usr/$(get_libdir)/locale
- for a in $(get_install_abis) ; do
- if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then
- dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale
- fi
- done
-
- if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- einfo "Installing info pages..."
-
- make \
- -C "${GBUILDDIR}" \
- PARALLELMFLAGS="${MAKEOPTS}" \
- install_root="${install_root}" \
- info -i || die
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- einfo "Installing man pages..."
-
- # Install linuxthreads man pages even if nptl is enabled
- cd "${WORKDIR}"/man
- doman *.3thr
- fi
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf || die
- doins "${WORKDIR}"/extra/etc/*.conf || die
- doinitd "${WORKDIR}"/extra/etc/nscd || die
-
- dodoc BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README*
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${D}"/etc/localtime
-}
-
-toolchain-glibc_headers_install() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- cd "${GBUILDDIR}"
- make install_root="${D}/usr/${CTARGET}" install-headers || die "install-headers failed"
- # Copy over headers that are not part of install-headers ... these
- # are pretty much taken verbatim from crosstool, see it for more details
- insinto $(alt_headers)/bits
- doins misc/syscall-list.h bits/stdio_lim.h || die "doins include bits"
- insinto $(alt_headers)/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
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include /usr/${CTARGET}/sys-include
-}
-
-toolchain-glibc_pkg_postinst() {
- # Mixing nptlonly and -nptlonly glibc can prove dangerous if libpthread
- # isn't removed in unmerge which happens sometimes. See bug #87671
- if ! is_crosscompile && want_linuxthreads && [[ ${ROOT} == "/" ]] ; then
- for libdir in $(get_all_libdirs) ; do
- for f in "${ROOT}"/${libdir}/libpthread-2.* "${ROOT}"/${libdir}/libpthread-0.6* ; do
- if [[ -f ${f} ]] ; then
- rm -f ${f}
- ldconfig
- fi
- done
- done
- fi
-
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if [[ ! -e ${ROOT}/lib/ld.so.1 ]] && use ppc64 && ! has_multilib_profile ; then
- ## SHOULDN'T THIS BE lib64??
- ln -s ld64.so.1 "${ROOT}"/lib/ld.so.1
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ...
- /sbin/telinit U &> /dev/null
-
- # if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}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"
- fi
- local x jobs
- for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done
- locale-gen -j ${jobs:-1} --config "${locale_list}"
- fi
-
- echo
- einfo "Gentoo's glibc no longer includes mdns."
- einfo "If you want mdns, emerge the sys-auth/nss-mdns package."
- echo
-
- if want_nptl && want_linuxthreads ; then
- einfo "The default behavior of glibc on your system is to use NPTL. If"
- einfo "you want to use linuxthreads for a particular program, start it"
- einfo "by executing 'LD_ASSUME_KERNEL=${LT_KERNEL_VERSION} <program> [<options>]'"
- echo
- fi
-}
-
-### SUPPORT FUNCTIONS ###
-# We need to be able to set alternative headers for
-# compiling for non-native platform
-# Will also become useful for testing kernel-headers without screwing up
-# the whole system.
-# note: intentionally undocumented.
-alt_headers() {
- if [[ -z ${ALT_HEADERS} ]] ; then
- if is_crosscompile ; then
- ALT_HEADERS="/usr/${CTARGET}/usr/include"
- else
- ALT_HEADERS="/usr/include"
- fi
- fi
- echo "${ALT_HEADERS}"
-}
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS=$(alt_headers)
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${ROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /$(get_libdir)
- fi
-}
-
-alt_usrlibdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/usr/$(get_libdir)
- else
- echo /usr/$(get_libdir)
- fi
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- strip-unsupported-flags
- filter-flags -m32 -m64 -mabi=*
-
- unset CBUILD_OPT CTARGET_OPT
- if has_multilib_profile ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- case $(tc-arch) in
- amd64)
- # Punt this when amd64's 2004.3 is removed
- CFLAGS_x86="-m32"
- ;;
- ppc)
- append-flags "-freorder-blocks"
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
- filter-flags "-mvis"
-
- if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
- case ${ABI} in
- sparc64)
- filter-flags -Wa,-xarch -Wa,-A
-
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparc64b-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9b"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
- else
- CTARGET_OPT="sparc64-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9a"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a"
- fi
- ;;
- *)
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- else
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- ;;
- esac
- else
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- elif { is_crosscompile && want_nptl; } || is-flag "-mcpu=ultrasparc2" || is-flag "-mcpu=ultrasparc"; then
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- fi
- ;;
- esac
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- # Lock glibc at -O2 -- linuxthreads needs it and we want to be
- # conservative here. -fno-strict-aliasing is to work around #155906
- filter-flags -O?
- append-flags -O2 -fno-strict-aliasing
-
- # building glibc with SSP is fraught with difficulty, especially
- # due to __stack_chk_fail_local which would mean significant changes
- # to the glibc build process. See bug #94325
- filter-flags -fstack-protector
-
- if use hardened && gcc-specs-pie ; then
- # Force PIC macro definition for all compilations since they're all
- # either -fPIC or -fPIE with the default-PIE compiler.
- append-cppflags -DPIC
- else
- # Don't build -fPIE without the default-PIE compiler and the
- # hardened-pie patch
- filter-flags -fPIE
- fi
-}
-
-check_kheader_version() {
- local version=$(
- printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
- $(tc-getCPP ${CTARGET}) -I "$(alt_build_headers)" | \
- tail -n 1
- )
- [[ ${version} -ge "$1" ]]
-}
-
-check_nptl_support() {
- local min_kernel_version=$(KV_to_int "${NPTL_KERNEL_VERSION}")
-
- echo
-
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking kernel version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $([[ $(get_KV) -ge ${min_kernel_version} ]] ; echo $?) ; then
- echo
- eerror "You need a kernel of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "Kernel version too low!"
- fi
- fi
-
- # Building fails with too low linux-headers
- ebegin "Checking linux-headers version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $(check_kheader_version "${min_kernel_version}" ; echo $?) ; then
- echo
- eerror "You need linux-headers of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "linux-headers version too low!"
- fi
-
- echo
-}
-
-want_nptl() {
- want_tls || return 1
- use nptl || return 1
-
- # Only list the arches that cannot do NPTL
- case $(tc-arch) in
- m68k) return 1;;
- sparc)
- # >= v9 is needed for nptl.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
- ;;
- esac
-
- return 0
-}
-
-want_linuxthreads() {
- ! use nptlonly && return 0
- want_nptl || return 0
- return 1
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- sparc)
- # 2.3.6 should have tls support on sparc64
- # when using newer binutils
- case ${CTARGET/-*} in
- sparc64*) return 1 ;;
- *) return 0 ;;
- esac
- ;;
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- return 1
- ;;
- esac
-
- return 0
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- echo 'extern __thread int i;' > "${T}"/test-__thread.c
- $(tc-getCC ${CTARGET}) -c "${T}"/test-__thread.c -o "${T}"/test-__thread.o &> /dev/null
- WANT__THREAD=$?
- rm -f "${T}"/test-__thread.[co]
-
- return ${WANT__THREAD}
-}
-
-glibc_do_configure() {
- local myconf
-
- # set addons
- pushd "${S}" > /dev/null
- local ADDONS=$(echo */configure | sed \
- -e 's:/configure::g' \
- -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \
- -e 's: \+$::' \
- -e 's! !,!g' \
- -e 's!^!,!' \
- -e '/^,\*$/d')
- popd > /dev/null
-
- use nls || myconf="${myconf} --disable-nls"
- myconf="${myconf} $(use_enable hardened stackguard-randomization)"
- if [[ $(<"${T}"/.ssp.compat) == "yes" ]] ; then
- myconf="${myconf} --enable-old-ssp-compat"
- else
- myconf="${myconf} --disable-old-ssp-compat"
- fi
-
- use glibc-omitfp && myconf="${myconf} --enable-omitfp"
-
- [[ ${CTARGET//_/-} == *-softfloat-* ]] && myconf="${myconf} --without-fp"
-
- if [[ $1 == "linuxthreads" ]] ; then
- if want_tls ; then
- myconf="${myconf} --with-tls"
-
- if ! want__thread || use glibc-compat20 || [[ ${LT_KERNEL_VERSION} == 2.[02].* ]] ; then
- myconf="${myconf} --without-__thread"
- else
- myconf="${myconf} --with-__thread"
- fi
- else
- myconf="${myconf} --without-tls --without-__thread"
- fi
-
- myconf="${myconf} --disable-sanity-checks"
- myconf="${myconf} --enable-add-ons=ports,linuxthreads${ADDONS}"
- myconf="${myconf} --enable-kernel=${LT_KERNEL_VERSION}"
- elif [[ $1 == "nptl" ]] ; then
- myconf="${myconf} --with-tls --with-__thread"
- myconf="${myconf} --enable-add-ons=ports,nptl${ADDONS}"
- myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}"
- else
- die "invalid pthread option"
- fi
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. ! USE build
- # 3. only for the primary ABI on multilib systems
- if use selinux && ! use build ; then
- if use multilib || has_multilib_profile ; then
- if is_final_abi ; then
- myconf="${myconf} --with-selinux"
- else
- myconf="${myconf} --without-selinux"
- fi
- else
- myconf="${myconf} --with-selinux"
- fi
- else
- myconf="${myconf} --without-selinux"
- fi
-
- myconf="${myconf}
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- --without-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
- ${EXTRA_ECONF}"
-
- # 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)
-
- has_version app-admin/eselect-compiler || export CC=$(tc-getCC ${CTARGET})
-
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
- einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}"
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- addwrite ${ROOT}/
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- addwrite ${ROOT}/usr
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- addwrite ${ROOT}/usr/X11R6
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-use_multilib() {
- case ${CTARGET} in
- sparc64*|mips64*|x86_64*|powerpc64*|s390x*)
- has_multilib_profile || use multilib ;;
- *) false ;;
- esac
-}
-
-# Setup toolchain variables that would be defined in the profiles for these archs.
-setup_env() {
- # These should not be set, else the zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
- # silly users
- unset LD_RUN_PATH
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET}
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
- # and fall back on CFLAGS.
- local VAR=CFLAGS_${CTARGET//[-.]/_}
- CFLAGS=${!VAR-${CFLAGS}}
- fi
-
- setup_flags
-
- export ABI=${ABI:-${DEFAULT_ABI:-default}}
-
- if is_crosscompile || tc-is-cross-compiler ; then
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because
- # glibc's configure script checks CFLAGS for some targets (like mips)
- export CFLAGS="${!VAR} ${CFLAGS}"
- fi
-}
-
-### /ECLASS PUNTAGE ###
-
-if is_crosscompile ; then
- SLOT="${CTARGET}-2.2"
-else
- SLOT="2.2"
-fi
-
-# we'll handle stripping ourself #46186
-RESTRICT="strip"
-EMULTILIB_PKG="true"
-
-# General: We need a new-enough binutils for as-needed
-# arch: we need to make sure our binutils/gcc supports TLS
-DEPEND=">=sys-devel/gcc-3.4.4
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 )
- ppc? ( >=sys-devel/gcc-4.1.0 )
- ppc64? ( >=sys-devel/gcc-4.1.0 )
- nptl? ( || ( >=sys-kernel/mips-headers-${NPTL_KERNEL_VERSION} >=sys-kernel/linux-headers-${NPTL_KERNEL_VERSION} ) )
- >=sys-devel/binutils-2.15.94
- >=sys-devel/gcc-config-1.3.12
- >=app-misc/pax-utils-0.1.10
- virtual/os-headers
- nls? ( sys-devel/gettext )
- >=sys-apps/portage-2.1.2
- selinux? ( !build? ( sys-libs/libselinux ) )"
-RDEPEND="nls? ( sys-devel/gettext )
- selinux? ( !build? ( sys-libs/libselinux ) )"
-
-if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
-
- if [[ ${CATEGORY} == *-linux* ]] ; then
- if [[ ${CATEGORY} == cross-mips* ]] ; then
- DEPEND="${DEPEND} >=${CATEGORY}/mips-headers-2.6.10"
- else
- DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
- fi
- fi
-else
- DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c"
- RDEPEND="${RDEPEND} sys-libs/timezone-data"
-fi
-
-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml"
- die "please fix your CHOST"
- fi
-
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty, which is probably not what you want."
- fi
-
- if ! type -p scanelf > /dev/null ; then
- eerror "You do not have pax-utils installed."
- die "install pax-utils"
- fi
-
- use hardened && ! gcc-specs-pie && \
- ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
-}
-
-src_unpack() {
- setup_env
-
- toolchain-glibc_src_unpack
-
- # Backwards SSP support
- cd "${S}"
-# For now, we force everyone to have the extra symbols
-# einfon "Scanning system for __guard to see if we need SSP compat ... "
-# if [[ -n $(scanelf -qyls__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then
- echo "yes" > "${T}"/.ssp.compat
-# else
-# # ok, a quick scan didnt find it, so lets do a deep scan ...
-# if [[ -n $(scanelf -qyRlps__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then
-# echo "yes" > "${T}"/.ssp.compat
-# else
-# echo "no" > "${T}"/.ssp.compat
-# fi
-# fi
-# cat "${T}"/.ssp.compat
-
- # Glibc is stupid sometimes, and doesn't realize that with a
- # static C-Only gcc, -lgcc_eh doesn't exist.
- # http://sources.redhat.com/ml/libc-alpha/2003-09/msg00100.html
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- echo 'int main(){}' > "${T}"/gcc_eh_test.c
- if ! $(tc-getCC ${CTARGET}) "${T}"/gcc_eh_test.c -lgcc_eh 2>/dev/null ; then
- sed -i -e 's:-lgcc_eh::' Makeconfig || die "sed gcc_eh"
- fi
-
- cd "${WORKDIR}"
- find . -type f '(' -size 0 -o -name "*.orig" ')' -exec rm -f {} \;
- find . -name configure -exec touch {} \;
-
- # Fix permissions on some of the scripts
- chmod u+x "${S}"/scripts/*.sh
-}
-
-src_compile() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Building multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_compile
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_compile
- else
- toolchain-glibc_src_compile
- fi
-}
-
-src_test() {
- local ret=0
-
- setup_env
-
- if [[ -z ${OABI} ]] && has_multilib_profile ; then
- OABI=${ABI}
- einfo "Testing multilib glibc for ABIs: $(get_install_abis)"
- for ABI in $(get_install_abis) ; do
- export ABI
- einfo " Testing ${ABI} glibc"
- src_test
- ((ret+=$?))
- done
- ABI=${OABI}
- unset OABI
- [[ ${ret} -ne 0 ]] \
- && die "tests failed" \
- || return 0
- fi
-
- want_linuxthreads && toolchain-glibc_src_test linuxthreads ; ((ret+=$?))
- want_nptl && toolchain-glibc_src_test nptl ; ((ret+=$?))
- return ${ret}
-}
-
-src_strip() {
- # Now, strip everything but the thread libs #46186, as well as the dynamic
- # linker, else we cannot set breakpoints in shared libraries due to bugs in
- # gdb. Also want to grab stuff in tls subdir. whee.
- env \
- -uRESTRICT \
- CHOST=${CTARGET} \
- STRIP_MASK="/*/{,tls/}{ld-,lib{pthread,thread_db}}*" \
- prepallstrip
-}
-
-src_install() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Installing multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_install
- done
- ABI=${OABI}
- unset OABI
- src_strip
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_install
- else
- toolchain-glibc_src_install
- fi
- [[ -z ${OABI} ]] && src_strip
-}
-
-pkg_preinst() {
- toolchain-glibc_pkg_preinst
-}
-
-pkg_postinst() {
- toolchain-glibc_pkg_postinst
-}
diff --git a/sys-libs/glibc/glibc-2.5-r3.ebuild b/sys-libs/glibc/glibc-2.5-r3.ebuild
deleted file mode 100644
index 8632c6828f0c..000000000000
--- a/sys-libs/glibc/glibc-2.5-r3.ebuild
+++ /dev/null
@@ -1,1250 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.5-r3.ebuild,v 1.17 2009/12/10 01:31:26 vapier Exp $
-
-# 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/
-
-KEYWORDS="-* alpha amd64 arm hppa ia64 mips ppc ppc64 ~s390 sh sparc x86"
-
-BRANCH_UPDATE=""
-
-# Generated man pages
-GLIBC_MANPAGE_VERSION="none"
-
-# Generated stuff in manual subdir
-GLIBC_INFOPAGE_VERSION="none"
-
-# Gentoo patchset
-PATCH_VER="1.7"
-
-GENTOO_TOOLCHAIN_BASE_URI="mirror://gentoo"
-GENTOO_TOOLCHAIN_DEV_URI="http://dev.gentoo.org/~azarah/glibc/XXX http://dev.gentoo.org/~vapier/dist/XXX"
-
-### PUNT OUT TO ECLASS?? ###
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-LICENSE="LGPL-2"
-
-IUSE="build debug nls nptl nptlonly hardened multilib selinux glibc-omitfp profile glibc-compat20"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- PROVIDE="virtual/libc"
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-just_headers() {
- is_crosscompile && use crosscompile_opts_headers-only
-}
-
-GLIBC_RELEASE_VER=$(get_version_component_range 1-3)
-
-# Don't set this to :-, - allows BRANCH_UPDATE=""
-BRANCH_UPDATE=${BRANCH_UPDATE-$(get_version_component_range 4)}
-GLIBC_PORTS_VER=${GLIBC_RELEASE_VER}
-#GLIBC_PORTS_VER="20060925"
-GLIBC_LT_VER=${GLIBC_RELEASE_VER}
-#GLIBC_LT_VER="20060605"
-
-# (Recent snapshots fails with 2.6.5 and earlier with NPTL)
-NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-"2.6.9"}
-LT_KERNEL_VERSION=${LT_KERNEL_VERSION:-"2.4.1"}
-
-[[ ${CTARGET} == hppa* ]] && NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-2.6.20}
-
-### SRC_URI ###
-
-# This function handles the basics of setting the SRC_URI for a glibc ebuild.
-# To use, set SRC_URI with:
-#
-# SRC_URI="$(get_glibc_src_uri)"
-#
-# Other than the variables normally set by portage, this function's behavior
-# can be altered by setting the following:
-#
-# GENTOO_TOOLCHAIN_BASE_URI
-# This sets the base URI for all gentoo-specific patch files. Note
-# that this variable is only important for a brief period of time,
-# before your source files get picked up by mirrors. However, it is
-# still highly suggested that you keep files in this location
-# available.
-#
-# BRANCH_UPDATE
-# If set, this variable signals that we should be using the main
-# release tarball (determined by ebuild version) and applying a
-# CVS branch update patch against it. The location of this branch
-# update patch is assumed to be in ${GENTOO_TOOLCHAIN_BASE_URI}.
-# Just like with SNAPSHOT, this variable is ignored if the ebuild
-# has a _pre suffix.
-#
-# PATCH_VER
-# PATCH_GLIBC_VER
-# This should be set to the version of the gentoo patch tarball.
-# The resulting filename of this tarball will be:
-# glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
-#
-# GLIBC_MANPAGE_VERSION
-# GLIBC_INFOPAGE_VERSION
-# The version of glibc for which we will download pages. This will
-# default to ${GLIBC_RELEASE_VER}, but we may not want to pre-generate man pages
-# for prerelease test ebuilds for example. This allows you to
-# continue using pre-generated manpages from the last stable release.
-# If set to "none", this will prevent the downloading of manpages,
-# which is useful for individual library targets.
-#
-get_glibc_src_uri() {
- GENTOO_TOOLCHAIN_BASE_URI=${GENTOO_TOOLCHAIN_BASE_URI:-"mirror://gentoo"}
-
- GLIBC_SRC_URI="mirror://gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-ports-${GLIBC_PORTS_VER}.tar.bz2
- ftp://sources.redhat.com/pub/glibc/snapshots/glibc-ports-${GLIBC_PORTS_VER}.tar.bz2
- mirror://gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2"
-
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2}"
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- if [[ -n ${GLIBC_LT_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- mirror://gnu/glibc/glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2
- ftp://sources.redhat.com/pub/glibc/snapshots/glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2"
- fi
-
- echo "${GLIBC_SRC_URI}"
-}
-
-SRC_URI=$(get_glibc_src_uri)
-S=${WORKDIR}/glibc-${GLIBC_RELEASE_VER}
-
-### EXPORTED FUNCTIONS ###
-unpack_addon() {
- local addon=$1 ver=${2:-${GLIBC_RELEASE_VER}}
- unpack glibc-${addon}-${ver}.tar.bz2
- mv glibc-${addon}-${ver} ${addon} || die
-}
-toolchain-glibc_src_unpack() {
- # Check NPTL support _before_ we unpack things to save some time
- want_nptl && check_nptl_support
-
- unpack glibc-${GLIBC_RELEASE_VER}.tar.bz2
-
- cd "${S}"
- [[ -n ${GLIBC_LT_VER} ]] && unpack glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2
- unpack_addon libidn
- unpack_addon ports ${GLIBC_PORTS_VER}
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${WORKDIR}"
- unpack glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- # pull out all the addons
- local d
- for d in extra/*/configure ; do
- mv "${d%/configure}" "${S}" || die "moving ${d}"
- done
- fi
-
- # XXX: We should do the branchupdate, before extracting the manpages and
- # infopages else it does not help much (mtimes change if there is a change
- # to them with branchupdate)
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- cd "${S}"
- epatch "${DISTDIR}"/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
-
- # Snapshot date patch
- einfo "Patching version to display snapshot date ..."
- sed -i -e "s:\(#define RELEASE\).*:\1 \"${BRANCH_UPDATE}\":" version.h
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- cd "${WORKDIR}"
- unpack glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- cd "${S}"
- unpack glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${S}"
- EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset ${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-${PATCH_VER} ..." \
- EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \
- EPATCH_SUFFIX="patch" \
- ARCH=$(tc-arch) \
- epatch "${WORKDIR}"/patches
-
- # tag, glibc is it
- [[ -e csu/Banner ]] && die "need new banner location"
- echo "Gentoo patchset ${PATCH_VER}" > csu/Banner
- fi
-
- if use hardened ; then
- cd "${S}"
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
- gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch
- epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch
- epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-inittls-nosysenter.patch
-
- einfo "Installing Hardened Gentoo SSP handler"
- cp -f "${FILESDIR}"/2.5/glibc-2.5-gentoo-stack_chk_fail.c \
- debug/stack_chk_fail.c || die
-
- if use debug ; then
- # When using Hardened Gentoo stack handler, have smashes dump core for
- # analysis - debug only, as core could be an information leak
- # (paranoia).
- sed -i \
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
- debug/Makefile \
- || die "Failed to modify debug/Makefile for debug stack handler"
- fi
-
- # Build nscd with ssp-all
- sed -i \
- -e 's:-fstack-protector$:-fstack-protector-all:' \
- nscd/Makefile \
- || die "Failed to ensure nscd builds with ssp-all"
- fi
-
- gnuconfig_update
-}
-
-toolchain-glibc_src_compile() {
- echo
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
- echo
-
- if want_linuxthreads ; then
- glibc_do_configure linuxthreads
- einfo "Building GLIBC with linuxthreads..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
- if want_nptl ; then
- # ... and then do the optional nptl build
- unset LD_ASSUME_KERNEL
- glibc_do_configure nptl
- einfo "Building GLIBC with NPTL..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
-}
-
-toolchain-glibc_headers_compile() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
-
- # Pick out the correct location for build headers
- local myconf="--disable-sanity-checks --enable-hacker-mode"
- myconf="${myconf}
- --enable-add-ons=nptl,ports
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(alt_build_headers)
- --prefix=/usr
- ${EXTRA_ECONF}"
-
- einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}"
- CC=gcc \
- CFLAGS="-O1 -pipe" \
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-toolchain-glibc_src_test() {
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-$1 || die "cd build-${ABI}-${CTARGET}-$1"
- unset LD_ASSUME_KERNEL
- make check && return 0
- einfo "make check failed - re-running with --keep-going to get the rest of the results"
- make -k check
- ewarn "make check failed for ${ABI}-${CTARGET}-$1"
- return 1
-}
-
-toolchain-glibc_pkg_preinst() {
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && ! { want_nptl && want_linuxthreads; }; then
- addwrite "${ROOT}"/$(alt_libdir)/
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # Shouldnt need to keep this updated
- [[ -e ${ROOT}/etc/locale.gen ]] && rm -f "${D}"/etc/locale.gen
-
- # simple test to make sure our new glibc isnt completely broken.
- # make sure we don't test with statically built binaries since
- # they will fail. also, skip if this glibc is a cross compiler.
- [[ ${ROOT} != "/" ]] && return 0
- is_crosscompile && return 0
- local x striptest
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest} == *"statically linked"* ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
-
-toolchain-glibc_src_install() {
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
-
- local GBUILDDIR
- if want_linuxthreads ; then
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads
- else
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
- fi
-
- local install_root=${D}
- is_crosscompile && install_root="${install_root}/usr/${CTARGET}"
- if want_linuxthreads ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
- einfo "Installing GLIBC ${ABI} with linuxthreads ..."
- make PARALLELMFLAGS="${MAKEOPTS}" \
- install_root="${install_root}" \
- install || die
- else # nptlonly
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- einfo "Installing GLIBC ${ABI} with NPTL ..."
- make PARALLELMFLAGS="${MAKEOPTS}" \
- install_root="${install_root}" \
- install || die
- fi
-
- if is_crosscompile ; then
- # punt all the junk not needed by a cross-compiler
- cd "${D}"/usr/${CTARGET} || die
- rm -rf ./{,usr/}{bin,etc,sbin,share} ./{,usr/}*/{gconv,misc}
- fi
-
- if want_linuxthreads && want_nptl ; then
- einfo "Installing NPTL to $(alt_libdir)/tls/..."
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl
-
- local l src_lib
- for l in libc libm librt libpthread libthread_db ; do
- # take care of shared lib first ...
- l=${l}.so
- if [[ -e ${l} ]] ; then
- src_lib=${l}
- else
- src_lib=$(eval echo */${l})
- fi
- cp -a ${src_lib} "${D}"$(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})
-
- # then grab the linker script or the symlink ...
- if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then
- dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l}
- else
- sed \
- -e "s:/${l}:/tls/${l}:g" \
- -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \
- "${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} "${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} "${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 "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp"
- fi
-
- # We'll take care of the cache ourselves
- rm -f "${D}"/etc/ld.so.cache
-
- # Some things want this, notably ash.
- dosym libbsd-compat.a $(alt_usrlibdir)/libbsd.a
-
- # Handle includes for different ABIs
- prep_ml_includes $(alt_headers)
-
- # When cross-compiling for a non-multilib setup, make sure we have
- # lib and a proper symlink setup
- if is_crosscompile && ! use multilib && ! has_multilib_profile && [[ $(get_libdir) != "lib" ]] ; then
- cd "${D}"$(alt_libdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- cd "${D}"$(alt_usrlibdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- return 0
- fi
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems
- if has_multilib_profile ; then
- case $(tc-arch) in
- amd64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR amd64) /lib
- dosym ../$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2
- ;;
- ppc64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ppc64) /lib
- dosym ../$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1
- ;;
- esac
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen || die
- doman *.[0-8]
- insinto /etc
- doins locale.gen || die
-
- # Make sure all the ABI's can find the locales and so we only
- # have to generate one set
- local a
- keepdir /usr/$(get_libdir)/locale
- for a in $(get_install_abis) ; do
- if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then
- dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale
- fi
- done
-
- if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- einfo "Installing info pages..."
-
- make \
- -C "${GBUILDDIR}" \
- PARALLELMFLAGS="${MAKEOPTS}" \
- install_root="${install_root}" \
- info -i || die
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- einfo "Installing man pages..."
-
- # Install linuxthreads man pages even if nptl is enabled
- cd "${WORKDIR}"/man
- doman *.3thr
- fi
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf || die
- doins "${WORKDIR}"/extra/etc/*.conf || die
- doinitd "${WORKDIR}"/extra/etc/nscd || die
-
- dodoc BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README*
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${D}"/etc/localtime
-}
-
-toolchain-glibc_headers_install() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- cd "${GBUILDDIR}"
- make install_root="${D}/usr/${CTARGET}" install-headers || die "install-headers failed"
- # Copy over headers that are not part of install-headers ... these
- # are pretty much taken verbatim from crosstool, see it for more details
- insinto $(alt_headers)/bits
- doins misc/syscall-list.h bits/stdio_lim.h || die "doins include bits"
- insinto $(alt_headers)/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
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include /usr/${CTARGET}/sys-include
-}
-
-toolchain-glibc_pkg_postinst() {
- # Mixing nptlonly and -nptlonly glibc can prove dangerous if libpthread
- # isn't removed in unmerge which happens sometimes. See bug #87671
- if ! is_crosscompile && want_linuxthreads && [[ ${ROOT} == "/" ]] ; then
- for libdir in $(get_all_libdirs) ; do
- for f in "${ROOT}"/${libdir}/libpthread-2.* "${ROOT}"/${libdir}/libpthread-0.6* ; do
- if [[ -f ${f} ]] ; then
- rm -f ${f}
- ldconfig
- fi
- done
- done
- fi
-
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if [[ ! -e ${ROOT}/lib/ld.so.1 ]] && use ppc64 && ! has_multilib_profile ; then
- ## SHOULDN'T THIS BE lib64??
- ln -s ld64.so.1 "${ROOT}"/lib/ld.so.1
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ...
- /sbin/telinit U &> /dev/null
-
- # if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}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"
- fi
- local x jobs
- for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done
- locale-gen -j ${jobs:-1} --config "${locale_list}"
- fi
-
- echo
- einfo "Gentoo's glibc no longer includes mdns."
- einfo "If you want mdns, emerge the sys-auth/nss-mdns package."
- echo
-
- if want_nptl && want_linuxthreads ; then
- einfo "The default behavior of glibc on your system is to use NPTL. If"
- einfo "you want to use linuxthreads for a particular program, start it"
- einfo "by executing 'LD_ASSUME_KERNEL=${LT_KERNEL_VERSION} <program> [<options>]'"
- echo
- fi
-}
-
-### SUPPORT FUNCTIONS ###
-# We need to be able to set alternative headers for
-# compiling for non-native platform
-# Will also become useful for testing kernel-headers without screwing up
-# the whole system.
-# note: intentionally undocumented.
-alt_headers() {
- if [[ -z ${ALT_HEADERS} ]] ; then
- if is_crosscompile ; then
- ALT_HEADERS="/usr/${CTARGET}/usr/include"
- else
- ALT_HEADERS="/usr/include"
- fi
- fi
- echo "${ALT_HEADERS}"
-}
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS=$(alt_headers)
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${ROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /$(get_libdir)
- fi
-}
-
-alt_usrlibdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/usr/$(get_libdir)
- else
- echo /usr/$(get_libdir)
- fi
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- strip-unsupported-flags
- filter-flags -m32 -m64 -mabi=*
-
- unset CBUILD_OPT CTARGET_OPT
- if has_multilib_profile ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- case $(tc-arch) in
- amd64)
- # Punt this when amd64's 2004.3 is removed
- CFLAGS_x86="-m32"
- ;;
- ppc)
- append-flags "-freorder-blocks"
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
- filter-flags "-mvis"
-
- if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
- case ${ABI} in
- sparc64)
- filter-flags -Wa,-xarch -Wa,-A
-
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparc64b-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9b"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
- else
- CTARGET_OPT="sparc64-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9a"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a"
- fi
- ;;
- *)
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- else
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- ;;
- esac
- else
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- elif { is_crosscompile && want_nptl; } || is-flag "-mcpu=ultrasparc2" || is-flag "-mcpu=ultrasparc"; then
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- fi
- ;;
- esac
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- # Lock glibc at -O2 -- linuxthreads needs it and we want to be
- # conservative here. -fno-strict-aliasing is to work around #155906
- filter-flags -O?
- append-flags -O2 -fno-strict-aliasing
-
- # building glibc with SSP is fraught with difficulty, especially
- # due to __stack_chk_fail_local which would mean significant changes
- # to the glibc build process. See bug #94325
- filter-flags -fstack-protector
-
- if use hardened && gcc-specs-pie ; then
- # Force PIC macro definition for all compilations since they're all
- # either -fPIC or -fPIE with the default-PIE compiler.
- append-cppflags -DPIC
- else
- # Don't build -fPIE without the default-PIE compiler and the
- # hardened-pie patch
- filter-flags -fPIE
- fi
-}
-
-check_kheader_version() {
- local version=$(
- printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
- $(tc-getCPP ${CTARGET}) -I "$(alt_build_headers)" | \
- tail -n 1
- )
- [[ ${version} -ge "$1" ]]
-}
-
-check_nptl_support() {
- local min_kernel_version=$(KV_to_int "${NPTL_KERNEL_VERSION}")
-
- echo
-
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking kernel version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $([[ $(get_KV) -ge ${min_kernel_version} ]] ; echo $?) ; then
- echo
- eerror "You need a kernel of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "Kernel version too low!"
- fi
- fi
-
- # Building fails with too low linux-headers
- ebegin "Checking linux-headers version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $(check_kheader_version "${min_kernel_version}" ; echo $?) ; then
- echo
- eerror "You need linux-headers of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "linux-headers version too low!"
- fi
-
- echo
-}
-
-want_nptl() {
- want_tls || return 1
- use nptl || return 1
-
- # Only list the arches that cannot do NPTL
- case $(tc-arch) in
- m68k) return 1;;
- sparc)
- # >= v9 is needed for nptl.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
- ;;
- esac
-
- return 0
-}
-
-want_linuxthreads() {
- ! use nptlonly && return 0
- want_nptl || return 0
- return 1
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- sparc)
- # 2.3.6 should have tls support on sparc64
- # when using newer binutils
- case ${CTARGET/-*} in
- sparc64*) return 1 ;;
- *) return 0 ;;
- esac
- ;;
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- return 1
- ;;
- esac
-
- return 0
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- echo 'extern __thread int i;' > "${T}"/test-__thread.c
- $(tc-getCC ${CTARGET}) -c "${T}"/test-__thread.c -o "${T}"/test-__thread.o &> /dev/null
- WANT__THREAD=$?
- rm -f "${T}"/test-__thread.[co]
-
- return ${WANT__THREAD}
-}
-
-glibc_do_configure() {
- local myconf
-
- # set addons
- pushd "${S}" > /dev/null
- local ADDONS=$(echo */configure | sed \
- -e 's:/configure::g' \
- -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \
- -e 's: \+$::' \
- -e 's! !,!g' \
- -e 's!^!,!' \
- -e '/^,\*$/d')
- popd > /dev/null
-
- use nls || myconf="${myconf} --disable-nls"
- myconf="${myconf} $(use_enable hardened stackguard-randomization)"
- if [[ $(<"${T}"/.ssp.compat) == "yes" ]] ; then
- myconf="${myconf} --enable-old-ssp-compat"
- else
- myconf="${myconf} --disable-old-ssp-compat"
- fi
-
- use glibc-omitfp && myconf="${myconf} --enable-omitfp"
-
- [[ ${CTARGET//_/-} == *-softfloat-* ]] && myconf="${myconf} --without-fp"
-
- if [[ $1 == "linuxthreads" ]] ; then
- if want_tls ; then
- myconf="${myconf} --with-tls"
-
- if ! want__thread || use glibc-compat20 || [[ ${LT_KERNEL_VERSION} == 2.[02].* ]] ; then
- myconf="${myconf} --without-__thread"
- else
- myconf="${myconf} --with-__thread"
- fi
- else
- myconf="${myconf} --without-tls --without-__thread"
- fi
-
- myconf="${myconf} --disable-sanity-checks"
- myconf="${myconf} --enable-add-ons=ports,linuxthreads${ADDONS}"
- myconf="${myconf} --enable-kernel=${LT_KERNEL_VERSION}"
- elif [[ $1 == "nptl" ]] ; then
- myconf="${myconf} --with-tls --with-__thread"
- myconf="${myconf} --enable-add-ons=ports,nptl${ADDONS}"
- myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}"
- else
- die "invalid pthread option"
- fi
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. ! USE build
- # 3. only for the primary ABI on multilib systems
- if use selinux && ! use build ; then
- if use multilib || has_multilib_profile ; then
- if is_final_abi ; then
- myconf="${myconf} --with-selinux"
- else
- myconf="${myconf} --without-selinux"
- fi
- else
- myconf="${myconf} --with-selinux"
- fi
- else
- myconf="${myconf} --without-selinux"
- fi
-
- myconf="${myconf}
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- --without-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
- ${EXTRA_ECONF}"
-
- # 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)
-
- has_version app-admin/eselect-compiler || export CC=$(tc-getCC ${CTARGET})
-
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
- einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}"
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- addwrite ${ROOT}/
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- addwrite ${ROOT}/usr
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- addwrite ${ROOT}/usr/X11R6
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-use_multilib() {
- case ${CTARGET} in
- sparc64*|mips64*|x86_64*|powerpc64*|s390x*)
- has_multilib_profile || use multilib ;;
- *) false ;;
- esac
-}
-
-# Setup toolchain variables that would be defined in the profiles for these archs.
-setup_env() {
- # These should not be set, else the zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
- # silly users
- unset LD_RUN_PATH
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET}
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
- # and fall back on CFLAGS.
- local VAR=CFLAGS_${CTARGET//[-.]/_}
- CFLAGS=${!VAR-${CFLAGS}}
- fi
-
- setup_flags
-
- export ABI=${ABI:-${DEFAULT_ABI:-default}}
-
- if is_crosscompile || tc-is-cross-compiler ; then
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because
- # glibc's configure script checks CFLAGS for some targets (like mips)
- export CFLAGS="${!VAR} ${CFLAGS}"
- fi
-}
-
-### /ECLASS PUNTAGE ###
-
-if is_crosscompile ; then
- SLOT="${CTARGET}-2.2"
-else
- SLOT="2.2"
-fi
-
-# we'll handle stripping ourself #46186
-RESTRICT="strip"
-EMULTILIB_PKG="true"
-
-# General: We need a new-enough binutils for as-needed
-# arch: we need to make sure our binutils/gcc supports TLS
-DEPEND=">=sys-devel/gcc-3.4.4
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 )
- ppc? ( >=sys-devel/gcc-4.1.0 )
- ppc64? ( >=sys-devel/gcc-4.1.0 )
- nptl? ( || ( >=sys-kernel/mips-headers-${NPTL_KERNEL_VERSION} >=sys-kernel/linux-headers-${NPTL_KERNEL_VERSION} ) )
- >=sys-devel/binutils-2.15.94
- >=sys-devel/gcc-config-1.3.12
- >=app-misc/pax-utils-0.1.10
- virtual/os-headers
- nls? ( sys-devel/gettext )
- >=sys-apps/portage-2.1.2
- selinux? ( !build? ( sys-libs/libselinux ) )"
-RDEPEND="nls? ( sys-devel/gettext )
- selinux? ( !build? ( sys-libs/libselinux ) )"
-
-if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
-
- if [[ ${CATEGORY} == *-linux* ]] ; then
- if [[ ${CATEGORY} == cross-mips* ]] ; then
- DEPEND="${DEPEND} >=${CATEGORY}/mips-headers-2.6.10"
- else
- DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
- fi
- fi
-else
- DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c"
- RDEPEND="${RDEPEND} sys-libs/timezone-data"
-fi
-
-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml"
- die "please fix your CHOST"
- fi
-
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty, which is probably not what you want."
- fi
-
- if ! type -p scanelf > /dev/null ; then
- eerror "You do not have pax-utils installed."
- die "install pax-utils"
- fi
-
- use hardened && ! gcc-specs-pie && \
- ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
-}
-
-src_unpack() {
- setup_env
-
- toolchain-glibc_src_unpack
-
- # Backwards SSP support
- cd "${S}"
-# For now, we force everyone to have the extra symbols
-# einfon "Scanning system for __guard to see if we need SSP compat ... "
-# if [[ -n $(scanelf -qyls__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then
- echo "yes" > "${T}"/.ssp.compat
-# else
-# # ok, a quick scan didnt find it, so lets do a deep scan ...
-# if [[ -n $(scanelf -qyRlps__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then
-# echo "yes" > "${T}"/.ssp.compat
-# else
-# echo "no" > "${T}"/.ssp.compat
-# fi
-# fi
-# cat "${T}"/.ssp.compat
-
- # Glibc is stupid sometimes, and doesn't realize that with a
- # static C-Only gcc, -lgcc_eh doesn't exist.
- # http://sources.redhat.com/ml/libc-alpha/2003-09/msg00100.html
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- echo 'int main(){}' > "${T}"/gcc_eh_test.c
- if ! $(tc-getCC ${CTARGET}) "${T}"/gcc_eh_test.c -lgcc_eh 2>/dev/null ; then
- sed -i -e 's:-lgcc_eh::' Makeconfig || die "sed gcc_eh"
- fi
-
- cd "${WORKDIR}"
- find . -type f '(' -size 0 -o -name "*.orig" ')' -exec rm -f {} \;
- find . -name configure -exec touch {} \;
-
- # Fix permissions on some of the scripts
- chmod u+x "${S}"/scripts/*.sh
-}
-
-src_compile() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Building multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_compile
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_compile
- else
- toolchain-glibc_src_compile
- fi
-}
-
-src_test() {
- local ret=0
-
- setup_env
-
- if [[ -z ${OABI} ]] && has_multilib_profile ; then
- OABI=${ABI}
- einfo "Testing multilib glibc for ABIs: $(get_install_abis)"
- for ABI in $(get_install_abis) ; do
- export ABI
- einfo " Testing ${ABI} glibc"
- src_test
- ((ret+=$?))
- done
- ABI=${OABI}
- unset OABI
- [[ ${ret} -ne 0 ]] \
- && die "tests failed" \
- || return 0
- fi
-
- want_linuxthreads && toolchain-glibc_src_test linuxthreads ; ((ret+=$?))
- want_nptl && toolchain-glibc_src_test nptl ; ((ret+=$?))
- return ${ret}
-}
-
-src_strip() {
- # Now, strip everything but the thread libs #46186, as well as the dynamic
- # linker, else we cannot set breakpoints in shared libraries due to bugs in
- # gdb. Also want to grab stuff in tls subdir. whee.
- env \
- -uRESTRICT \
- CHOST=${CTARGET} \
- STRIP_MASK="/*/{,tls/}{ld-,lib{pthread,thread_db}}*" \
- prepallstrip
-}
-
-src_install() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Installing multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_install
- done
- ABI=${OABI}
- unset OABI
- src_strip
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_install
- else
- toolchain-glibc_src_install
- fi
- [[ -z ${OABI} ]] && src_strip
-}
-
-pkg_preinst() {
- toolchain-glibc_pkg_preinst
-}
-
-pkg_postinst() {
- toolchain-glibc_pkg_postinst
-}
diff --git a/sys-libs/glibc/glibc-2.6.ebuild b/sys-libs/glibc/glibc-2.6.ebuild
deleted file mode 100644
index f5320cf6c845..000000000000
--- a/sys-libs/glibc/glibc-2.6.ebuild
+++ /dev/null
@@ -1,1273 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.6.ebuild,v 1.23 2009/12/10 01:31:26 vapier Exp $
-
-# 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/
-
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
-
-BRANCH_UPDATE=""
-
-# Generated man pages
-GLIBC_MANPAGE_VERSION="none"
-
-# Generated stuff in manual subdir
-GLIBC_INFOPAGE_VERSION="none"
-
-# Gentoo patchset
-PATCH_VER="1.6"
-
-GENTOO_TOOLCHAIN_BASE_URI="mirror://gentoo"
-GENTOO_TOOLCHAIN_DEV_URI="http://dev.gentoo.org/~azarah/glibc/XXX http://dev.gentoo.org/~vapier/dist/XXX"
-
-### PUNT OUT TO ECLASS?? ###
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-LICENSE="LGPL-2"
-
-GLIBC_RELEASE_VER=$(get_version_component_range 1-3)
-
-# Don't set this to :-, - allows BRANCH_UPDATE=""
-BRANCH_UPDATE=${BRANCH_UPDATE-$(get_version_component_range 4)}
-GLIBC_PORTS_VER=${GLIBC_RELEASE_VER}
-GLIBC_LT_VER=""
-
-# (Recent snapshots fails with 2.6.5 and earlier with NPTL)
-NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-"2.6.9"}
-#LT_KERNEL_VERSION=${LT_KERNEL_VERSION:-"2.4.1"}
-
-[[ ${CTARGET} == hppa* ]] && NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-2.6.20}
-
-IUSE="debug nls hardened multilib selinux glibc-omitfp profile"
-[[ -n ${GLIBC_LT_VER} ]] && IUSE="${IUSE} glibc-compat20 nptl nptlonly"
-
-export CBUILD=${CBUILD:-${CHOST}}
-export CTARGET=${CTARGET:-${CHOST}}
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-if [[ ${CTARGET} == ${CHOST} ]] ; then
- PROVIDE="virtual/libc"
-fi
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-just_headers() {
- is_crosscompile && use crosscompile_opts_headers-only
-}
-
-### SRC_URI ###
-
-# This function handles the basics of setting the SRC_URI for a glibc ebuild.
-# To use, set SRC_URI with:
-#
-# SRC_URI="$(get_glibc_src_uri)"
-#
-# Other than the variables normally set by portage, this function's behavior
-# can be altered by setting the following:
-#
-# GENTOO_TOOLCHAIN_BASE_URI
-# This sets the base URI for all gentoo-specific patch files. Note
-# that this variable is only important for a brief period of time,
-# before your source files get picked up by mirrors. However, it is
-# still highly suggested that you keep files in this location
-# available.
-#
-# BRANCH_UPDATE
-# If set, this variable signals that we should be using the main
-# release tarball (determined by ebuild version) and applying a
-# CVS branch update patch against it. The location of this branch
-# update patch is assumed to be in ${GENTOO_TOOLCHAIN_BASE_URI}.
-# Just like with SNAPSHOT, this variable is ignored if the ebuild
-# has a _pre suffix.
-#
-# PATCH_VER
-# PATCH_GLIBC_VER
-# This should be set to the version of the gentoo patch tarball.
-# The resulting filename of this tarball will be:
-# glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
-#
-# GLIBC_MANPAGE_VERSION
-# GLIBC_INFOPAGE_VERSION
-# The version of glibc for which we will download pages. This will
-# default to ${GLIBC_RELEASE_VER}, but we may not want to pre-generate man pages
-# for prerelease test ebuilds for example. This allows you to
-# continue using pre-generated manpages from the last stable release.
-# If set to "none", this will prevent the downloading of manpages,
-# which is useful for individual library targets.
-#
-get_glibc_src_uri() {
- GENTOO_TOOLCHAIN_BASE_URI=${GENTOO_TOOLCHAIN_BASE_URI:-"mirror://gentoo"}
-
- GLIBC_SRC_URI="mirror://gnu/glibc/glibc-${GLIBC_RELEASE_VER}.tar.bz2
- mirror://gnu/glibc/glibc-libidn-${GLIBC_RELEASE_VER}.tar.bz2"
-
- if [[ -n ${GLIBC_PORTS_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- mirror://gnu/glibc/glibc-ports-${GLIBC_PORTS_VER}.tar.bz2
- ftp://sources.redhat.com/pub/glibc/snapshots/glibc-ports-${GLIBC_PORTS_VER}.tar.bz2"
- fi
-
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2}"
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- ${GENTOO_TOOLCHAIN_BASE_URI}/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}"
- fi
-
- if [[ -n ${GLIBC_LT_VER} ]] ; then
- GLIBC_SRC_URI="${GLIBC_SRC_URI}
- mirror://gnu/glibc/glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2
- ftp://sources.redhat.com/pub/glibc/snapshots/glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2"
- fi
-
- echo "${GLIBC_SRC_URI}"
-}
-
-SRC_URI=$(get_glibc_src_uri)
-S=${WORKDIR}/glibc-${GLIBC_RELEASE_VER}
-
-### EXPORTED FUNCTIONS ###
-unpack_addon() {
- local addon=$1 ver=${2:-${GLIBC_RELEASE_VER}}
- unpack glibc-${addon}-${ver}.tar.bz2
- mv glibc-${addon}-${ver} ${addon} || die
-}
-toolchain-glibc_src_unpack() {
- # Check NPTL support _before_ we unpack things to save some time
- want_nptl && check_nptl_support
-
- unpack glibc-${GLIBC_RELEASE_VER}.tar.bz2
-
- cd "${S}"
- [[ -n ${GLIBC_LT_VER} ]] && unpack glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2
- [[ -n ${GLIBC_PORTS_VER} ]] && unpack_addon ports ${GLIBC_PORTS_VER}
- unpack_addon libidn
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${WORKDIR}"
- unpack glibc-${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2
- # pull out all the addons
- local d
- for d in extra/*/configure ; do
- mv "${d%/configure}" "${S}" || die "moving ${d}"
- done
- fi
-
- # XXX: We should do the branchupdate, before extracting the manpages and
- # infopages else it does not help much (mtimes change if there is a change
- # to them with branchupdate)
- if [[ -n ${BRANCH_UPDATE} ]] ; then
- cd "${S}"
- epatch "${DISTDIR}"/glibc-${GLIBC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
-
- # Snapshot date patch
- einfo "Patching version to display snapshot date ..."
- sed -i -e "s:\(#define RELEASE\).*:\1 \"${BRANCH_UPDATE}\":" version.h
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- cd "${WORKDIR}"
- unpack glibc-manpages-${GLIBC_MANPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- cd "${S}"
- unpack glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2
- fi
-
- if [[ -n ${PATCH_VER} ]] ; then
- cd "${S}"
- EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset ${PATCH_GLIBC_VER:-${GLIBC_RELEASE_VER}}-${PATCH_VER} ..." \
- EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \
- EPATCH_SUFFIX="patch" \
- ARCH=$(tc-arch) \
- epatch "${WORKDIR}"/patches
-
- # tag, glibc is it
- [[ -e csu/Banner ]] && die "need new banner location"
- echo "Gentoo patchset ${PATCH_VER}" > csu/Banner
- fi
-
- if use hardened ; then
- cd "${S}"
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
- gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch
- epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch
- epatch "${FILESDIR}"/2.6/glibc-2.6-hardened-inittls-nosysenter.patch
-
- einfo "Installing Hardened Gentoo SSP handler"
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \
- debug/stack_chk_fail.c || die
-
- if use debug ; then
- # When using Hardened Gentoo stack handler, have smashes dump core for
- # analysis - debug only, as core could be an information leak
- # (paranoia).
- sed -i \
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
- debug/Makefile \
- || die "Failed to modify debug/Makefile for debug stack handler"
- fi
-
- # Build nscd with ssp-all
- sed -i \
- -e 's:-fstack-protector$:-fstack-protector-all:' \
- nscd/Makefile \
- || die "Failed to ensure nscd builds with ssp-all"
- fi
-
- gnuconfig_update
-}
-
-toolchain-glibc_src_compile() {
- echo
- local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do
- einfo " $(printf '%15s' ${v}:) ${!v}"
- done
- echo
-
- if want_linuxthreads ; then
- glibc_do_configure linuxthreads
- einfo "Building GLIBC with linuxthreads..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
- if want_nptl ; then
- # ... and then do the optional nptl build
- unset LD_ASSUME_KERNEL
- glibc_do_configure nptl
- einfo "Building GLIBC with NPTL..."
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed"
- fi
-}
-
-toolchain-glibc_headers_compile() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
-
- # Pick out the correct location for build headers
- local ports="" myconf="--disable-sanity-checks --enable-hacker-mode"
- [[ -n ${GLIBC_PORTS_VER} ]] && ports=",ports"
- myconf="${myconf}
- --enable-add-ons=nptl${ports}
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- --with-headers=$(alt_build_headers)
- --prefix=/usr
- ${EXTRA_ECONF}"
-
- einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}"
- CC=gcc \
- CFLAGS="-O1 -pipe" \
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-}
-
-toolchain-glibc_src_test() {
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-$1 || die "cd build-${ABI}-${CTARGET}-$1"
- unset LD_ASSUME_KERNEL
- make check && return 0
- einfo "make check failed - re-running with --keep-going to get the rest of the results"
- make -k check
- ewarn "make check failed for ${ABI}-${CTARGET}-$1"
- return 1
-}
-
-toolchain-glibc_pkg_preinst() {
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && ! { want_nptl && want_linuxthreads; }; then
- addwrite "${ROOT}"/$(alt_libdir)/
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # Shouldnt need to keep this updated
- [[ -e ${ROOT}/etc/locale.gen ]] && rm -f "${D}"/etc/locale.gen
-
- # simple test to make sure our new glibc isnt completely broken.
- # make sure we don't test with statically built binaries since
- # they will fail. also, skip if this glibc is a cross compiler.
- [[ ${ROOT} != "/" ]] && return 0
- is_crosscompile && return 0
- local x striptest
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest} == *"statically linked"* ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
-
-toolchain-glibc_src_install() {
- # These should not be set, else the
- # zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
-
- local GBUILDDIR
- if want_linuxthreads ; then
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads
- else
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
- fi
-
- local install_root=${D}
- is_crosscompile && install_root="${install_root}/usr/${CTARGET}"
- if want_linuxthreads ; then
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
- einfo "Installing GLIBC ${ABI} with linuxthreads ..."
- make PARALLELMFLAGS="${MAKEOPTS}" \
- install_root="${install_root}" \
- install || die
- else # nptlonly
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- einfo "Installing GLIBC ${ABI} with NPTL ..."
- make PARALLELMFLAGS="${MAKEOPTS}" \
- install_root="${install_root}" \
- install || die
- fi
-
- if is_crosscompile ; then
- # punt all the junk not needed by a cross-compiler
- cd "${D}"/usr/${CTARGET} || die
- rm -rf ./{,usr/}{bin,etc,sbin,share} ./{,usr/}*/{gconv,misc}
- fi
-
- if want_linuxthreads && want_nptl ; then
- einfo "Installing NPTL to $(alt_libdir)/tls/..."
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
- dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl
-
- local l src_lib
- for l in libc libm librt libpthread libthread_db ; do
- # take care of shared lib first ...
- l=${l}.so
- if [[ -e ${l} ]] ; then
- src_lib=${l}
- else
- src_lib=$(eval echo */${l})
- fi
- cp -a ${src_lib} "${D}"$(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})
-
- # then grab the linker script or the symlink ...
- if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then
- dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l}
- else
- sed \
- -e "s:/${l}:/tls/${l}:g" \
- -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \
- "${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} "${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} "${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 "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp"
- fi
-
- # We'll take care of the cache ourselves
- rm -f "${D}"/etc/ld.so.cache
-
- # Some things want this, notably ash.
- dosym libbsd-compat.a $(alt_usrlibdir)/libbsd.a
-
- # Handle includes for different ABIs
- prep_ml_includes $(alt_headers)
-
- # When cross-compiling for a non-multilib setup, make sure we have
- # lib and a proper symlink setup
- if is_crosscompile && ! use multilib && ! has_multilib_profile && [[ $(get_libdir) != "lib" ]] ; then
- cd "${D}"$(alt_libdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- cd "${D}"$(alt_usrlibdir)/..
- mv $(get_libdir) lib || die
- ln -s lib $(get_libdir) || die
- fi
-
- #################################################################
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
- # Make sure we install some symlink hacks so that when we build
- # a 2nd stage cross-compiler, gcc finds the target system
- # headers correctly. See gcc/doc/gccinstall.info
- if is_crosscompile ; then
- dosym usr/include /usr/${CTARGET}/sys-include
- return 0
- fi
-
- # Everything past this point just needs to be done once ...
- is_final_abi || return 0
-
- # Make sure the non-native interp can be found on multilib systems
- if has_multilib_profile ; then
- case $(tc-arch) in
- amd64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR amd64) /lib
- dosym ../$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2
- ;;
- ppc64)
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ppc64) /lib
- dosym ../$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1
- ;;
- esac
- fi
-
- # Files for Debian-style locale updating
- dodir /usr/share/i18n
- sed \
- -e "/^#/d" \
- -e "/SUPPORTED-LOCALES=/d" \
- -e "s: \\\\::g" -e "s:/: :g" \
- "${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \
- || die "generating /usr/share/i18n/SUPPORTED failed"
- cd "${WORKDIR}"/extra/locale
- dosbin locale-gen || die
- doman *.[0-8]
- insinto /etc
- doins locale.gen || die
-
- # Make sure all the ABI's can find the locales and so we only
- # have to generate one set
- local a
- keepdir /usr/$(get_libdir)/locale
- for a in $(get_install_abis) ; do
- if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then
- dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale
- fi
- done
-
- if ! has noinfo ${FEATURES} && [[ ${GLIBC_INFOPAGE_VERSION} != "none" ]] ; then
- einfo "Installing info pages..."
-
- make \
- -C "${GBUILDDIR}" \
- PARALLELMFLAGS="${MAKEOPTS}" \
- install_root="${install_root}" \
- info -i || die
- fi
-
- if [[ ${GLIBC_MANPAGE_VERSION} != "none" ]] ; then
- einfo "Installing man pages..."
-
- # Install linuxthreads man pages even if nptl is enabled
- cd "${WORKDIR}"/man
- doman *.3thr
- fi
-
- cd "${S}"
-
- # Install misc network config files
- insinto /etc
- doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf || die
- doins "${WORKDIR}"/extra/etc/*.conf || die
- doinitd "${WORKDIR}"/extra/etc/nscd || die
-
- dodoc BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README*
-
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the
- # creation of the "factory" symlink in pkg_postinst().
- rm -f "${D}"/etc/localtime
-}
-
-toolchain-glibc_headers_install() {
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
- cd "${GBUILDDIR}"
- make install_root="${D}/usr/${CTARGET}" install-headers || die "install-headers failed"
- # Copy over headers that are not part of install-headers ... these
- # are pretty much taken verbatim from crosstool, see it for more details
- insinto $(alt_headers)/bits
- doins misc/syscall-list.h bits/stdio_lim.h || die "doins include bits"
- insinto $(alt_headers)/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
- # system headers correctly. See gcc/doc/gccinstall.info
- dosym usr/include /usr/${CTARGET}/sys-include
-}
-
-toolchain-glibc_pkg_postinst() {
- # Mixing nptlonly and -nptlonly glibc can prove dangerous if libpthread
- # isn't removed in unmerge which happens sometimes. See bug #87671
- if ! is_crosscompile && want_linuxthreads && [[ ${ROOT} == "/" ]] ; then
- for libdir in $(get_all_libdirs) ; do
- for f in "${ROOT}"/${libdir}/libpthread-2.* "${ROOT}"/${libdir}/libpthread-0.6* ; do
- if [[ -f ${f} ]] ; then
- rm -f ${f}
- ldconfig
- fi
- done
- done
- fi
-
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if [[ ! -e ${ROOT}/lib/ld.so.1 ]] && use ppc64 && ! has_multilib_profile ; then
- ## SHOULDN'T THIS BE lib64??
- ln -s ld64.so.1 "${ROOT}"/lib/ld.so.1
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ...
- /sbin/telinit U &> /dev/null
-
- # if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}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"
- fi
- local x jobs
- for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done
- locale-gen -j ${jobs:-1} --config "${locale_list}"
- fi
-
- echo
- einfo "Gentoo's glibc no longer includes mdns."
- einfo "If you want mdns, emerge the sys-auth/nss-mdns package."
- echo
-
- if want_nptl && want_linuxthreads ; then
- einfo "The default behavior of glibc on your system is to use NPTL. If"
- einfo "you want to use linuxthreads for a particular program, start it"
- einfo "by executing 'LD_ASSUME_KERNEL=${LT_KERNEL_VERSION} <program> [<options>]'"
- echo
- fi
-}
-
-### SUPPORT FUNCTIONS ###
-# We need to be able to set alternative headers for
-# compiling for non-native platform
-# Will also become useful for testing kernel-headers without screwing up
-# the whole system.
-# note: intentionally undocumented.
-alt_headers() {
- if [[ -z ${ALT_HEADERS} ]] ; then
- if is_crosscompile ; then
- ALT_HEADERS="/usr/${CTARGET}/usr/include"
- else
- ALT_HEADERS="/usr/include"
- fi
- fi
- echo "${ALT_HEADERS}"
-}
-alt_build_headers() {
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
- ALT_BUILD_HEADERS=$(alt_headers)
- if tc-is-cross-compiler ; then
- ALT_BUILD_HEADERS=${ROOT}$(alt_headers)
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h')
- ALT_BUILD_HEADERS=${header_path%/linux/version.h}
- fi
- fi
- fi
- echo "${ALT_BUILD_HEADERS}"
-}
-
-alt_libdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /$(get_libdir)
- fi
-}
-
-alt_usrlibdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/usr/$(get_libdir)
- else
- echo /usr/$(get_libdir)
- fi
-}
-
-setup_flags() {
- # Make sure host make.conf doesn't pollute us
- if is_crosscompile || tc-is-cross-compiler ; then
- CHOST=${CTARGET} strip-unsupported-flags
- fi
-
- # Store our CFLAGS because it's changed depending on which CTARGET
- # we are building when pulling glibc on a multilib profile
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
- CFLAGS=${CFLAGS_BASE}
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
- CXXFLAGS=${CXXFLAGS_BASE}
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
- ASFLAGS=${ASFLAGS_BASE}
-
- # Over-zealous CFLAGS can often cause problems. What may work for one
- # person may not work for another. To avoid a large influx of bugs
- # relating to failed builds, we strip most CFLAGS out to ensure as few
- # problems as possible.
- strip-flags
- strip-unsupported-flags
- filter-flags -m32 -m64 -mabi=*
-
- unset CBUILD_OPT CTARGET_OPT
- if has_multilib_profile ; then
- CTARGET_OPT=$(get_abi_CTARGET)
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
- fi
-
- case $(tc-arch ${CTARGET_OPT}) in
- x86)
- # -march needed for #185404
- local t=${CTARGET_OPT:-${CTARGET}}
- export CFLAGS="-march=${t%%-*} ${CFLAGS}"
- ;;
- amd64)
- # Punt this when amd64's 2004.3 is removed
- CFLAGS_x86="-m32"
- ;;
- ppc)
- append-flags "-freorder-blocks"
- ;;
- sparc)
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though.
- filter-flags "-fcall-used-g7"
- append-flags "-fcall-used-g6"
- filter-flags "-mvis"
-
- if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
- case ${ABI} in
- sparc64)
- filter-flags -Wa,-xarch -Wa,-A
-
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparc64b-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9b"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
- else
- CTARGET_OPT="sparc64-unknown-linux-gnu"
- append-flags "-Wa,-xarch=v9a"
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a"
- fi
- ;;
- *)
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- else
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- ;;
- esac
- else
- if is-flag "-mcpu=ultrasparc3"; then
- CTARGET_OPT="sparcv9b-unknown-linux-gnu"
- elif { is_crosscompile && want_nptl; } || is-flag "-mcpu=ultrasparc2" || is-flag "-mcpu=ultrasparc"; then
- CTARGET_OPT="sparcv9-unknown-linux-gnu"
- fi
- fi
- ;;
- esac
-
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
- CBUILD_OPT=${CTARGET_OPT}
- fi
-
- # Lock glibc at -O2 -- linuxthreads needs it and we want to be
- # conservative here. -fno-strict-aliasing is to work around #155906
- filter-flags -O?
- append-flags -O2 -fno-strict-aliasing
-
- # building glibc with SSP is fraught with difficulty, especially
- # due to __stack_chk_fail_local which would mean significant changes
- # to the glibc build process. See bug #94325
- filter-flags -fstack-protector
-
- if use hardened && gcc-specs-pie ; then
- # Force PIC macro definition for all compilations since they're all
- # either -fPIC or -fPIE with the default-PIE compiler.
- append-cppflags -DPIC
- else
- # Don't build -fPIE without the default-PIE compiler and the
- # hardened-pie patch
- filter-flags -fPIE
- fi
-}
-
-check_kheader_version() {
- local version=$(
- printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
- $(tc-getCPP ${CTARGET}) -I "$(alt_build_headers)" | \
- tail -n 1
- )
- [[ ${version} -ge "$1" ]]
-}
-
-check_nptl_support() {
- local min_kernel_version=$(KV_to_int "${NPTL_KERNEL_VERSION}")
-
- echo
-
- ebegin "Checking gcc for __thread support"
- if ! eend $(want__thread ; echo $?) ; then
- echo
- eerror "Could not find a gcc that supports the __thread directive!"
- eerror "Please update your binutils/gcc and try again."
- die "No __thread support in gcc!"
- fi
-
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- # Building fails on an non-supporting kernel
- ebegin "Checking kernel version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $([[ $(get_KV) -ge ${min_kernel_version} ]] ; echo $?) ; then
- echo
- eerror "You need a kernel of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "Kernel version too low!"
- fi
- fi
-
- # Building fails with too low linux-headers
- ebegin "Checking linux-headers version (>=${NPTL_KERNEL_VERSION})"
- if ! eend $(check_kheader_version "${min_kernel_version}" ; echo $?) ; then
- echo
- eerror "You need linux-headers of at least version ${NPTL_KERNEL_VERSION}"
- eerror "for NPTL support!"
- die "linux-headers version too low!"
- fi
-
- echo
-}
-
-want_nptl() {
- [[ -z ${GLIBC_LT_VER} ]] && return 0
- want_tls || return 1
- use nptl || return 1
-
- # Only list the arches that cannot do NPTL
- case $(tc-arch) in
- m68k) return 1;;
- sparc)
- # >= v9 is needed for nptl.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
- ;;
- esac
-
- return 0
-}
-
-want_linuxthreads() {
- [[ -z ${GLIBC_LT_VER} ]] && return 1
- ! use nptlonly && return 0
- want_nptl || return 0
- return 1
-}
-
-want_tls() {
- # Archs that can use TLS (Thread Local Storage)
- case $(tc-arch) in
- sparc)
- # 2.3.6 should have tls support on sparc64
- # when using newer binutils
- case ${CTARGET/-*} in
- sparc64*) return 1 ;;
- *) return 0 ;;
- esac
- ;;
- x86)
- # requires i486 or better #106556
- [[ ${CTARGET} == i[4567]86* ]] && return 0
- return 1
- ;;
- esac
-
- return 0
-}
-
-want__thread() {
- want_tls || return 1
-
- # For some reason --with-tls --with__thread is causing segfaults on sparc32.
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
-
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
-
- echo 'extern __thread int i;' > "${T}"/test-__thread.c
- $(tc-getCC ${CTARGET}) -c "${T}"/test-__thread.c -o "${T}"/test-__thread.o &> /dev/null
- WANT__THREAD=$?
- rm -f "${T}"/test-__thread.[co]
-
- return ${WANT__THREAD}
-}
-
-glibc_do_configure() {
- local myconf
-
- # set addons
- pushd "${S}" > /dev/null
- local ADDONS=$(echo */configure | sed \
- -e 's:/configure::g' \
- -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \
- -e 's: \+$::' \
- -e 's! !,!g' \
- -e 's!^!,!' \
- -e '/^,\*$/d')
- [[ -d ports ]] && ADDONS="${ADDONS},ports"
- popd > /dev/null
-
- use nls || myconf="${myconf} --disable-nls"
- myconf="${myconf} $(use_enable hardened stackguard-randomization)"
- if [[ $(<"${T}"/.ssp.compat) == "yes" ]] ; then
- myconf="${myconf} --enable-old-ssp-compat"
- else
- myconf="${myconf} --disable-old-ssp-compat"
- fi
-
- use glibc-omitfp && myconf="${myconf} --enable-omitfp"
-
- [[ ${CTARGET//_/-} == *-softfloat-* ]] && myconf="${myconf} --without-fp"
-
- if [[ $1 == "linuxthreads" ]] ; then
- if want_tls ; then
- myconf="${myconf} --with-tls"
-
- if ! want__thread || use glibc-compat20 || [[ ${LT_KERNEL_VERSION} == 2.[02].* ]] ; then
- myconf="${myconf} --without-__thread"
- else
- myconf="${myconf} --with-__thread"
- fi
- else
- myconf="${myconf} --without-tls --without-__thread"
- fi
-
- myconf="${myconf} --disable-sanity-checks"
- myconf="${myconf} --enable-add-ons=linuxthreads${ADDONS}"
- myconf="${myconf} --enable-kernel=${LT_KERNEL_VERSION}"
- elif [[ $1 == "nptl" ]] ; then
- myconf="${myconf} --enable-add-ons=nptl${ADDONS}"
- myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}"
- else
- die "invalid pthread option"
- fi
-
- # Since SELinux support is only required for nscd, only enable it if:
- # 1. USE selinux
- # 2. only for the primary ABI on multilib systems
- if use selinux ; then
- if use multilib || has_multilib_profile ; then
- if is_final_abi ; then
- myconf="${myconf} --with-selinux"
- else
- myconf="${myconf} --without-selinux"
- fi
- else
- myconf="${myconf} --with-selinux"
- fi
- else
- myconf="${myconf} --without-selinux"
- fi
-
- myconf="${myconf}
- --without-cvs
- --enable-bind-now
- --build=${CBUILD_OPT:-${CBUILD}}
- --host=${CTARGET_OPT:-${CTARGET}}
- $(use_enable profile)
- --without-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
- ${EXTRA_ECONF}"
-
- # 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)
-
- has_version app-admin/eselect-compiler || export CC=$(tc-getCC ${CTARGET})
-
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1
- mkdir -p "${GBUILDDIR}"
- cd "${GBUILDDIR}"
- einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}"
- "${S}"/configure ${myconf} || die "failed to configure glibc"
-
- # since we'll be punting them for cross-compilers, and they can cause
- # problems (ia64+static), we'll just skip building altogether
- is_crosscompile && sed -i '1ibuild-programs = no' config.make
-}
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- addwrite ${ROOT}/
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- addwrite ${ROOT}/usr
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- addwrite ${ROOT}/usr/X11R6
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-use_multilib() {
- case ${CTARGET} in
- sparc64*|mips64*|x86_64*|powerpc64*|s390x*)
- has_multilib_profile || use multilib ;;
- *) false ;;
- esac
-}
-
-# Setup toolchain variables that would be defined in the profiles for these archs.
-setup_env() {
- # These should not be set, else the zoneinfo do not always get installed ...
- unset LANGUAGE LANG LC_ALL
- # silly users
- unset LD_RUN_PATH
-
- if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET}
- if ! use multilib ; then
- MULTILIB_ABIS=${DEFAULT_ABI}
- else
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}}
- fi
-
- # If the user has CFLAGS_<CTARGET> in their make.conf, use that,
- # and fall back on CFLAGS.
- local VAR=CFLAGS_${CTARGET//[-.]/_}
- CFLAGS=${!VAR-${CFLAGS}}
- fi
-
- setup_flags
-
- export ABI=${ABI:-${DEFAULT_ABI:-default}}
-
- if is_crosscompile || tc-is-cross-compiler ; then
- local VAR=CFLAGS_${ABI}
- # We need to export CFLAGS with abi information in them because
- # glibc's configure script checks CFLAGS for some targets (like mips)
- export CFLAGS="${!VAR} ${CFLAGS}"
- fi
-}
-
-### /ECLASS PUNTAGE ###
-
-if is_crosscompile ; then
- SLOT="${CTARGET}-2.2"
-else
- SLOT="2.2"
-fi
-
-# we'll handle stripping ourself #46186
-RESTRICT="strip"
-EMULTILIB_PKG="true"
-
-# General: We need a new-enough binutils for as-needed
-# arch: we need to make sure our binutils/gcc supports TLS
-DEPEND=">=sys-devel/gcc-3.4.4
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 )
- ppc? ( >=sys-devel/gcc-4.1.0 )
- ppc64? ( >=sys-devel/gcc-4.1.0 )
- >=sys-devel/binutils-2.15.94
- ${GLIBC_LT_VER:+nptl? (} || ( >=sys-kernel/mips-headers-${NPTL_KERNEL_VERSION} >=sys-kernel/linux-headers-${NPTL_KERNEL_VERSION} ) ${GLIBC_LT_VER:+)}
- >=sys-devel/gcc-config-1.3.12
- >=app-misc/pax-utils-0.1.10
- virtual/os-headers
- nls? ( sys-devel/gettext )
- >=sys-apps/portage-2.1.2
- selinux? ( sys-libs/libselinux )"
-RDEPEND="nls? ( sys-devel/gettext )
- selinux? ( sys-libs/libselinux )"
-
-if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
-
- if [[ ${CATEGORY} == *-linux* ]] ; then
- if [[ ${CATEGORY} == cross-mips* ]] ; then
- DEPEND="${DEPEND} >=${CATEGORY}/mips-headers-2.6.10"
- else
- DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
- fi
- fi
-else
- DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c"
- RDEPEND="${RDEPEND} sys-libs/timezone-data"
-fi
-
-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if ! is_crosscompile && ! tc-is-cross-compiler ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
- fi
-
- # users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${ROOT}/etc/locale.gen ]] && [[ -e ${ROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${ROOT}/etc/locales.build."
- eerror "Do so now after making sure ${ROOT}/etc/locale.gen is kosher."
- die "lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml"
- die "please fix your CHOST"
- fi
-
- if [[ -n ${GLIBC_LT_VER} ]] ; then
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty, which is probably not what you want."
- fi
-
- if ! type -p scanelf > /dev/null ; then
- eerror "You do not have pax-utils installed."
- die "install pax-utils"
- fi
-
- use hardened && ! gcc-specs-pie && \
- ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
-}
-
-src_unpack() {
- setup_env
-
- toolchain-glibc_src_unpack
-
- # Backwards SSP support
- cd "${S}"
-# For now, we force everyone to have the extra symbols
-# einfon "Scanning system for __guard to see if we need SSP compat ... "
-# if [[ -n $(scanelf -qyls__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then
- echo "yes" > "${T}"/.ssp.compat
-# else
-# # ok, a quick scan didnt find it, so lets do a deep scan ...
-# if [[ -n $(scanelf -qyRlps__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then
-# echo "yes" > "${T}"/.ssp.compat
-# else
-# echo "no" > "${T}"/.ssp.compat
-# fi
-# fi
-# cat "${T}"/.ssp.compat
-
- # Glibc is stupid sometimes, and doesn't realize that with a
- # static C-Only gcc, -lgcc_eh doesn't exist.
- # http://sources.redhat.com/ml/libc-alpha/2003-09/msg00100.html
- # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html
- echo 'int main(){}' > "${T}"/gcc_eh_test.c
- if ! $(tc-getCC ${CTARGET}) "${T}"/gcc_eh_test.c -lgcc_eh 2>/dev/null ; then
- sed -i -e 's:-lgcc_eh::' Makeconfig || die "sed gcc_eh"
- fi
-
- cd "${WORKDIR}"
- find . -type f '(' -size 0 -o -name "*.orig" ')' -exec rm -f {} \;
- find . -name configure -exec touch {} \;
-
- # Fix permissions on some of the scripts
- chmod u+x "${S}"/scripts/*.sh
-}
-
-src_compile() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Building multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_compile
- done
- ABI=${OABI}
- unset OABI
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_compile
- else
- toolchain-glibc_src_compile
- fi
-}
-
-src_test() {
- local ret=0
-
- setup_env
-
- if [[ -z ${OABI} ]] && has_multilib_profile ; then
- OABI=${ABI}
- einfo "Testing multilib glibc for ABIs: $(get_install_abis)"
- for ABI in $(get_install_abis) ; do
- export ABI
- einfo " Testing ${ABI} glibc"
- src_test
- ((ret+=$?))
- done
- ABI=${OABI}
- unset OABI
- [[ ${ret} -ne 0 ]] \
- && die "tests failed" \
- || return 0
- fi
-
- want_linuxthreads && toolchain-glibc_src_test linuxthreads ; ((ret+=$?))
- want_nptl && toolchain-glibc_src_test nptl ; ((ret+=$?))
- return ${ret}
-}
-
-src_strip() {
- # Now, strip everything but the thread libs #46186, as well as the dynamic
- # linker, else we cannot set breakpoints in shared libraries due to bugs in
- # gdb. Also want to grab stuff in tls subdir. whee.
- env \
- -uRESTRICT \
- CHOST=${CTARGET} \
- STRIP_MASK="/*/{,tls/}libthread_db*" \
- prepallstrip
-}
-
-src_install() {
- setup_env
-
- if [[ -z ${OABI} ]] ; then
- local abilist=""
- if has_multilib_profile ; then
- abilist=$(get_install_abis)
- einfo "Installing multilib glibc for ABIs: ${abilist}"
- elif is_crosscompile || tc-is-cross-compiler ; then
- abilist=${DEFAULT_ABI}
- fi
- if [[ -n ${abilist} ]] ; then
- OABI=${ABI}
- for ABI in ${abilist} ; do
- export ABI
- src_install
- done
- ABI=${OABI}
- unset OABI
- src_strip
- return 0
- fi
- fi
-
- if just_headers ; then
- toolchain-glibc_headers_install
- else
- toolchain-glibc_src_install
- fi
- [[ -z ${OABI} ]] && src_strip
-}
-
-pkg_preinst() {
- toolchain-glibc_pkg_preinst
-}
-
-pkg_postinst() {
- toolchain-glibc_pkg_postinst
-}
diff --git a/sys-libs/glibc/glibc-2.8_p20080602.ebuild b/sys-libs/glibc/glibc-2.8_p20080602.ebuild
deleted file mode 100644
index d174434f2061..000000000000
--- a/sys-libs/glibc/glibc-2.8_p20080602.ebuild
+++ /dev/null
@@ -1,378 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.8_p20080602.ebuild,v 1.17 2009/12/10 01:31:25 vapier Exp $
-
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-
-LICENSE="LGPL-2"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-RESTRICT="strip" # strip ourself #46186
-EMULTILIB_PKG="true"
-
-# Configuration variables
-if [[ ${PV} == *_p* ]] ; then
-RELEASE_VER=${PV%_p*}
-BRANCH_UPDATE=""
-SNAP_VER=${PV#*_p}
-else
-RELEASE_VER=${PV}
-BRANCH_UPDATE=""
-SNAP_VER=""
-fi
-MANPAGE_VER="" # pregenerated manpages
-INFOPAGE_VER="" # pregenerated infopages
-PATCH_VER="3" # Gentoo patchset
-PORTS_VER=${RELEASE_VER} # version of glibc ports addon
-LIBIDN_VER="" # version of libidn addon
-LT_VER="" # version of linuxthreads addon
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires
-
-IUSE="debug gd glibc-omitfp hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}"
-S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER+-${SNAP_VER}}
-
-# 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-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_libdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /$(get_libdir)
- fi
-}
-
-if is_crosscompile ; then
- SLOT="${CTARGET}-2.2"
-else
- # Why SLOT 2.2 you ask yourself while sippin your tea ?
- # Everyone knows 2.2 > 0, duh.
- SLOT="2.2"
- PROVIDE="virtual/libc"
-fi
-
-# General: We need a new-enough binutils for as-needed
-# arch: we need to make sure our binutils/gcc supports TLS
-DEPEND=">=sys-devel/gcc-3.4.4
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 )
- ppc? ( >=sys-devel/gcc-4.1.0 )
- ppc64? ( >=sys-devel/gcc-4.1.0 )
- >=sys-devel/binutils-2.15.94
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)}
- >=sys-devel/gcc-config-1.3.12
- >=app-misc/pax-utils-0.1.10
- virtual/os-headers
- nls? ( sys-devel/gettext )
- >=sys-apps/sandbox-1.2.18.1-r2
- >=sys-apps/portage-2.1.2
- selinux? ( sys-libs/libselinux )"
-RDEPEND="nls? ( sys-devel/gettext )
- selinux? ( sys-libs/libselinux )"
-
-if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
-else
- DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c"
- RDEPEND="${RDEPEND} sys-libs/timezone-data"
-fi
-
-SRC_URI=$(
- upstream_uris() {
- echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/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}
- }
-
- TARNAME=${PN}
- if [[ -n ${SNAP_VER} ]] ; then
- TARNAME="${PN}-${RELEASE_VER}"
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER}
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2
- else
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2
- fi
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
- [[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2
- [[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2
-)
-
-# eblit-include [--skip] <function> [version]
-eblit-include() {
- local skipable=false
- [[ $1 == "--skip" ]] && skipable=true && shift
-
- 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 || die
- eblit-run-maybe eblit-$1-post
-}
-
-src_unpack() { eblit-run src_unpack ; }
-src_compile() { eblit-run src_compile ; }
-src_test() { eblit-run src_test ; }
-src_install() { eblit-run src_install ; }
-
-eblit-src_unpack-post() {
- if use hardened ; then
- cd "${S}"
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
- gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch
- epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch
- epatch "${FILESDIR}"/2.7/glibc-2.7-hardened-inittls-nosysenter.patch
-
- einfo "Installing Hardened Gentoo SSP handler"
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \
- debug/stack_chk_fail.c || die
-
- if use debug ; then
- # When using Hardened Gentoo stack handler, have smashes dump core for
- # analysis - debug only, as core could be an information leak
- # (paranoia).
- sed -i \
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
- debug/Makefile \
- || die "Failed to modify debug/Makefile for debug stack handler"
- fi
-
- # Build nscd with ssp-all
- sed -i \
- -e 's:-fstack-protector$:-fstack-protector-all:' \
- nscd/Makefile \
- || die "Failed to ensure nscd builds with ssp-all"
- fi
-}
-
-maint_pkg_create() {
- local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}"
- cd ${base}
- local stamp=$(date +%Y%m%d)
- local d
- for d in libc ports ; do
- #(cd ${d} && cvs up)
- case ${d} in
- libc) tarball="${P}";;
- ports) tarball="${PN}-ports-${PV}";;
- esac
- rm -f ${tarball}*
- ln -sf ${d} ${tarball}
- tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma
- du -b "${T}"/${tarball}.tar.lzma
- done
-}
-
-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if [[ ${ROOT} == "/" ]] && [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
-
- # Check for broken kernels #262698
- cd "${T}"
- printf '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n' > kern-clo-test.c
- emake kern-clo-test || die
- if ! ./kern-clo-test ; then
- eerror "Your patched vendor kernel is broken. You need to get an"
- eerror "update from whoever is providing the kernel to you."
- eerror "http://sourceware.org/bugzilla/show_bug.cgi?id=5227"
- die "keeping your system alive, say thank you"
- fi
- fi
-
- # users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${ROOT}/etc/locale.gen ]] && [[ -e ${ROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${ROOT}/etc/locales.build."
- eerror "Do so now after making sure ${ROOT}/etc/locale.gen is kosher."
- die "lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml"
- die "please fix your CHOST"
- fi
-
- if [[ -n ${LT_VER} ]] ; then
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty, which is probably not what you want."
- fi
-
- use hardened && ! gcc-specs-pie && \
- ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
-
- export LC_ALL=C #252802
-}
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-pkg_preinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && [[ ! -d ${D}/$(alt_libdir)/tls ]] ; then
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # Shouldnt need to keep this updated
- [[ -e ${ROOT}/etc/locale.gen ]] && rm -f "${D}"/etc/locale.gen
-
- # simple test to make sure our new glibc isnt completely broken.
- # make sure we don't test with statically built binaries since
- # they will fail. also, skip if this glibc is a cross compiler.
- [[ ${ROOT} != "/" ]] && return 0
- [[ -d ${D}/$(get_libdir) ]] || return 0
- cd / #228809
- local x striptest
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest} == *"statically linked"* ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
-
-pkg_postinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ...
- /sbin/telinit U
-
- # if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}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"
- fi
- local x jobs
- for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done
- locale-gen -j ${jobs:-1} --config "${locale_list}"
- fi
-}
diff --git a/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild b/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild
deleted file mode 100644
index d6ff694e71f7..000000000000
--- a/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild
+++ /dev/null
@@ -1,378 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201-r1.ebuild,v 1.9 2009/12/10 01:31:26 vapier Exp $
-
-GLIBC_PATCH_EXCLUDE="${GLIBC_PATCH_EXCLUDE} 1060_all_glibc-nss-deepbind.patch" #252302
-
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-
-LICENSE="LGPL-2"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-RESTRICT="strip" # strip ourself #46186
-EMULTILIB_PKG="true"
-
-# Configuration variables
-if [[ ${PV} == *_p* ]] ; then
-RELEASE_VER=${PV%_p*}
-BRANCH_UPDATE=""
-SNAP_VER=${PV#*_p}
-else
-RELEASE_VER=${PV}
-BRANCH_UPDATE=""
-SNAP_VER=""
-fi
-MANPAGE_VER="" # pregenerated manpages
-INFOPAGE_VER="" # pregenerated infopages
-PATCH_VER="2" # Gentoo patchset
-PORTS_VER=${RELEASE_VER} # version of glibc ports addon
-LIBIDN_VER="" # version of libidn addon
-LT_VER="" # version of linuxthreads addon
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires
-
-IUSE="debug gd glibc-omitfp hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}"
-S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER+-${SNAP_VER}}
-
-# 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-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_libdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /$(get_libdir)
- fi
-}
-
-if is_crosscompile ; then
- SLOT="${CTARGET}-2.2"
-else
- # Why SLOT 2.2 you ask yourself while sippin your tea ?
- # Everyone knows 2.2 > 0, duh.
- SLOT="2.2"
- PROVIDE="virtual/libc"
-fi
-
-# General: We need a new-enough binutils for as-needed
-# arch: we need to make sure our binutils/gcc supports TLS
-DEPEND=">=sys-devel/gcc-3.4.4
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 )
- ppc? ( >=sys-devel/gcc-4.1.0 )
- ppc64? ( >=sys-devel/gcc-4.1.0 )
- >=sys-devel/binutils-2.15.94
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)}
- >=sys-devel/gcc-config-1.3.12
- >=app-misc/pax-utils-0.1.10
- virtual/os-headers
- nls? ( sys-devel/gettext )
- >=sys-apps/sandbox-1.2.18.1-r2
- >=sys-apps/portage-2.1.2
- selinux? ( sys-libs/libselinux )"
-RDEPEND="nls? ( sys-devel/gettext )
- selinux? ( sys-libs/libselinux )"
-
-if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
-else
- DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c"
- RDEPEND="${RDEPEND} sys-libs/timezone-data"
-fi
-
-SRC_URI=$(
- upstream_uris() {
- echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/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}
- }
-
- TARNAME=${PN}
- if [[ -n ${SNAP_VER} ]] ; then
- TARNAME="${PN}-${RELEASE_VER}"
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER}
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2
- else
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2
- fi
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
- [[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2
- [[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2
-)
-
-# eblit-include [--skip] <function> [version]
-eblit-include() {
- local skipable=false
- [[ $1 == "--skip" ]] && skipable=true && shift
-
- 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 || die
- eblit-run-maybe eblit-$1-post
-}
-
-src_unpack() { eblit-run src_unpack ; }
-src_compile() { eblit-run src_compile ; }
-src_test() { eblit-run src_test ; }
-src_install() { eblit-run src_install ; }
-
-eblit-src_unpack-post() {
- if use hardened ; then
- cd "${S}"
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
- gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch
- epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch
- epatch "${FILESDIR}"/2.7/glibc-2.7-hardened-inittls-nosysenter.patch
-
- einfo "Installing Hardened Gentoo SSP handler"
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \
- debug/stack_chk_fail.c || die
-
- if use debug ; then
- # When using Hardened Gentoo stack handler, have smashes dump core for
- # analysis - debug only, as core could be an information leak
- # (paranoia).
- sed -i \
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
- debug/Makefile \
- || die "Failed to modify debug/Makefile for debug stack handler"
- fi
-
- # Build nscd with ssp-all
- sed -i \
- -e 's:-fstack-protector$:-fstack-protector-all:' \
- nscd/Makefile \
- || die "Failed to ensure nscd builds with ssp-all"
- fi
-}
-
-maint_pkg_create() {
- local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}"
- cd ${base}
- local stamp=$(date +%Y%m%d)
- local d
- for d in libc ports ; do
- #(cd ${d} && cvs up)
- case ${d} in
- libc) tarball="${P}";;
- ports) tarball="${PN}-ports-${PV}";;
- esac
- rm -f ${tarball}*
- ln -sf ${d} ${tarball}
- tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma
- du -b "${T}"/${tarball}.tar.lzma
- done
-}
-
-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if [[ ${ROOT} == "/" ]] && [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
-
- # Check for broken kernels #262698
- cd "${T}"
- printf '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n' > kern-clo-test.c
- emake kern-clo-test || die
- if ! ./kern-clo-test ; then
- eerror "Your patched vendor kernel is broken. You need to get an"
- eerror "update from whoever is providing the kernel to you."
- eerror "http://sourceware.org/bugzilla/show_bug.cgi?id=5227"
- die "keeping your system alive, say thank you"
- fi
- fi
-
- # users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${ROOT}/etc/locale.gen ]] && [[ -e ${ROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${ROOT}/etc/locales.build."
- eerror "Do so now after making sure ${ROOT}/etc/locale.gen is kosher."
- die "lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml"
- die "please fix your CHOST"
- fi
-
- if [[ -n ${LT_VER} ]] ; then
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty, which is probably not what you want."
- fi
-
- use hardened && ! gcc-specs-pie && \
- ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
-
- export LC_ALL=C #252802
-}
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-pkg_preinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && [[ ! -d ${D}/$(alt_libdir)/tls ]] ; then
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # simple test to make sure our new glibc isnt completely broken.
- # make sure we don't test with statically built binaries since
- # they will fail. also, skip if this glibc is a cross compiler.
- [[ ${ROOT} != "/" ]] && return 0
- [[ -d ${D}/$(get_libdir) ]] || return 0
- cd / #228809
- local x striptest
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest} == *"statically linked"* ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
-
-pkg_postinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ... if in a chroot or a diff init package, ignore
- # errors from this step #253697
- /sbin/telinit U 2>/dev/null
-
- # if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}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"
- fi
- local x jobs
- for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done
- locale-gen -j ${jobs:-1} --config "${locale_list}"
- fi
-}
diff --git a/sys-libs/glibc/glibc-2.9_p20081201.ebuild b/sys-libs/glibc/glibc-2.9_p20081201.ebuild
deleted file mode 100644
index d4c9efdefe6d..000000000000
--- a/sys-libs/glibc/glibc-2.9_p20081201.ebuild
+++ /dev/null
@@ -1,375 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201.ebuild,v 1.7 2009/12/10 01:31:26 vapier Exp $
-
-inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib
-
-DESCRIPTION="GNU libc6 (also called glibc2) C library"
-HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
-
-LICENSE="LGPL-2"
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
-RESTRICT="strip" # strip ourself #46186
-EMULTILIB_PKG="true"
-
-# Configuration variables
-if [[ ${PV} == *_p* ]] ; then
-RELEASE_VER=${PV%_p*}
-BRANCH_UPDATE=""
-SNAP_VER=${PV#*_p}
-else
-RELEASE_VER=${PV}
-BRANCH_UPDATE=""
-SNAP_VER=""
-fi
-MANPAGE_VER="" # pregenerated manpages
-INFOPAGE_VER="" # pregenerated infopages
-PATCH_VER="1" # Gentoo patchset
-PORTS_VER=${RELEASE_VER} # version of glibc ports addon
-LIBIDN_VER="" # version of libidn addon
-LT_VER="" # version of linuxthreads addon
-NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires
-#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires
-
-IUSE="debug gd glibc-omitfp hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}"
-S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER+-${SNAP_VER}}
-
-# 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-} != ${CATEGORY} ]] ; then
- export CTARGET=${CATEGORY/cross-}
- fi
-fi
-
-[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20}
-
-is_crosscompile() {
- [[ ${CHOST} != ${CTARGET} ]]
-}
-alt_libdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/$(get_libdir)
- else
- echo /$(get_libdir)
- fi
-}
-
-if is_crosscompile ; then
- SLOT="${CTARGET}-2.2"
-else
- # Why SLOT 2.2 you ask yourself while sippin your tea ?
- # Everyone knows 2.2 > 0, duh.
- SLOT="2.2"
- PROVIDE="virtual/libc"
-fi
-
-# General: We need a new-enough binutils for as-needed
-# arch: we need to make sure our binutils/gcc supports TLS
-DEPEND=">=sys-devel/gcc-3.4.4
- arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 )
- ppc? ( >=sys-devel/gcc-4.1.0 )
- ppc64? ( >=sys-devel/gcc-4.1.0 )
- >=sys-devel/binutils-2.15.94
- ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)}
- >=sys-devel/gcc-config-1.3.12
- >=app-misc/pax-utils-0.1.10
- virtual/os-headers
- nls? ( sys-devel/gettext )
- >=sys-apps/sandbox-1.2.18.1-r2
- >=sys-apps/portage-2.1.2
- selinux? ( sys-libs/libselinux )"
-RDEPEND="nls? ( sys-devel/gettext )
- selinux? ( sys-libs/libselinux )"
-
-if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
- DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
- [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
-else
- DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c"
- RDEPEND="${RDEPEND} sys-libs/timezone-data"
-fi
-
-SRC_URI=$(
- upstream_uris() {
- echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/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}
- }
-
- TARNAME=${PN}
- if [[ -n ${SNAP_VER} ]] ; then
- TARNAME="${PN}-${RELEASE_VER}"
- [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER}
- upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2
- else
- upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2
- fi
- [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2
- [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2
- [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2
- [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2
- [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
- [[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2
- [[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2
-)
-
-# eblit-include [--skip] <function> [version]
-eblit-include() {
- local skipable=false
- [[ $1 == "--skip" ]] && skipable=true && shift
-
- 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 || die
- eblit-run-maybe eblit-$1-post
-}
-
-src_unpack() { eblit-run src_unpack ; }
-src_compile() { eblit-run src_compile ; }
-src_test() { eblit-run src_test ; }
-src_install() { eblit-run src_install ; }
-
-eblit-src_unpack-post() {
- if use hardened ; then
- cd "${S}"
- einfo "Patching to get working PIE binaries on PIE (hardened) platforms"
- gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch
- epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch
- epatch "${FILESDIR}"/2.7/glibc-2.7-hardened-inittls-nosysenter.patch
-
- einfo "Installing Hardened Gentoo SSP handler"
- cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \
- debug/stack_chk_fail.c || die
-
- if use debug ; then
- # When using Hardened Gentoo stack handler, have smashes dump core for
- # analysis - debug only, as core could be an information leak
- # (paranoia).
- sed -i \
- -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
- debug/Makefile \
- || die "Failed to modify debug/Makefile for debug stack handler"
- fi
-
- # Build nscd with ssp-all
- sed -i \
- -e 's:-fstack-protector$:-fstack-protector-all:' \
- nscd/Makefile \
- || die "Failed to ensure nscd builds with ssp-all"
- fi
-}
-
-maint_pkg_create() {
- local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}"
- cd ${base}
- local stamp=$(date +%Y%m%d)
- local d
- for d in libc ports ; do
- #(cd ${d} && cvs up)
- case ${d} in
- libc) tarball="${P}";;
- ports) tarball="${PN}-ports-${PV}";;
- esac
- rm -f ${tarball}*
- ln -sf ${d} ${tarball}
- tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma
- du -b "${T}"/${tarball}.tar.lzma
- done
-}
-
-pkg_setup() {
- # prevent native builds from downgrading ... maybe update to allow people
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2)
- if [[ ${ROOT} == "/" ]] && [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then
- if has_version '>'${CATEGORY}/${PF} ; then
- eerror "Sanity check to keep you from breaking your system:"
- eerror " Downgrading glibc is not supported and a sure way to destruction"
- die "aborting to save your system"
- fi
-
- # Check for broken kernels #262698
- cd "${T}"
- printf '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n' > kern-clo-test.c
- emake kern-clo-test || die
- if ! ./kern-clo-test ; then
- eerror "Your patched vendor kernel is broken. You need to get an"
- eerror "update from whoever is providing the kernel to you."
- eerror "http://sourceware.org/bugzilla/show_bug.cgi?id=5227"
- die "keeping your system alive, say thank you"
- fi
- fi
-
- # users have had a chance to phase themselves, time to give em the boot
- if [[ -e ${ROOT}/etc/locale.gen ]] && [[ -e ${ROOT}/etc/locales.build ]] ; then
- eerror "You still haven't deleted ${ROOT}/etc/locales.build."
- eerror "Do so now after making sure ${ROOT}/etc/locale.gen is kosher."
- die "lazy upgrader detected"
- fi
-
- if [[ ${CTARGET} == i386-* ]] ; then
- eerror "i386 CHOSTs are no longer supported."
- eerror "Chances are you don't actually want/need i386."
- eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml"
- die "please fix your CHOST"
- fi
-
- if [[ -n ${LT_VER} ]] ; then
- if use nptlonly && ! use nptl ; then
- eerror "If you want nptlonly, add nptl to your USE too ;p"
- die "nptlonly without nptl"
- fi
- fi
-
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
- ewarn "This will result in a 50% performance penalty, which is probably not what you want."
- fi
-
- use hardened && ! gcc-specs-pie && \
- ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
-
- export LC_ALL=C #252802
-}
-
-fix_lib64_symlinks() {
- # the original Gentoo/AMD64 devs decided that since 64bit is the native
- # bitdepth for AMD64, lib should be used for 64bit libraries. however,
- # this ignores the FHS and breaks multilib horribly... especially
- # since it wont even work without a lib64 symlink anyways. *rolls eyes*
- # see bug 59710 for more information.
- # Travis Tilley <lv@gentoo.org> (08 Aug 2004)
- if [ -L ${ROOT}/lib64 ] ; then
- ewarn "removing /lib64 symlink and moving lib to lib64..."
- ewarn "dont hit ctrl-c until this is done"
- rm ${ROOT}/lib64
- # now that lib64 is gone, nothing will run without calling ld.so
- # directly. luckily the window of brokenness is almost non-existant
- use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64
- # all better :)
- ldconfig
- ln -s lib64 ${ROOT}/lib
- einfo "done! :-)"
- einfo "fixed broken lib64/lib symlink in ${ROOT}"
- fi
- if [ -L ${ROOT}/usr/lib64 ] ; then
- rm ${ROOT}/usr/lib64
- mv ${ROOT}/usr/lib ${ROOT}/usr/lib64
- ln -s lib64 ${ROOT}/usr/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr"
- fi
- if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then
- rm ${ROOT}/usr/X11R6/lib64
- mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64
- ln -s lib64 ${ROOT}/usr/X11R6/lib
- einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6"
- fi
-}
-
-pkg_preinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- # PPC64+others may want to eventually be added to this logic if they
- # decide to be multilib compatible and FHS compliant. note that this
- # chunk of FHS compliance only applies to 64bit archs where 32bit
- # compatibility is a major concern (not IA64, for example).
-
- # amd64's 2005.0 is the first amd64 profile to not need this code.
- # 2005.0 is setup properly, and this is executed as part of the
- # 2004.3 -> 2005.0 upgrade script.
- # It can be removed after 2004.3 has been purged from portage.
- { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks
-
- # it appears that /lib/tls is sometimes not removed. See bug
- # 69258 for more info.
- if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && [[ ! -d ${D}/$(alt_libdir)/tls ]] ; then
- ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..."
- rm -r "${ROOT}"/$(alt_libdir)/tls || die
- fi
-
- # simple test to make sure our new glibc isnt completely broken.
- # make sure we don't test with statically built binaries since
- # they will fail. also, skip if this glibc is a cross compiler.
- [[ ${ROOT} != "/" ]] && return 0
- [[ -d ${D}/$(get_libdir) ]] || return 0
- cd / #228809
- local x striptest
- for x in date env ls true uname ; do
- x=$(type -p ${x})
- [[ -z ${x} ]] && continue
- striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null)
- [[ -z ${striptest} ]] && continue
- [[ ${striptest} == *"statically linked"* ]] && continue
- "${D}"/$(get_libdir)/ld-*.so \
- --library-path "${D}"/$(get_libdir) \
- ${x} > /dev/null \
- || die "simple run test (${x}) failed"
- done
-}
-
-pkg_postinst() {
- # nothing to do if just installing headers
- just_headers && return
-
- if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
- # Generate fastloading iconv module configuration file.
- "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
- fi
-
- if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
- # Reload init ...
- /sbin/telinit U
-
- # if the host locales.gen contains no entries, we'll install everything
- local locale_list="${ROOT}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"
- fi
- local x jobs
- for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done
- locale-gen -j ${jobs:-1} --config "${locale_list}"
- fi
-}