Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

FL-43: updated toolchain in ~arch

  • Loading branch information...
commit 4bd0a6cd245433bdabbf83166c34ae423f8ce6e3 1 parent 3874c5e
Oleg angryvincent authored
Showing with 1,869 additions and 257 deletions.
  1. +5 −4 profiles/package.mask/funtoo-toolchain
  2. +2 −11 sys-devel/binutils/Manifest
  3. +7 −0 sys-devel/binutils/binutils-2.22-r1.ebuild
  4. +30 −26 sys-devel/gcc/Manifest
  5. +57 −0 sys-devel/gcc/gcc-4.6.3.ebuild
  6. +2 −0  sys-kernel/linux-headers/Manifest
  7. +50 −0 sys-kernel/linux-headers/linux-headers-3.4-r2.ebuild
  8. +15 −12 sys-libs/glibc/Manifest
  9. +290 −0 sys-libs/glibc/files/eblits-2.15/common.eblit
  10. +27 −0 sys-libs/glibc/files/eblits-2.15/pkg_postinst.eblit
  11. +83 −0 sys-libs/glibc/files/eblits-2.15/pkg_preinst.eblit
  12. +122 −0 sys-libs/glibc/files/eblits-2.15/pkg_setup.eblit
  13. +222 −0 sys-libs/glibc/files/eblits-2.15/src_compile.eblit
  14. +232 −0 sys-libs/glibc/files/eblits-2.15/src_install.eblit
  15. +42 −0 sys-libs/glibc/files/eblits-2.15/src_test.eblit
  16. +185 −0 sys-libs/glibc/files/eblits-2.15/src_unpack.eblit
  17. +76 −84 sys-libs/glibc/files/eblits/common.eblit
  18. +3 −5 sys-libs/glibc/files/eblits/pkg_postinst.eblit
  19. +2 −9 sys-libs/glibc/files/eblits/pkg_preinst.eblit
  20. +74 −19 sys-libs/glibc/files/eblits/pkg_setup.eblit
  21. +26 −15 sys-libs/glibc/files/eblits/src_compile.eblit
  22. +34 −51 sys-libs/glibc/files/eblits/src_install.eblit
  23. +28 −21 sys-libs/glibc/files/eblits/src_unpack.eblit
  24. +255 −0 sys-libs/glibc/glibc-2.15-r2.ebuild
9 profiles/package.mask/funtoo-toolchain
View
@@ -5,7 +5,8 @@
# linux-headers.
# For next toolchain upgrade
->sys-libs/glibc-2.13-r4
->sys-kernel/linux-headers-2.6.39
->sys-devel/gcc-4.6.2
->sys-devel/binutils-2.21.1-r1
+>sys-libs/glibc-2.15-r2
+>sys-kernel/linux-headers-3.4-r2
+>sys-devel/gcc-4.6.3
+>sys-devel/binutils-2.22-r1
+
13 sys-devel/binutils/Manifest
View
@@ -1,15 +1,6 @@
-DIST binutils-2.16.1-patches-1.11.tar.bz2 112286 RMD160 1812f1b793d2ad0ca579bca15647c7b51968d8cc SHA1 b202d37f456d3fd2980b389f366abeffd4d44c46 SHA256 746bf887befe3ace99c92504c25587bae8b34d660a9856318f9512de33df57a2
-DIST binutils-2.16.1-uclibc-patches-1.1.tar.bz2 2108 RMD160 7a410862e1bb94dbe0d3cd992da2ee250b4a0c5d SHA1 855091f0a69789b0984fa3a6855e1f8657aa95b9 SHA256 f62181c2f6c73e4561e3cbcf6260cc44c6db58dc95ce7ef9221b258806eef471
-DIST binutils-2.16.1.tar.bz2 12549917 RMD160 638861a6b709ac380f1bc13d55c6b48d0532b3d0 SHA1 5c80fd5657da47efc16a63fdd93ef7395319fbbf SHA256 351a6846ee179a37ed87a487971547159a7f4f92a1dec598c727f184a0de61ae
-DIST binutils-2.16.91.0.6-patches-1.0.tar.bz2 10082 RMD160 d35034161365e4760e2be672960ff427d05b6164 SHA1 d752d4dc037401e2cc7086b7da2a49e61188607b SHA256 373700234b003ab6a04b9bbad70638902473cc80b8870a0b17d57ec06f67040d
-DIST binutils-2.16.91.0.6-uclibc-patches-1.0.tar.bz2 2134 RMD160 78c870f4106c33aefa8294fe07c903ddeec6516f SHA1 48feebe347d93fcbaa3e604ade29c8dddc4364a1 SHA256 2a945090733f21c69d1116cfebe3bbaa38027cde0c16e6288056cdef5c9287e9
-DIST binutils-2.16.91.0.6.tar.bz2 12634566 RMD160 a359477fbb970bfe6f009b36d83e0969f2a5656d SHA1 6dfe6166502e07b2b146516c80fd17f9d0228f47 SHA256 7cffa91af850d3fd5f086e3690eae05c1d9d5ad82f915b36f0de920a3c9920be
-DIST binutils-2.18-patches-1.10.tar.bz2 19592 RMD160 4e5ffd7b9ccf43020de9690cb24528c24ac79dd7 SHA1 181b0fbf2aa255b53ca60055809db2803412cf48 SHA256 76c9582f3c39baa29d6d27fb388d2edd9f3de50e989dc03a04cc60c8336c5159
-DIST binutils-2.18-patches-1.9.tar.bz2 17221 RMD160 9f1334cf876dffbc3bf4a54c256d97e033b8b356 SHA1 3b898f277d05bfc59266d8ea8c38dff8d3ca7a61 SHA256 063698bb1a6eb7e1f0614ecf8f0560e10655ed83b17e1b3ea621ccff32ffb5fc
-DIST binutils-2.18.tar.bz2 14962245 RMD160 78d07475667c55ecbf9068dbb90362a3445b2a99 SHA1 fdec92e9dfc6c32155869f3910f47041c78e2277 SHA256 487a33a452f0edcf1f8bb8fc23dff5c7a82edec3f3f8b65632b6c945e961ee9b
-DIST binutils-2.19.1-patches-1.2.tar.bz2 10544 RMD160 e0b94133a8e5c248f497fd75fcf923014bce6234 SHA1 a1d805e529473d0661a40fc5cfe88aada44f7af9 SHA256 128c949a46e6c516b5ebb2dbb7be553db7d8f1ee174896d1b63adbd0950030b3
-DIST binutils-2.19.1.tar.bz2 16245771 RMD160 330089af7cb5c6b3994febe8cd2af159218bc012 SHA1 88c91e36cde93433e4c4c2b2e3417777aad84526 SHA256 3e8225b4d7ace0a2039de752e11fd6922d3b89a7259a292c347391c4788739f6
DIST binutils-2.20.1-patches-1.0.tar.bz2 14466 RMD160 1ed4da92a25adf5eb6c75042c450a6686dc277c1 SHA1 302b475f73a5f7167de5e72d613d0f7fc8c93904 SHA256 10a77687828a610a45bb2a57e3027fb5aa7180aec183384d3da2de6897838e2e
DIST binutils-2.20.1.tar.bz2 17501436 RMD160 2ab2de504a85840d1ec227eff50b5f4d2cad581e SHA1 fd2ba806e6f3a55cee453cb25c86991b26a75dee SHA256 228b84722d87e88e7fdd36869e590e649ab523a0800a7d53df906498afe6f6f8
DIST binutils-2.21.1-patches-1.2.tar.bz2 18818 RMD160 02780d12910b50772c61503ae97c0a1f4abc21c2 SHA1 66fbdec01dc3fbcac19a2401ca95d95e8c6cccb4 SHA256 d5ccd0275548019b8408e92be7c9e377350a545b80b6269b1dcdcdcc9f43d06a
DIST binutils-2.21.1.tar.bz2 18997755 RMD160 de5ce1d7cb0d44e3ec18c557beefb2a292d59a60 SHA1 525255ca6874b872540c9967a1d26acfbc7c8230 SHA256 cdecfa69f02aa7b05fbcdf678e33137151f361313b2f3e48aba925f64eabf654
+DIST binutils-2.22-patches-1.5.tar.bz2 37350 RMD160 fbcac8a18690dcfb01051ab3ec56671b3675ccfa SHA1 fb171e26273abc62ac06bb78cdd4b2d24e17a15b SHA256 51cad7b3c2d18db0f7d2e4a3e46e37f00eb720cfa663ea396e16dcfbba12a07c
+DIST binutils-2.22.tar.bz2 19973532 RMD160 34cebe4cdca9480d5dc6f6b00b052c48c8ac30dc SHA1 65b304a0b9a53a686ce50a01173d1f40f8efe404 SHA256 6c7af8ed1c8cf9b4b9d6e6fe09a3e1d3d479fe63984ba8b9b26bf356b6313ca9
7 sys-devel/binutils/binutils-2.22-r1.ebuild
View
@@ -0,0 +1,7 @@
+# Distributed under the terms of the GNU General Public License v2
+
+PATCHVER="1.5"
+ELF2FLT_VER=""
+inherit toolchain-binutils
+
+KEYWORDS="~*"
56 sys-devel/gcc/Manifest
View
@@ -1,26 +1,30 @@
-DIST ecj-4.3.jar 1377431 RMD160 48fa985f763838bed750aa64a2fa997734438099 SHA1 da254944309a8387aa39323fe7bb7216a4518311 SHA256 9de193ea393ed50d868b730bad6916f7a8ef4ba80216f8606d3e1a0dd886e74b
-DIST ecj-4.5.jar 1470676 RMD160 d3f4da657f086b6423f74e93f001132f4855368a SHA1 58c1d79c64c8cd718550f32a932ccfde8d1e6449 SHA256 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781
-DIST gcc-4.1.2-patches-1.3.tar.bz2 50790 RMD160 50900565645d9ea81c5c4a6990b3408f8b16fe29 SHA1 0c1eae0697bfe9e9656ee6c2d3aef97ac7db54cd SHA256 5fbb55d7f7cc136404d7c9375c3912acdcd49588b1d79f21e358efbc303665a3
-DIST gcc-4.1.2-uclibc-patches-1.0.tar.bz2 20980 RMD160 22e0f27e863e3b7c8fe0a5e4846daee17a49d409 SHA1 28033f25fd9b80102c2ae533b78ba332d490e21d SHA256 c6ed88711a727ed11847c9b9f1cef7023037bc80c0840eda5fca6d60fa02e35a
-DIST gcc-4.1.2.tar.bz2 39707720 RMD160 7c5d78e666ccf4c2b2c3db41e2388f08b6cdf722 SHA1 7981b8d1b58b10ddfd7d5142eab16352d9206f3b SHA256 cfc0efbcc6fcde0d416a32dfb246c9df022515a312683fac412578c4fd09a9bc
-DIST gcc-4.3.3-patches-1.2.tar.bz2 78206 RMD160 4860b3947d93f7d678ba60d6c66ac85196ef58d5 SHA1 80e0bae4da426db164a434bbbb21f1bded1084dc SHA256 7bdd062b969fab934d4aff3f1e7cdd06d60d8bddd1ab25d2fe617e41df3aa51a
-DIST gcc-4.3.3-piepatches-v10.1.5.tar.bz2 6036 RMD160 c5e44d583cfc9328fcc0c5ab4026393c28fdba3f SHA1 ff2e9fd4f238523d19806a05f84f1aa5a4c2149b SHA256 7e7a799f9066ab5948ea7ac73b0cb75c91bfa9231bf618bdc0e132e40d6d88d5
-DIST gcc-4.3.3-specs-0.9.4.tar.bz2 1515 RMD160 3a94bf49e628b1714b93f471c363bf0e4ae5d9cd SHA1 e46cd31b4f020d2c6eba748217a921d2678e64b5 SHA256 1cfade221d3873e34bb4719297f0eb811e712d7f095a85dc9e2508e53ffe1cec
-DIST gcc-4.3.3-uclibc-patches-1.1.tar.bz2 2294 RMD160 977c1733242e65c9705fe5e7c7cc92fc87d17c46 SHA1 6aa6bd21b5e7905bf39f3ff5bf3b606527cf7295 SHA256 a15737077039384932138a7c5f209e9a171ad756618a4ea078062816f028a77b
-DIST gcc-4.3.3.tar.bz2 59369954 RMD160 8c20a52633df659cabd66925d8a105a7a1479820 SHA1 e378b7a0cb0f7dbf6436f4efb5756e29a90fdc1c SHA256 309f614a3c7fee88edc4928ff17185a19533949a1642ccf776e87d86303704de
-DIST gcc-4.4.3-patches-1.4.tar.bz2 16294 RMD160 7db83ecabc5adbda8d1ad3af7a742fdeff0e964d SHA1 79eb6d1d71098f3c3a282443a2d854234c82d623 SHA256 aaf3f678982e6e4570afab5acb56408a788cb2a78558011159009000b1c96906
-DIST gcc-4.4.3-piepatches-v0.4.5.tar.bz2 16946 RMD160 a0df02c15ab5436cb270f1b41227b5722dcfcc53 SHA1 355d1fa866e7bde03191d0416b3524696e0c98c6 SHA256 ac853b06d4189dfba1bf72c8565d9ebf893b83cb690377db947cf5a48c802dc4
-DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 RMD160 0a013f95029a170eeea3cb6ccbfd65f64b66f465 SHA1 61bd3c13400772ec4d5d4fcee297e3d86adbd065 SHA256 f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2
-DIST gcc-4.4.3-uclibc-patches-1.0.tar.bz2 3014 RMD160 4646449073c54a43f1b72382ab3c611789e6cb59 SHA1 7bb2d5ae871f1bbed51198c274518d2c8bc06689 SHA256 4b44eb274f27cc8ffb0e61e90d829a7a87fd0b49df6f31e7cb3071cc96c00df1
-DIST gcc-4.4.3.tar.bz2 62944934 RMD160 b51afac3cb77ee3dc09d29c2f85936482ed82ab2 SHA1 619766282734728539ce58a5c383cb371f1999c7 SHA256 97ed664694b02b4d58ac2cafe443d02a388f9cb3645e7778843b5086a5fec040
-DIST gcc-4.4.5-patches-1.3.tar.bz2 27365 RMD160 e7cf9267489ef3d40c87ab86bcb0692b71fae587 SHA1 ad4de529e819c12fdf60de571fe1bee9a91c1843 SHA256 76aff36faab022c98458cf6ca08edaaae6319e7cbddad3debc06c794aec71f5b
-DIST gcc-4.4.5-piepatches-v0.4.5.tar.bz2 17600 RMD160 95bfd3d25a4444e9c0bcf98532705d9d8fd6942a SHA1 d3d6d01fc244ecd8a008fdddd05f540c1dba2c3b SHA256 aaa62f69aa8a33d62524261f28377709191a6d819b6018fb2acfb6b660587742
-DIST gcc-4.4.5-uclibc-patches-1.0.tar.bz2 3005 RMD160 173924eea155bbb69a6a9d6e466263a7b053cd13 SHA1 f838571582c65003752fd969a9bcf9a6b1f85531 SHA256 798fbe022c03756d71b775dc4c4135807d15fc1915c53f28c8e2eee6f4546e3e
-DIST gcc-4.4.5.tar.bz2 63081552 RMD160 87d6fa77d50f23a3359e24bf5b0ddfafa7088478 SHA1 2b1427a932a620c909d74f1e4821ed90c90fd350 SHA256 a945eb6cf694a55f83af904f4a3fb41ee07b9d021826dfe66991dfa7f0ea97ce
-DIST gcc-4.6.2-patches-1.1.tar.bz2 12793 RMD160 aecd6190b2c6fa53ff73f95a201e12c55d3f9cb8 SHA1 6cfc40dbfb6cd3809a0f4f556ae81d9cfc10f7f9 SHA256 f90feabeb57dd21050e1357c769e85eb691b2868830b9c076462687533820800
-DIST gcc-4.6.2-patches-1.4.tar.bz2 81415 RMD160 12d0c1090500c75691b51820f0e9bb5e679f3fdd SHA1 3709462b9392dd18d9f9d7ad047234e6c531cfa8 SHA256 3482338982829b5e4f6e3787f54f330ac44f5fda56790ed186ae26f10e082142
-DIST gcc-4.6.2-piepatches-v0.4.5.tar.bz2 14167 RMD160 64123a9ff8b3797c2acd01c63574c38e0cad683d SHA1 de6528ddd27b96d9255d31c5841fcf22bd7830ee SHA256 2ba43e31fbf7c05839774b6e9eb1b63fc228183d6c2464c54edd068dd3d2cea5
-DIST gcc-4.6.2-piepatches-v0.5.0.tar.bz2 14397 RMD160 77bd51e94cf71b9582f0a1e9f01dec1a9c6eea68 SHA1 03fd5104eeef7f6e12b0cd86732593d082643ba7 SHA256 19bf8797bb9a999c3396613e28b0fda3bad80a0815ab30ea08bc1c98a8a51b71
-DIST gcc-4.6.2-uclibc-patches-1.0.tar.bz2 3019 RMD160 7e991775c15d4126bd8d85aceb677c675559606f SHA1 0d316aaf94966cc52b1582282723a932ac065639 SHA256 25e902a6d2db7181394df5ad11fafaad064bf28a6ffebd889033f744613ac201
-DIST gcc-4.6.2.tar.bz2 71995338 RMD160 e7041933b39629f9524848dcf81a1a4c02a225c6 SHA1 691974613b1c1f15ed0182ec539fa54a12dd6f93 SHA256 60b05463dfe18d40d68fb8a71b25b408a01f86cc6ceaf5e6b22238b6b0f450c2
-DIST gdc-0.24-src.tar.bz2 1012099 RMD160 f0f33cc02d88ea1174030988c2006cb90029392a SHA1 2be913fe061429c1a279e4cf882e947d34946303 SHA256 cc6a97c76c9e6db31e76ff97014d24b3d43e21f018a3c6218e3fb2a4500fc79a
+DIST ecj-4.3.jar 1377431 SHA256 9de193ea393ed50d868b730bad6916f7a8ef4ba80216f8606d3e1a0dd886e74b
+DIST ecj-4.5.jar 1470676 SHA256 98fd128f1d374d9e42fd9d4836bdd249c6d511ebc6c0df17fbc1b9df96c3d781
+DIST gcc-4.1.2-patches-1.3.tar.bz2 50790 SHA256 5fbb55d7f7cc136404d7c9375c3912acdcd49588b1d79f21e358efbc303665a3
+DIST gcc-4.1.2-uclibc-patches-1.0.tar.bz2 20980 SHA256 c6ed88711a727ed11847c9b9f1cef7023037bc80c0840eda5fca6d60fa02e35a
+DIST gcc-4.1.2.tar.bz2 39707720 SHA256 cfc0efbcc6fcde0d416a32dfb246c9df022515a312683fac412578c4fd09a9bc
+DIST gcc-4.3.3-patches-1.2.tar.bz2 78206 SHA256 7bdd062b969fab934d4aff3f1e7cdd06d60d8bddd1ab25d2fe617e41df3aa51a
+DIST gcc-4.3.3-piepatches-v10.1.5.tar.bz2 6036 SHA256 7e7a799f9066ab5948ea7ac73b0cb75c91bfa9231bf618bdc0e132e40d6d88d5
+DIST gcc-4.3.3-specs-0.9.4.tar.bz2 1515 SHA256 1cfade221d3873e34bb4719297f0eb811e712d7f095a85dc9e2508e53ffe1cec
+DIST gcc-4.3.3-uclibc-patches-1.1.tar.bz2 2294 SHA256 a15737077039384932138a7c5f209e9a171ad756618a4ea078062816f028a77b
+DIST gcc-4.3.3.tar.bz2 59369954 SHA256 309f614a3c7fee88edc4928ff17185a19533949a1642ccf776e87d86303704de
+DIST gcc-4.4.3-patches-1.4.tar.bz2 16294 SHA256 aaf3f678982e6e4570afab5acb56408a788cb2a78558011159009000b1c96906
+DIST gcc-4.4.3-piepatches-v0.4.5.tar.bz2 16946 SHA256 ac853b06d4189dfba1bf72c8565d9ebf893b83cb690377db947cf5a48c802dc4
+DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 SHA256 f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 SHA512 779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517 WHIRLPOOL 8a1e45aad9d306cb19de93c63b5854a97e629d90852feb6861dcfca042b6257705304fc13ad65655a4cb227d36b83fc6063648c94f270821574ee0e85307094e
+DIST gcc-4.4.3-uclibc-patches-1.0.tar.bz2 3014 SHA256 4b44eb274f27cc8ffb0e61e90d829a7a87fd0b49df6f31e7cb3071cc96c00df1
+DIST gcc-4.4.3.tar.bz2 62944934 SHA256 97ed664694b02b4d58ac2cafe443d02a388f9cb3645e7778843b5086a5fec040
+DIST gcc-4.4.5-patches-1.3.tar.bz2 27365 SHA256 76aff36faab022c98458cf6ca08edaaae6319e7cbddad3debc06c794aec71f5b SHA512 6e4b3e333b0ea74851252316ba12e6a002d50f8b839edbb46d466bfa3eab0d3077dc0035c28ad3928b3433ecf8635c95f6eb4a3e9ce38cb8f9044551d19ab4fa WHIRLPOOL 16a70951d140cc79e5a8ede0da3e8ac8f8835dac69e764d3b322c7de16803726e337a8318cc910a81731d793c3eb010269fefe3ce809c5f281222a8268a95bc8
+DIST gcc-4.4.5-piepatches-v0.4.5.tar.bz2 17600 SHA256 aaa62f69aa8a33d62524261f28377709191a6d819b6018fb2acfb6b660587742 SHA512 fafe66c3e6ee471309266f1750c2cdf8ae41c778f64256d0d65d6a9a064eeac494f9d4261233302f69ca16ced175720b4fadb49bdf8d3596a8c8a34fba3d0395 WHIRLPOOL 79a324fce336f5e20f411a93a9abf0faad410eb3e1940dfcfe3d9897228ff5f151a5967744d20cf57153c7a6c0d8f07b484a87167e70017da66cdc22e5b21ac7
+DIST gcc-4.4.5-uclibc-patches-1.0.tar.bz2 3005 SHA256 798fbe022c03756d71b775dc4c4135807d15fc1915c53f28c8e2eee6f4546e3e SHA512 be765892df083bbc1355464cfcf0bf5d61646445231a4da59a2bf88ba4c687031818386e4a06db289500630d3f75662818f60ff93e42cf2ff65a381d443277f0 WHIRLPOOL cb41be728f2d9896ddb119ff7adddb5535cd87383ecc85c57f6fdda3895526aaf25bb62314ceac50a1db79caa61d7d34353ea616181a222bda2ed828f5c48ddc
+DIST gcc-4.4.5.tar.bz2 63081552 SHA256 a945eb6cf694a55f83af904f4a3fb41ee07b9d021826dfe66991dfa7f0ea97ce SHA512 d98ed79b13b58dc2e83d988514bd9a4dfe0dd4c8538efdfbaf0ec1f58c0aa990c39f97699f43b32d09f6022aacda2552e226c82de8c7b816a15708537f32662e WHIRLPOOL 6a7307fe034b16643fe333ee6e2bac228a44e8872d2c66a7aef9bc58b852fd107ba86df257528878a40eea86a6bda487f86ab5d62cd4e43443c76f174189dfb5
+DIST gcc-4.6.2-patches-1.1.tar.bz2 12793 SHA256 f90feabeb57dd21050e1357c769e85eb691b2868830b9c076462687533820800
+DIST gcc-4.6.2-patches-1.4.tar.bz2 81415 SHA256 3482338982829b5e4f6e3787f54f330ac44f5fda56790ed186ae26f10e082142 SHA512 5289116441ab1002f1dc0e57b9a99933082d1f2680ba123815b9863804cbbd89eff99ccef7572da738955437c222f81448e0ac32cb36ed74b99e5fede5fd06dc WHIRLPOOL fa0da31eff0dc0170e559ed7c4ab1db34de62482fa02496e7921283a4e398c1b9d97c72cc4733309ee01a3902bb859ea2e26a0b29ffa04e0d95b245770160472
+DIST gcc-4.6.2-piepatches-v0.4.5.tar.bz2 14167 SHA256 2ba43e31fbf7c05839774b6e9eb1b63fc228183d6c2464c54edd068dd3d2cea5
+DIST gcc-4.6.2-piepatches-v0.5.0.tar.bz2 14397 SHA256 19bf8797bb9a999c3396613e28b0fda3bad80a0815ab30ea08bc1c98a8a51b71 SHA512 5f91c05ff3519200f4f55a7adabb805f54209d80515111ac8727c1700f06c1a36f79b2e3d8eecadfbd5a4fe58d75311988635e4b474a920cefab8a24ffb0cf59 WHIRLPOOL ee80c656a312a1c1f2fd0d5ff287559e115a9bdf1c2ee4a6266389f478b4c274ad2b5ff8b558eee71a75c6e0141fc053c0d04336742c7f14102c0d2436480893
+DIST gcc-4.6.2-uclibc-patches-1.0.tar.bz2 3019 SHA256 25e902a6d2db7181394df5ad11fafaad064bf28a6ffebd889033f744613ac201 SHA512 b02ce4bd972e80923182b86ff77d9a37b7733985501a9c6f1889d4c77cd0d240ba984d4bd902ba13502fe158b891d313360812f4076044ab58539f2e29930e0e WHIRLPOOL 950bab1bd47d4bf533a618637917449f50d6f9b9bef1b51a9a22248f7d11c1af411d226d57d856ce7736d6d6516345e82ce0fadca18eee68572e1a3af11e4c8b
+DIST gcc-4.6.2.tar.bz2 71995338 SHA256 60b05463dfe18d40d68fb8a71b25b408a01f86cc6ceaf5e6b22238b6b0f450c2 SHA512 51bd123b71b6e4ee4e4b9689a93d328332ea129692f6af2473efdcaedc897a130e4c1948820b3543846d89bb2dd5427b236d2a5d5a6cfa371ba086577f9c0e62 WHIRLPOOL eca8104dbaad1d9682425dd142cbebf3a62a730a1e3d99317f1bd082fb5c0c7fbd0522b3b14f75349618897173fcba79eb82d53718ec8e156bda56f78d1531dd
+DIST gcc-4.6.3-patches-1.6.tar.bz2 17072 SHA256 9ea15c9e289de83954ee5c2ae374a7a5746d31bfc413059b96b8e6e2ccf0cfe4 SHA512 47bc8f2ff384af16a6a92fca05cc8a991833195143f365a911cba4433ab19cf74c256ba90b734e48f875c51471d9bd76d5336aa2b64d965c3142aa78993bf224 WHIRLPOOL df4ca15d8f0a119320bd89cc777605a7e3e910d5389ac610b0748ebbb1b0d6e6de4763a63a84abab5547527e0a631a8ecddd9f6d35317fc89700593275418fc1
+DIST gcc-4.6.3-piepatches-v0.5.2.tar.bz2 15002 SHA256 6606d47a8bbaa9cba0dd3b022cbf6ed14325b8560dd17f7601dbaa4697df3691 SHA512 21ec5bcd43ec0075f8885ef6f567fd9ffd0a64f4c4f9340262900b91a8f22f73a22cd320d6c5a9211083a0a4d21f61ff42e4d9368b5768b395d6ec1b17fc47eb WHIRLPOOL f38666e7c47d9e10b96a22b85c90659800ecfa86d7cf9d5ff69385dc5584fc6ea4b90265ec62d8066adab63a647c1a4bd0f0d1cc69057fcc08c4aa6856cd5766
+DIST gcc-4.6.3-uclibc-patches-1.0.tar.bz2 3023 SHA256 4219a3582c5f98bf8437bfc3feb8c264f8aabd8078caaddef46dd38be33f089f SHA512 e0763dc7f3f94cb9ba6e34233d1a2fa6913918a5100dd029ae76b3b086529b8fafae3086dc22f3294f7d378e5548294264cb2faa80866e8a1ecc666bf60fe010 WHIRLPOOL 1744810d5928b1869929ebd608e1d817e4bcb4f666647bc873e9bdb41c65833a40745e58de5ef4beb98ef4ac539c8560733100a3bbee280c76525ee518ae88c8
+DIST gcc-4.6.3.tar.bz2 71999439 SHA256 e8f5853d4eec2f5ebaf8a72ae4d53c436aacf98153b2499f8635b48c4718a093 SHA512 efedecc1a6d1c36eb91cbecfae9a4414d01051e99965de8a284d1164df3cad13fa99a6dd5a4ceaa03ef63a66884eaf729b49d602ac82088f788bab045ce1eb26 WHIRLPOOL a50059cc5ec5bcf7c7d7108e38087c2168ff0c6817d06b709be901a87007f84cd231ebae0752cdc94fa99c93ecd30ba810d3213aba9f3639292b1e831818ec0c
+DIST gdc-0.24-src.tar.bz2 1012099 SHA256 cc6a97c76c9e6db31e76ff97014d24b3d43e21f018a3c6218e3fb2a4500fc79a
57 sys-devel/gcc/gcc-4.6.3.ebuild
View
@@ -0,0 +1,57 @@
+# Distributed under the terms of the GNU General Public License v2
+
+PATCH_VER="1.6"
+UCLIBC_VER="1.0"
+
+# Hardened gcc 4 stuff
+PIE_VER="0.5.2"
+SPECS_VER="0.2.0"
+SPECS_GCC_VER="4.4.3"
+# arch/libc configurations known to be stable with {PIE,SSP}-by-default
+PIE_GLIBC_STABLE="x86 amd64 mips ppc ppc64 arm ia64"
+PIE_UCLIBC_STABLE="x86 arm amd64 ppc ppc64"
+SSP_STABLE="amd64 x86 mips ppc ppc64 arm"
+# uclibc need tls and nptl support for SSP support
+# uclibc need to be >= 0.9.32
+SSP_UCLIBC_STABLE="x86 amd64 ppc ppc64 arm"
+#end Hardened stuff
+
+inherit toolchain
+
+DESCRIPTION="The GNU Compiler Collection"
+
+LICENSE="GPL-3 LGPL-3 || ( GPL-3 libgcc libstdc++ gcc-runtime-library-exception-3.1 ) FDL-1.2"
+KEYWORDS="~*"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ elibc_glibc? ( >=sys-libs/glibc-2.8 )
+ amd64? ( multilib? ( gcj? ( app-emulation/emul-linux-x86-xlibs ) ) )
+ >=${CATEGORY}/binutils-2.18"
+
+if [[ ${CATEGORY} != cross-* ]] ; then
+ PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )"
+fi
+
+src_unpack() {
+ if has_version '<sys-libs/glibc-2.12' ; then
+ ewarn "Your host glibc is too old; disabling automatic fortify."
+ ewarn "Please rebuild gcc after upgrading to >=glibc-2.12 #362315"
+ EPATCH_EXCLUDE+=" 10_all_default-fortify-source.patch"
+ fi
+
+ toolchain_src_unpack
+
+ use vanilla && return 0
+
+ [[ ${CHOST} == ${CTARGET} ]] && epatch "${FILESDIR}"/gcc-spec-env.patch
+}
+
+pkg_setup() {
+ toolchain_pkg_setup
+
+ ewarn
+ ewarn "LTO support is still experimental and unstable."
+ ewarn "Any bugs resulting from the use of LTO will not be fixed."
+ ewarn
+}
2  sys-kernel/linux-headers/Manifest
View
@@ -3,8 +3,10 @@ DIST gentoo-headers-2.6.39-1.tar.xz 3216 RMD160 27feab992d4f845acd5f6fc880b37ae9
DIST gentoo-headers-3.1-2.tar.xz 3656 RMD160 f219313ee3004826cfa2e93a6d9c2a13c4c9ea7a SHA1 0708051dba8d1ea8dc91d507f63e7515e1f246bd SHA256 ee30fed6c594ff56309aa7cad018419e8c8cde8b2ba85332ba7473d967ebe972
DIST gentoo-headers-3.2-3.tar.xz 3972 RMD160 dcdf45de828ef98bd6ab3a2803857d530e657fb2 SHA1 0951087e798c9e426b2746d1f641456db3c1036f SHA256 f3c676a71429ae9309637790651cabee9c190915b3b15462abca35971e0d8822
DIST gentoo-headers-3.3-2.tar.xz 34172 RMD160 eb8e3ceb89a4194a3587e1475b674fec76fd975d SHA1 5d9d0b595014d950e1e4e842ff966f150c9a4e7c SHA256 4b50911d5d53c7cdcfe07e6721015d0abe5fe2859117410b399d657ea41f3e36
+DIST gentoo-headers-3.4-3.tar.xz 4332 RMD160 7e55952ba0fe70e91ff14060d82ae611fb69dc72 SHA1 b00c4fc56830bb682001ffe2c2729c80cb470ae2 SHA256 a5413ed53ebe3489f7e35503edacb44c583726890ee123a60ac011a22d02460c
DIST gentoo-headers-base-2.6.32.tar.lzma 4181482 RMD160 09067823af4cd65c9f48b514dd12037f4b5b33ed SHA1 be17b0679ad248e87f8bbb4d3a37aefaf6c146a7 SHA256 ae1b8bc31770aeff999ec36d4f28eb96df4191a14c0d384bbcbe569fc2e3d620
DIST gentoo-headers-base-2.6.39.tar.xz 4689080 RMD160 2e0cce267e9e2228380c2ac4ca5d8a5471a2327f SHA1 5c52cf4632c2d125912e2334cf35f1d70b15e514 SHA256 ac7d11395bfe196e4da08e009d1b81494f1c4c1b4f08f5be7b002ed1c6669105
DIST gentoo-headers-base-3.1.tar.xz 4814816 RMD160 372a0e0fa6dbbc36b91143a1ffc03f843aadff7f SHA1 e0bce0b14ac331f9737c2e4bb61c48fb6ea5f941 SHA256 76bc4baeb1d039a171f6316d3ac6b8f50341937242570988d6705b2d9b02a0c0
DIST gentoo-headers-base-3.2.tar.xz 4912432 RMD160 1ad9eff0b9ec9d1eb63b2914521d2512f2ddd88c SHA1 7c74ca48de98c0da1ba44224cff36a598230eb8f SHA256 b22faf6f9c64047c29b5d5d8787dce253df99dd2fd29e69c4de491ab002a6675
DIST gentoo-headers-base-3.3.tar.xz 5065432 RMD160 6b2c02a09a406cb366199562d6fcf3203e867a53 SHA1 d3f019fd385531a909406cfa36df27f45d9121ef SHA256 bddc280496d8709039c02cee50dc14106ac6ea6bfafe99abec9f9470b19582ea
+DIST gentoo-headers-base-3.4.tar.xz 5115932 RMD160 886e46aa92181d5804e0117f8bb0a80b3f7ba42c SHA1 63c181ae4139bcf1ce5d5de7981dba4c4a6fdc39 SHA256 c1aceea837dc6c05c869f41897e393cc14ef4b8b3e77440b40ae1684360fc154
50 sys-kernel/linux-headers/linux-headers-3.4-r2.ebuild
View
@@ -0,0 +1,50 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="3"
+
+ETYPE="headers"
+H_SUPPORTEDARCH="alpha amd64 arm bfin cris hppa m68k mips ia64 ppc ppc64 s390 sh sparc x86"
+inherit kernel-2
+detect_version
+
+PATCH_VER="3"
+SRC_URI="mirror://gentoo/gentoo-headers-base-${PV}.tar.xz
+ ${PATCH_VER:+mirror://gentoo/gentoo-headers-${PV}-${PATCH_VER}.tar.xz}"
+
+KEYWORDS="~*"
+
+DEPEND="app-arch/xz-utils
+ dev-lang/perl"
+RDEPEND=""
+
+S=${WORKDIR}/gentoo-headers-base-${PV}
+
+src_unpack() {
+ unpack ${A}
+}
+
+src_prepare() {
+ [[ -n ${PATCH_VER} ]] && EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/${PV}
+}
+
+src_install() {
+ kernel-2_src_install
+ cd "${D}"
+ egrep -r \
+ -e '(^|[[:space:](])(asm|volatile|inline)[[:space:](]' \
+ -e '\<([us](8|16|32|64))\>' \
+ .
+ headers___fix $(find -type f)
+
+ egrep -l -r -e '__[us](8|16|32|64)' "${D}" | xargs grep -L linux/types.h
+
+ # hrm, build system sucks
+ find "${D}" '(' -name '.install' -o -name '*.cmd' ')' -print0 | xargs -0 rm -f
+
+ # provided by libdrm (for now?)
+ rm -rf "${D}"/$(kernel_header_destdir)/drm
+}
+
+src_test() {
+ emake ARCH=$(tc-arch-kernel) headers_check || die
+}
27 sys-libs/glibc/Manifest
View
@@ -1,12 +1,15 @@
-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
-DIST glibc-2.11.2-patches-6.tar.bz2 117116 RMD160 5e2dda6ddd8620af9513aae1033595ebd149c8f9 SHA1 b0f4b73a49d1117649acd74523bb5358e54cbf5e SHA256 490b81357fc43f2d23a050ed39440363b223c1e3f34e77b4596b981680fd9f23
-DIST glibc-2.11.2.tar.bz2 15675392 RMD160 15d14fb6b0b58ec3fb7781efa2f8a558fcb99a7e SHA1 23b477f4816a97e007be1e98abc1ffe2af13ba9e SHA256 c2ac76ee363eed31b2a377489fb2818139f4668b5505ad583009eb9b0e228713
-DIST glibc-2.11.3-patches-2.tar.bz2 110859 RMD160 82150c671e19df102cf4cf92f5ff914e6328c064 SHA1 e371d86437839227c5927cf8c13730aeb893f75b SHA256 4dabab8bbe0acf80bac483105ef17f0968be30bb67579a5225e1bab590948d29
-DIST glibc-2.11.3.tar.bz2 15667797 RMD160 a5cc802ddff6c2e96f63a9dacbb429d0e9114e2d SHA1 2685601493829b0399578c87add614786b98c30b SHA256 9c10538262c13018910721b8160e6caf65ba38ca2750c5710bd220e44d696afa
-DIST glibc-2.13-patches-8.tar.bz2 114419 RMD160 6f3f1542184d9765b38f599297514e36b11694ad SHA1 73887ad82a102a7fde091e54c7284b8ce2dfcf0c SHA256 536d06763d87ac8b43517df34bcf8f0cfb9263eec8dbd2f2d6cc0a510f7b03b2
-DIST glibc-2.13.tar.bz2 15725729 RMD160 cf34e4a06a2602deed709e2ee10cf7446a824989 SHA1 14d83dced873a21a3da6a0bfa0926f40d82ef980 SHA256 0173c92a0545e6d99a46a4fbed2da00ba26556f5c6198e2f9f1631ed5318dbb2
-DIST glibc-libidn-2.10.1.tar.bz2 102248 RMD160 0fbb3ecc09f59f0b9e90e0669bd9cd6075164173 SHA1 50c1ac0d9ddff6eb83f75aa1c4cb84ba6fffa0cd SHA256 0fa72d1dd06a30642d3bb20a659f4ed0f4af54a205d7102896b68169b38676dc
-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.13.tar.bz2 625945 RMD160 676406e35c8e4fdceb4fcfa83bfbdb1ef3a3aa6a SHA1 1cc771b4bf80f4b0872a342763f4aa4a9a9292cd SHA256 b11c4501ae929883447f409c31d65e82822b1c5693075a825a3d54612876ee5a
+DIST glibc-2.10.1-patches-6.tar.bz2 113352 SHA256 36a838d5be4fb96f0471d288f172443df28867c301e7790667e1cb57615e6c04
+DIST glibc-2.10.1.tar.bz2 16106243 SHA256 cbad3e637eab613184405a87a2bf08a41991a0e512a3ced60d120effc73de667
+DIST glibc-2.11.2-patches-6.tar.bz2 117116 SHA256 490b81357fc43f2d23a050ed39440363b223c1e3f34e77b4596b981680fd9f23
+DIST glibc-2.11.2.tar.bz2 15675392 SHA256 c2ac76ee363eed31b2a377489fb2818139f4668b5505ad583009eb9b0e228713
+DIST glibc-2.11.3-patches-2.tar.bz2 110859 SHA256 4dabab8bbe0acf80bac483105ef17f0968be30bb67579a5225e1bab590948d29
+DIST glibc-2.11.3.tar.bz2 15667797 SHA256 9c10538262c13018910721b8160e6caf65ba38ca2750c5710bd220e44d696afa
+DIST glibc-2.13-patches-8.tar.bz2 114419 SHA256 536d06763d87ac8b43517df34bcf8f0cfb9263eec8dbd2f2d6cc0a510f7b03b2 SHA512 8d42f5882ad4a6650a387e0aefdd9e53d66d7040ffbcd8bbd0995b6b3ee9c9099a5e287d872bbe7f4b42c08e618be341b21da0c3f800454d4a6ef34fbb41ec8f WHIRLPOOL 1c8e2b6cf59ef03be4ab8a7c3f42d5451857e7187616778230449e725757de4f3b5c864883b5afb4eab457fc844f5af6eb5183ab035b966abd371b26feae8abe
+DIST glibc-2.13.tar.bz2 15725729 SHA256 0173c92a0545e6d99a46a4fbed2da00ba26556f5c6198e2f9f1631ed5318dbb2 SHA512 7fdae9acdbe8cbfda008f107ffd1559c0163ff70730a5bc618f1f15b64096a813a3495e0b2d2be7b7206bef3ed9ca67a68fd2004c8275ffeffa38b70c80887e0 WHIRLPOOL cfaeb0831f177926610d2c89bd6bd20735107ac4738ee0485a2d2e14b13c986e68e64c8f9093b89f135c3d7eb94fc2230b9f3837f3841a8bc2bc886ff5415005
+DIST glibc-2.15-patches-21.tar.bz2 110297 SHA256 5553c0a37c5c0a3abb303850fa9d2ad309e2f47c3f42806c2f1dd32a48affbfe SHA512 5255ef053a2c30f9cae583133094f41604385b9d6e653a0d6aab1d13d69e6c8cbf16fde712607ab0bac738944a0410ddc050dc231ad4ea7d3584271937b0b059 WHIRLPOOL d70249c6c3c3c0a4d02c3ebbf0309bd6b3da3962231c153c77be38d217e2f57e0eba88614e34f0f219f485ba8f8474586d0059cfc505e44f312396e6a753d441
+DIST glibc-2.15.tar.xz 10280176 SHA256 321ec482abdc27b03244f7b345ee22dc431bc55daf9c000a4e7b040fbdbecb50 SHA512 fc8bc407cd9edfd79bd286d28c84e0b8224e1f57c1d318e73da098a9693257d78970178fd59f487f0321a079fcb772e8e78473fab52f091b2addb0a48fe8dcf7 WHIRLPOOL 061fc0c9915bd821dc31c2fea8e4f9a75b6c7ec0c935ea713d8c087408a8bf3c600179273438f3d9748fe40b946866b2f160e6da6fee4da51e549a30d0f0ebbc
+DIST glibc-libidn-2.10.1.tar.bz2 102248 SHA256 0fa72d1dd06a30642d3bb20a659f4ed0f4af54a205d7102896b68169b38676dc
+DIST glibc-ports-2.10.1.tar.bz2 584860 SHA256 b1f1ec9720036a3a33598b8478eef102535444a083d5b5813a6981ed74ab4071
+DIST glibc-ports-2.11.tar.bz2 599606 SHA256 38d212b1a22ed121c97f2827e7357e3e077084635ebc197246993d328b1b6589
+DIST glibc-ports-2.13.tar.bz2 625945 SHA256 b11c4501ae929883447f409c31d65e82822b1c5693075a825a3d54612876ee5a SHA512 39ed578db363dab05e54d5272d3a8a0600493b91985c65a4d043b5a88d617ff46cca2d66d99ae69e92282d8f8a2357e79dcd5b0ae45b505497417d5137866ad6 WHIRLPOOL 766309e315f2f7edbe0b431691ea16f9917dd2f1c8d54b707e819b695f26dedac2d60c3a58499ee1b51a218b982e9930e49f79db096e166576c215a6ccac21e5
+DIST glibc-ports-2.15.tar.xz 421820 SHA256 fcc271fcc3a808bf0f3aa1d144bc39b8d0d5f730aed6e206b883961515f0d1b9 SHA512 fc3c80a9a7ede0f35054e5be043fff4b967e6ef6678f42e617dd1dd498920edb4e4c785cf8e3cd97fc2914a35a892e0fd7e1aab24f0c3c8d207765a131bf3744 WHIRLPOOL a8a617eacb326615265832f86a7ef39678364b5b65d5c16d58680ec0debfbca6780018b7da9c1a86bdfffcde58aa1258b96ea4bd50b114901b522e62d48ae4a5
290 sys-libs/glibc/files/eblits-2.15/common.eblit
View
@@ -0,0 +1,290 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.27 2012/06/19 22:06:23 vapier Exp $
+
+alt_prefix() {
+ is_crosscompile && echo /usr/${CTARGET}
+}
+
+# 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() {
+ echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
+}
+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() {
+ echo $(alt_prefix)/$(get_libdir)
+}
+alt_usrlibdir() {
+ echo $(alt_prefix)/usr/$(get_libdir)
+}
+
+setup_target_flags() {
+ # This largely mucks with compiler flags. None of which should matter
+ # when building up just the headers.
+ just_headers && return 0
+
+ case $(tc-arch) in
+ x86)
+ # -march needed for #185404 #199334
+ if ! glibc_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
+ filter-flags '-march=*'
+ export CFLAGS="-march=${t} ${CFLAGS}"
+ einfo "Auto adding -march=${t} to CFLAGS #185404"
+ fi
+ ;;
+ amd64)
+ # -march needed for #185404 #199334
+ if ! glibc_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
+ filter-flags '-march=*'
+ # ugly, ugly, ugly. ugly.
+ CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}")
+ export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
+ einfo "Auto adding -march=${t} to CFLAGS_x86 #185404"
+ fi
+ ;;
+ 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"
+
+ GLIBCMAJOR=$(get_version_component_range 1 ${PV})
+ GLIBCMINOR=$(get_version_component_range 2 ${PV})
+
+ # set CTARGET_OPT so glibc can use cpu-specific .S files for better performance
+ # - UltraSPARC T1 (niagara) support requires >= glibc 2.8
+ # - UltraSPARC T2 (niagara2) support requires >= glibc 2.7
+
+ if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
+ case ${ABI}:${CTARGET} in
+ sparc64:*|\
+ default:sparc64*)
+ filter-flags -Wa,-xarch -Wa,-A
+
+ if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then
+ CTARGET_OPT="sparc64v2-unknown-linux-gnu"
+ append-flags "-Wa,-xarch=v9b"
+ export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
+ elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then
+ CTARGET_OPT="sparc64v-unknown-linux-gnu"
+ append-flags "-Wa,-xarch=v9b"
+ export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b"
+ elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; 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-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then
+ CTARGET_OPT="sparcv9v2-unknown-linux-gnu"
+ elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then
+ CTARGET_OPT="sparcv9v-unknown-linux-gnu"
+ elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then
+ CTARGET_OPT="sparcv9b-unknown-linux-gnu"
+ else
+ CTARGET_OPT="sparcv9-unknown-linux-gnu"
+ fi
+ ;;
+ esac
+ else
+ if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then
+ CTARGET_OPT="sparcv9v2-unknown-linux-gnu"
+ elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then
+ CTARGET_OPT="sparcv9v-unknown-linux-gnu"
+ elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then
+ CTARGET_OPT="sparcv9b-unknown-linux-gnu"
+ elif { is_crosscompile && want_nptl; } || is-flagq "-mcpu=ultrasparc2" || is-flagq "-mcpu=ultrasparc"; then
+ CTARGET_OPT="sparcv9-unknown-linux-gnu"
+ fi
+ fi
+ ;;
+ esac
+}
+
+setup_flags() {
+ # Make sure host make.conf doesn't pollute us
+ if is_crosscompile || tc-is-cross-compiler ; then
+ CHOST=${CTARGET} strip-unsupported-flags
+ fi
+
+ # Store our CFLAGS because it's changed depending on which CTARGET
+ # we are building when pulling glibc on a multilib profile
+ CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
+ CFLAGS=${CFLAGS_BASE}
+ CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
+ CXXFLAGS=${CXXFLAGS_BASE}
+ ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
+ ASFLAGS=${ASFLAGS_BASE}
+
+ # Over-zealous CFLAGS can often cause problems. What may work for one
+ # person may not work for another. To avoid a large influx of bugs
+ # relating to failed builds, we strip most CFLAGS out to ensure as few
+ # problems as possible.
+ strip-flags
+ strip-unsupported-flags
+ filter-flags -m32 -m64 -mabi=*
+
+ unset CBUILD_OPT CTARGET_OPT
+ if has_multilib_profile ; then
+ CTARGET_OPT=$(get_abi_CTARGET)
+ [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
+ fi
+
+ setup_target_flags
+
+ if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
+ CBUILD_OPT=${CTARGET_OPT}
+ fi
+
+ # Lock glibc at -O2 -- 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
+
+ # Cant build glibc itself with fortify code
+ append-cppflags -U_FORTIFY_SOURCE
+
+ # 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 #293721
+ use hardened && gcc-specs-ssp && append-cflags $(test-flags-CC -fno-stack-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
+}
+
+want_nptl() {
+ [[ -z ${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 ${LT_VER} ]] && return 1
+ use linuxthreads
+}
+
+want_tls() {
+ # Archs that can use TLS (Thread Local Storage)
+ case $(tc-arch) in
+ x86)
+ # requires i486 or better #106556
+ [[ ${CTARGET} == i[4567]86* ]] && return 0
+ return 1
+ ;;
+ esac
+
+ return 0
+}
+
+want__thread() {
+ want_tls || return 1
+
+ # For some reason --with-tls --with__thread is causing segfaults on sparc32.
+ [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
+
+ [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
+
+ # only test gcc -- cant test linking yet
+ tc-has-tls -c ${CTARGET}
+ WANT__THREAD=$?
+
+ return ${WANT__THREAD}
+}
+
+use_multiarch() {
+ # Make sure binutils is new enough to support indirect functions #336792
+ # This funky sed supports gold and bfd linkers.
+ local bver nver
+ bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}')
+ case $(tc-arch ${CTARGET}) in
+ amd64|x86) nver="2.20" ;;
+ sparc) nver="2.21" ;;
+ *) return 1 ;;
+ esac
+ version_is_at_least ${nver} ${bver}
+}
+
+# Setup toolchain variables that had historically
+# been defined in the profiles for these archs.
+setup_env() {
+ # silly users
+ unset LD_RUN_PATH
+
+ multilib_env ${CTARGET_OPT:-${CTARGET}}
+ if is_crosscompile || tc-is-cross-compiler ; then
+ 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}}
+
+ local VAR=CFLAGS_${ABI}
+ # We need to export CFLAGS with abi information in them because glibc's
+ # configure script checks CFLAGS for some targets (like mips). Keep
+ # around the original clean value to avoid appending multiple ABIs on
+ # top of each other.
+ : ${__GLIBC_CC:=$(tc-getCC ${CTARGET_OPT:-${CTARGET}})}
+ export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
+}
+
+just_headers() {
+ is_crosscompile && use crosscompile_opts_headers-only
+}
27 sys-libs/glibc/files/eblits-2.15/pkg_postinst.eblit
View
@@ -0,0 +1,27 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_postinst.eblit,v 1.2 2012/04/15 20:04:44 vapier Exp $
+
+eblit-glibc-pkg_postinst() {
+ # nothing to do if just installing headers
+ just_headers && return
+
+ if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then
+ # 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
+ locale-gen -j $(makeopts_jobs) --config "${locale_list}"
+ fi
+}
83 sys-libs/glibc/files/eblits-2.15/pkg_preinst.eblit
View
@@ -0,0 +1,83 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_preinst.eblit,v 1.4 2011/11/16 16:07:46 vapier Exp $
+
+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
+}
+
+eblit-glibc-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
+
+ # prepare /etc/ld.so.conf.d/ for files
+ mkdir -p "${ROOT}"/etc/ld.so.conf.d
+
+ # 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
+ # we enter ${D} so to avoid trouble if the path contains
+ # special characters; for instance if the path contains the
+ # colon character (:), then the linker will try to split it
+ # and look for the libraries in an unexpected place. This can
+ # lead to unsafe code execution if the generated prefix is
+ # within a world-writable directory
+ # (e.g. /var/tmp/portage:${HOSTNAME})
+ pushd "${D}"/$(get_libdir) 2>/dev/null
+ ./ld-*.so --library-path . ${x} > /dev/null \
+ || die "simple run test (${x}) failed"
+ popd 2>/dev/null
+ done
+}
122 sys-libs/glibc/files/eblits-2.15/pkg_setup.eblit
View
@@ -0,0 +1,122 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.10 2011/12/14 16:42:46 vapier Exp $
+
+glibc_compile_test() {
+ local ret save_cflags=${CFLAGS}
+ CFLAGS+=" $1"
+ shift
+
+ pushd "${T}" >/dev/null
+
+ rm -f glibc-test*
+ printf '%b' "$*" > glibc-test.c
+
+ emake -s glibc-test
+ ret=$?
+
+ popd >/dev/null
+
+ CFLAGS=${save_cflags}
+ return ${ret}
+}
+
+glibc_run_test() {
+ local ret
+
+ if [[ ${EMERGE_FROM} == "binary" ]] ; then
+ # ignore build failures when installing a binary package #324685
+ glibc_compile_test "" "$@" 2>/dev/null || return 0
+ else
+ if ! glibc_compile_test "" "$@" ; then
+ ewarn "Simple build failed ... assuming this is desired #324685"
+ return 0
+ fi
+ fi
+
+ pushd "${T}" >/dev/null
+
+ ./glibc-test
+ ret=$?
+ rm -f glibc-test*
+
+ popd >/dev/null
+
+ return ${ret}
+}
+
+eblit-glibc-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
+
+ if ! glibc_run_test '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n'
+ 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"
+ eerror "http://bugs.gentoo.org/262698"
+ die "keeping your system alive, say thank you"
+ fi
+
+ if ! glibc_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n'
+ then
+ eerror "Your old kernel is broken. You need to update it to"
+ eerror "a newer version as syscall(<bignum>) will break."
+ eerror "http://bugs.gentoo.org/279260"
+ 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 [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
+ ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
+ ewarn "This will result in a 50% performance penalty when running with a 32bit"
+ ewarn "hypervisor, which is probably not what you want."
+ fi
+
+ use hardened && ! gcc-specs-pie && \
+ ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
+
+ # Make sure host system is up to date #394453
+ if has_version '<sys-libs/glibc-2.13' && \
+ [[ -n $(scanelf -qys__guard -F'#s%F' "${ROOT}"/lib*/l*-*.so) ]]
+ then
+ ebegin "Scanning system for __guard to see if you need to rebuild first ..."
+ local files=$(
+ scanelf -qys__guard -F'#s%F' \
+ "${ROOT}"/*bin/ \
+ "${ROOT}"/lib* \
+ "${ROOT}"/usr/*bin/ \
+ "${ROOT}"/usr/lib* | \
+ egrep -v \
+ -e "^${ROOT}/lib.*/(libc|ld)-2.*.so$" \
+ -e "^${ROOT}/sbin/(ldconfig|sln)$"
+ )
+ [[ -z ${files} ]]
+ if ! eend $? ; then
+ eerror "Your system still has old SSP __guard symbols. You need to"
+ eerror "rebuild all the packages that provide these files first:"
+ eerror "${files}"
+ die "old __guard detected"
+ fi
+ fi
+}
222 sys-libs/glibc/files/eblits-2.15/src_compile.eblit
View
@@ -0,0 +1,222 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.28 2012/07/03 20:07:34 vapier Exp $
+
+glibc_do_configure() {
+ local myconf
+
+ einfo "Configuring GLIBC for $1"
+
+ # 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
+
+ myconf="${myconf} $(use_enable hardened stackguard-randomization)"
+ if has_version '<sys-libs/glibc-2.13' ; then
+ myconf="${myconf} --enable-old-ssp-compat"
+ fi
+
+ [[ ${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_KER_VER} == 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_KER_VER}"
+ elif [[ $1 == "nptl" ]] ; then
+ myconf="${myconf} --enable-add-ons=nptl${ADDONS}"
+ myconf="${myconf} --enable-kernel=${NPTL_KERN_VER}"
+ 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
+ # 3. Not a crosscompile
+ if ! is_crosscompile && 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)
+ $(use_with gd)
+ --with-headers=$(alt_build_headers)
+ --prefix=/usr
+ --libdir=/usr/$(get_libdir)
+ --mandir=/usr/share/man
+ --infodir=/usr/share/info
+ --libexecdir=/usr/$(get_libdir)/misc/glibc
+ $(use_multiarch || echo --disable-multi-arch)
+ --enable-obsolete-rpc
+ $(in_iuse systemtap && use_enable systemtap)
+ ${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)
+
+ # We take care of patching our binutils to use both hash styles,
+ # and many people like to force gnu hash style only, so disable
+ # this overriding check. #347761
+ export libc_cv_hashstyle=no
+
+ local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1
+ mkdir -p "${GBUILDDIR}"
+ cd "${GBUILDDIR}"
+ echo "${S}"/configure ${myconf}
+ "${S}"/configure ${myconf} || die "failed to configure glibc"
+
+ # ia64 static cross-compilers are a pita in so much that they
+ # can't produce static ELFs (as the libgcc.a is broken). so
+ # disable building of the programs for those targets if it
+ # doesn't work.
+ # XXX: We could turn this into a compiler test, but ia64 is
+ # the only one that matters, so this should be fine for now.
+ if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
+ sed -i '1i+link-static = touch $@' config.make
+ fi
+}
+
+toolchain-glibc_src_compile() {
+ echo
+ local v
+ for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC {AS,C,CPP,CXX,LD}FLAGS ; do
+ einfo " $(printf '%15s' ${v}:) ${!v}"
+ done
+ export CC=$(tc-getCC ${CTARGET})
+ einfo " $(printf '%15s' 'Manual CC:') ${CC}"
+ echo
+
+ if want_linuxthreads ; then
+ glibc_do_configure linuxthreads
+ emake || 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
+ emake || die "make for ${ABI} failed"
+ fi
+}
+
+toolchain-glibc_headers_compile() {
+ local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
+ mkdir -p "${GBUILDDIR}"
+ cd "${GBUILDDIR}"
+
+ # if we don't have a compiler yet, we cant really test it now ...
+ # hopefully they don't affect header geneation, so let's hope for
+ # the best here ...
+ export \
+ ac_cv_header_cpuid_h=yes \
+ libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{32,64},sh,x86_64}_tls=yes \
+ libc_cv_asm_cfi_directives=yes \
+ libc_cv_broken_visibility_attribute=no \
+ libc_cv_gcc___thread=yes \
+ libc_cv_mlong_double_128=yes \
+ libc_cv_mlong_double_128ibm=yes \
+ libc_cv_ppc_machine=yes \
+ libc_cv_ppc_rel16=yes \
+ libc_cv_visibility_attribute=yes \
+ libc_cv_z_combreloc=yes \
+ libc_cv_z_execstack=yes \
+ libc_cv_z_initfirst=yes \
+ libc_cv_z_nodelete=yes \
+ libc_cv_z_nodlopen=yes \
+ libc_cv_z_relro=yes
+
+ # Pick out the correct location for build headers
+ local ports="" myconf="--disable-sanity-checks --enable-hacker-mode"
+ [[ -d ${S}/ports ]] && 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}"
+
+ # Nothing is compiled here which would affect the headers for the target.
+ # so forcing CC/CFLAGS is sane. unless you dont have `gcc`. then i
+ # dont care :p.
+ echo "${S}"/configure ${myconf}
+ CC=gcc \
+ CFLAGS="-O1 -pipe" \
+ CPPFLAGS="-U_FORTIFY_SOURCE" \
+ LDFLAGS="" \
+ "${S}"/configure ${myconf} || die "failed to configure glibc"
+}
+
+eblit-glibc-src_compile() {
+ if is_crosscompile ; then
+ export \
+ libc_cv_c_cleanup=yes \
+ libc_cv_forced_unwind=yes
+ fi
+
+ if just_headers ; then
+ export ABI=default
+ toolchain-glibc_headers_compile
+ return
+ fi
+
+ setup_env
+
+ if [[ -z ${OABI} ]] ; then
+ local abilist=""
+ if has_multilib_profile ; then
+ abilist=$(get_install_abis)
+ elif is_crosscompile || tc-is-cross-compiler ; then
+ abilist=${DEFAULT_ABI}
+ fi
+ einfo "Building glibc for ABIs: ${abilist}"
+ 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
+}
232 sys-libs/glibc/files/eblits-2.15/src_install.eblit
View
@@ -0,0 +1,232 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.22 2012/07/03 20:07:34 vapier Exp $
+
+toolchain-glibc_src_install() {
+ local GBUILDDIR
+ if want_linuxthreads ; then
+ GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads
+ else
+ GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
+ fi
+
+ local install_root="${D}$(alt_prefix)"
+ if want_linuxthreads ; then
+ cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
+ einfo "Installing GLIBC ${ABI} with linuxthreads ..."
+ else
+ cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
+ einfo "Installing GLIBC ${ABI} with NPTL ..."
+ fi
+ emake install_root="${install_root}" install || die
+
+ 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
+
+ # 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 [[ ${SYMLINK_LIB} == "yes" ]] && has_multilib_profile ; then
+ local abi32 ldso
+ case $(tc-arch) in
+ amd64) abi32="x86" ldso="ld-linux.so.2" ;;
+ ppc64) abi32="ppc" ldso="ld.so.1" ;;
+ esac
+ if [[ -n ${ldso} ]] ; then
+ [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ dosym ../$(get_abi_LIBDIR ${abi32})/${ldso} $(alt_prefix)/lib/${ldso}
+ fi
+ fi
+
+ #################################################################
+ # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
+ # Make sure we install some symlink hacks so that when we build
+ # a 2nd stage cross-compiler, gcc finds the target system
+ # headers correctly. See gcc/doc/gccinstall.info
+ if is_crosscompile ; then
+ # We need to make sure that /lib and /usr/lib always exists.
+ # gcc likes to use relative paths to get to its multilibs like
+ # /usr/lib/../lib64/. So while we don't install any files into
+ # /usr/lib/, we do need it to exist.
+ cd "${D}"$(alt_libdir)/..
+ [[ -e lib ]] || mkdir lib
+ cd "${D}"$(alt_usrlibdir)/..
+ [[ -e lib ]] || mkdir lib
+
+ dosym usr/include $(alt_prefix)/sys-include
+ return 0
+ fi
+
+ # Files for Debian-style locale updating
+ dodir /usr/share/i18n
+ sed \
+ -e "/^#/d" \
+ -e "/SUPPORTED-LOCALES=/d" \
+ -e "s: \\\\::g" -e "s:/: :g" \
+ "${S}"/localedata/SUPPORTED > "${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} && [[ -n ${INFOPAGE_VER} ]] ; then
+ einfo "Installing info pages..."
+
+ emake \
+ -C "${GBUILDDIR}" \
+ install_root="${install_root}" \
+ info -i || die
+ fi
+
+ if [[ -n ${MANPAGE_VER} ]] ; 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
+
+ sed -i -e "s:@PIDFILE@:$(strings "${D}"/usr/sbin/nscd | grep nscd.pid):" "${D}"/etc/init.d/nscd
+
+ echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
+ doenvd "${T}"/00glibc || die
+
+ for d in BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
+ [[ -s ${d} ]] && dodoc ${d}
+ done
+
+ # 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}"
+ emake install_root="${D}$(alt_prefix)" install-headers || die
+ # 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
+}
+
+src_strip() {
+ # gdb is lame and requires some debugging information to remain in
+ # libpthread, so we need to strip it by hand. libthread_db makes no
+ # sense stripped as it is only used when debugging.
+ local pthread=$(has splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}")
+ env \
+ -uRESTRICT \
+ CHOST=${CTARGET} \
+ STRIP_MASK="/*/{,tls/}${pthread}*" \
+ prepallstrip
+ # if user has stripping enabled and does not have split debug turned on,
+ # then leave the debugging sections in libpthread.
+ if ! has nostrip ${FEATURES} && ! has splitdebug ${FEATURES} ; then
+ ${STRIP:-${CTARGET}-strip} --strip-debug "${D}"/*/libpthread-*.so
+ fi
+}
+
+eblit-glibc-src_install() {
+ if just_headers ; then
+ export ABI=default
+ toolchain-glibc_headers_install
+ return
+ fi
+
+ 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
+ eblit-glibc-src_install
+ done
+ ABI=${OABI}
+ unset OABI
+ src_strip
+ return 0
+ fi
+ fi
+
+ toolchain-glibc_src_install
+ [[ -z ${OABI} ]] && src_strip
+}
42 sys-libs/glibc/files/eblits-2.15/src_test.eblit
View
@@ -0,0 +1,42 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit,v 1.4 2010/08/10 08:08:05 vapier Exp $
+
+toolchain-glibc_src_test() {
+ cd "${WORKDIR}"/build-${ABI}-${CTARGET}-$1 || die "cd build-${ABI}-${CTARGET}-$1"
+ unset LD_ASSUME_KERNEL
+ emake -j1 check && return 0
+ einfo "make check failed - re-running with --keep-going to get the rest of the results"
+ emake -j1 -k check
+ ewarn "make check failed for ${ABI}-${CTARGET}-$1"
+ return 1
+}
+
+eblit-glibc-src_test() {
+ local ret=0
+
+ setup_env
+
+ # give tests more time to complete
+ export TIMEOUTFACTOR=5
+
+ 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}
+}
185 sys-libs/glibc/files/eblits-2.15/src_unpack.eblit
View
@@ -0,0 +1,185 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.16 2012/02/16 00:27:08 vapier Exp $
+
+int_to_KV() {
+ local version=$1 major minor micro
+ major=$((version / 65536))
+ minor=$(((version % 65536) / 256))
+ micro=$((version % 256))
+ echo ${major}.${minor}.${micro}
+}
+
+eend_KV() {
+ [[ $(KV_to_int $1) -ge $(KV_to_int $2) ]]
+ eend $?
+}
+
+get_kheader_version() {
+ printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \
+ $(tc-getCPP ${CTARGET}) -I "$(alt_build_headers)" | \
+ tail -n 1
+}
+
+check_nptl_support() {
+ # don't care about the compiler here as we arent using it
+ just_headers && return
+
+ local run_kv build_kv want_kv
+ run_kv=$(int_to_KV $(get_KV))
+ build_kv=$(int_to_KV $(get_kheader_version))
+ want_kv=${NPTL_KERN_VER}
+
+ 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 (${run_kv} >= ${want_kv})"
+ if ! eend_KV ${run_kv} ${want_kv} ; then
+ echo
+ eerror "You need a kernel of at least ${want_kv} for NPTL support!"
+ die "Kernel version too low!"
+ fi
+ fi
+
+ ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})"
+ if ! eend_KV ${build_kv} ${want_kv} ; then
+ echo
+ eerror "You need linux-headers of at least ${want_kv} for NPTL support!"
+ die "linux-headers version too low!"
+ fi
+}
+
+unpack_pkg() {
+ local a=${PN}
+ [[ -n ${SNAP_VER} ]] && a="${a}-${RELEASE_VER}"
+ [[ -n $1 ]] && a="${a}-$1"
+ if [[ -n ${SNAP_VER} ]] ; then
+ a="${a}-${SNAP_VER}"
+ else
+ if [[ -n $2 ]] ; then
+ a="${a}-$2"
+ else
+ a="${a}-${RELEASE_VER}"
+ fi
+ fi
+ if has ${a}.tar.xz ${A} ; then
+ unpacker ${a}.tar.xz
+ else
+ unpack ${a}.tar.bz2
+ fi
+ [[ -n $1 ]] && { mv ${a} $1 || die ; }
+}
+
+toolchain-glibc_src_unpack() {
+ # Check NPTL support _before_ we unpack things to save some time
+ want_nptl && check_nptl_support
+
+ if [[ -n ${EGIT_REPO_URIS} ]] ; then
+ local i d
+ for ((i=0; i<${#EGIT_REPO_URIS[@]}; ++i)) ; do
+ EGIT_REPO_URI=${EGIT_REPO_URIS[$i]}
+ EGIT_SOURCEDIR=${EGIT_SOURCEDIRS[$i]}
+ git-2_src_unpack
+ done
+ else
+ unpack_pkg
+ fi
+
+ cd "${S}"
+ touch locale/C-translit.h #185476 #218003
+ [[ -n ${LT_VER} ]] && unpack_pkg linuxthreads ${LT_VER}
+ [[ -n ${PORTS_VER} ]] && unpack_pkg ports ${PORTS_VER}
+ [[ -n ${LIBIDN_VER} ]] && unpack_pkg libidn
+
+ if [[ -n ${PATCH_VER} ]] ; then
+ cd "${WORKDIR}"
+ unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
+ # pull out all the addons
+ local d
+ for d in extra/*/configure ; do
+ d=${d%/configure}
+ [[ -d ${S}/${d} ]] && die "${d} already exists in \${S}"
+ mv "${d}" "${S}" || die "moving ${d} failed"
+ 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-${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 [[ -n ${MANPAGE_VER} ]] ; then
+ cd "${WORKDIR}"
+ unpack glibc-manpages-${MANPAGE_VER}.tar.bz2
+ fi
+
+ if [[ -n ${INFOPAGE_VER} ]] ; then
+ cd "${S}"
+ unpack glibc-infopages-${INFOPAGE_VER}.tar.bz2
+ fi
+
+ # tag, glibc is it
+ cd "${S}"
+ [[ -e csu/Banner ]] && die "need new banner location"
+ [[ -n ${SNAP_VER} ]] && echo "Gentoo snapshot ${SNAP_VER}" >> csu/Banner
+ [[ -n ${BRANCH_UPDATE} ]] && echo "Gentoo branch ${BRANCH_UPDATE}" >> csu/Banner
+ if [[ -n ${PATCH_VER} ]] && ! use vanilla ; then
+ cd "${S}"
+ EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER} ..." \
+ EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \
+ EPATCH_SUFFIX="patch" \
+ ARCH=$(tc-arch) \
+ epatch "${WORKDIR}"/patches
+ echo "Gentoo patchset ${PATCH_VER}" >> csu/Banner
+ fi
+
+ if just_headers ; then
+ if [[ -e ports/sysdeps/mips/preconfigure ]] ; then
+ # mips peeps like to screw with us. if building headers,
+ # we don't have a real compiler, so we can't let them
+ # insert -mabi on us.
+ sed -i '/CPPFLAGS=.*-mabi/s|.*|:|' ports/sysdeps/mips/preconfigure || die
+ find ports/sysdeps/mips/ -name Makefile -exec sed -i '/^CC.*-mabi=/s:-mabi=.*:-D_MIPS_SZPTR=32:' {} +
+ fi
+ fi
+
+ epatch_user
+
+ gnuconfig_update
+}
+
+eblit-glibc-src_unpack() {
+ setup_env
+
+ toolchain-glibc_src_unpack
+
+ # 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
+}
160 sys-libs/glibc/files/eblits/common.eblit
View
@@ -1,6 +1,10 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.12 2010/09/30 06:29:21 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.27 2012/06/19 22:06:23 vapier Exp $
+
+alt_prefix() {
+ is_crosscompile && echo /usr/${CTARGET}
+}
# We need to be able to set alternative headers for
# compiling for non-native platform
@@ -8,14 +12,7 @@
# 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}"
+ echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
}
alt_build_headers() {
if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
@@ -31,63 +28,39 @@ alt_build_headers() {
echo "${ALT_BUILD_HEADERS}"
}
+alt_libdir() {
+ echo $(alt_prefix)/$(get_libdir)
+}
alt_usrlibdir() {
- if is_crosscompile ; then
- echo /usr/${CTARGET}/usr/$(get_libdir)
- else
- echo /usr/$(get_libdir)
- fi
+ echo $(alt_prefix)/usr/$(get_libdir)
}
-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
+setup_target_flags() {
+ # This largely mucks with compiler flags. None of which should matter
+ # when building up just the headers.
+ just_headers && return 0
case $(tc-arch) in
x86)
- # -march needed for #185404
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- if ! echo "" | $(tc-getCC) ${CFLAGS} -E -dD - | grep -qs __${t}__ ; then
+ # -march needed for #185404 #199334
+ if ! glibc_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
filter-flags '-march=*'
export CFLAGS="-march=${t} ${CFLAGS}"
+ einfo "Auto adding -march=${t} to CFLAGS #185404"
fi
;;
amd64)
- # Punt this when amd64's 2004.3 is removed
- CFLAGS_x86="-m32"
-
- # -march needed for #185404
- local t=${CTARGET_OPT:-${CTARGET}}
- t=${t%%-*}
- if ! echo "" | $(tc-getCC) ${CFLAGS} ${CFLAGS_x86} -m32 -E -dD - | grep -qs __${t}__ ; then
+ # -march needed for #185404 #199334
+ if ! glibc_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' 2>/dev/null ; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
filter-flags '-march=*'
+ # ugly, ugly, ugly. ugly.
+ CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}")
export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
+ einfo "Auto adding -march=${t} to CFLAGS_x86 #185404"
fi
;;
ppc)
@@ -107,8 +80,9 @@ setup_flags() {
# - UltraSPARC T2 (niagara2) support requires >= glibc 2.7
if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then
- case ${ABI} in
- sparc64)
+ case ${ABI}:${CTARGET} in
+ sparc64:*|\
+ default:sparc64*)
filter-flags -Wa,-xarch -Wa,-A
if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then
@@ -154,6 +128,38 @@ setup_flags() {
fi
;;
esac
+}
+
+setup_flags() {
+ # Make sure host make.conf doesn't pollute us
+ if is_crosscompile || tc-is-cross-compiler ; then
+ CHOST=${CTARGET} strip-unsupported-flags
+ fi
+
+ # Store our CFLAGS because it's changed depending on which CTARGET
+ # we are building when pulling glibc on a multilib profile
+ CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}}
+ CFLAGS=${CFLAGS_BASE}
+ CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}}
+ CXXFLAGS=${CXXFLAGS_BASE}
+ ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}}
+ ASFLAGS=${ASFLAGS_BASE}
+
+ # Over-zealous CFLAGS can often cause problems. What may work for one
+ # person may not work for another. To avoid a large influx of bugs
+ # relating to failed builds, we strip most CFLAGS out to ensure as few
+ # problems as possible.
+ strip-flags
+ strip-unsupported-flags
+ filter-flags -m32 -m64 -mabi=*
+
+ unset CBUILD_OPT CTARGET_OPT
+ if has_multilib_profile ; then
+ CTARGET_OPT=$(get_abi_CTARGET)
+ [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST)
+ fi
+
+ setup_target_flags
if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then
CBUILD_OPT=${CTARGET_OPT}
@@ -202,22 +208,12 @@ want_nptl() {
want_linuxthreads() {
[[ -z ${LT_VER} ]] && return 1
- ! use nptlonly && return 0
- want_nptl || return 0
- return 1
+ use linuxthreads
}
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
@@ -243,17 +239,11 @@ want__thread() {
return ${WANT__THREAD}
}
-use_multilib() {
- case ${CTARGET} in
- sparc*|mips64*|x86_64*|powerpc64*|s390x*)
- has_multilib_profile || use multilib ;;
- *) false ;;
- esac
-}
-
use_multiarch() {
# Make sure binutils is new enough to support indirect functions #336792
- local bver=$($(tc-getLD ${CTARGET}) -v | awk '{print $NF}') nver
+ # This funky sed supports gold and bfd linkers.
+ local bver nver
+ bver=$($(tc-getLD ${CTARGET}) -v | sed -n -r '1{s:[^0-9]*::;s:^([0-9.]*).*:\1:;p}')
case $(tc-arch ${CTARGET}) in
amd64|x86) nver="2.20" ;;
sparc) nver="2.21" ;;
@@ -262,13 +252,14 @@ use_multiarch() {
version_is_at_least ${nver} ${bver}
}
-# Setup toolchain variables that would be defined in the profiles for these archs.
+# Setup toolchain variables that had historically
+# been defined in the profiles for these archs.
setup_env() {
# silly users
unset LD_RUN_PATH
+ multilib_env ${CTARGET_OPT:-${CTARGET}}
if is_crosscompile || tc-is-cross-compiler ; then
- multilib_env ${CTARGET}
if ! use multilib ; then
MULTILIB_ABIS=${DEFAULT_ABI}
else
@@ -285,12 +276,13 @@ setup_env() {
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
+ local VAR=CFLAGS_${ABI}
+ # We need to export CFLAGS with abi information in them because glibc's
+ # configure script checks CFLAGS for some targets (like mips). Keep
+ # around the original clean value to avoid appending multiple ABIs on
+ # top of each other.
+ : ${__GLIBC_CC:=$(tc-getCC ${CTARGET_OPT:-${CTARGET}})}
+ export __GLIBC_CC CC="${__GLIBC_CC} ${!VAR}"
}
just_headers() {
8 sys-libs/glibc/files/eblits/pkg_postinst.eblit
View
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_postinst.eblit,v 1.1 2009/03/01 21:06:22 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_postinst.eblit,v 1.2 2012/04/15 20:04:44 vapier Exp $
eblit-glibc-pkg_postinst() {
# nothing to do if just installing headers
@@ -22,8 +22,6 @@ eblit-glibc-pkg_postinst() {
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}"
+ locale-gen -j $(makeopts_jobs) --config "${locale_list}"
fi
}
11 sys-libs/glibc/files/eblits/pkg_preinst.eblit
View
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_preinst.eblit,v 1.3 2010/10/08 15:33:13 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_preinst.eblit,v 1.4 2011/11/16 16:07:46 vapier Exp $
fix_lib64_symlinks() {
# the original Gentoo/AMD64 devs decided that since 64bit is the native
@@ -52,13 +52,6 @@ eblit-glibc-pkg_preinst() {
# 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
-
# prepare /etc/ld.so.conf.d/ for files
mkdir -p "${ROOT}"/etc/ld.so.conf.d
93 sys-libs/glibc/files/eblits/pkg_setup.eblit
View
@@ -1,6 +1,49 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.4 2009/08/21 05:46:04 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.10 2011/12/14 16:42:46 vapier Exp $
+
+glibc_compile_test() {
+ local ret save_cflags=${CFLAGS}
+ CFLAGS+=" $1"
+ shift
+
+ pushd "${T}" >/dev/null
+
+ rm -f glibc-test*
+ printf '%b' "$*" > glibc-test.c
+
+ emake -s glibc-test
+ ret=$?
+
+ popd >/dev/null
+
+ CFLAGS=${save_cflags}
+ return ${ret}
+}
+
+glibc_run_test() {
+ local ret
+
+ if [[ ${EMERGE_FROM} == "binary" ]] ; then
+ # ignore build failures when installing a binary package #324685
+ glibc_compile_test "" "$@" 2>/dev/null || return 0
+ else
+ if ! glibc_compile_test "" "$@" ; then
+ ewarn "Simple build failed ... assuming this is desired #324685"
+ return 0
+ fi
+ fi
+
+ pushd "${T}" >/dev/null
+
+ ./glibc-test
+ ret=$?
+ rm -f glibc-test*
+
+ popd >/dev/null
+
+ return ${ret}
+}
eblit-glibc-pkg_setup() {
# prevent native builds from downgrading ... maybe update to allow people
@@ -12,22 +55,17 @@ eblit-glibc-pkg_setup() {
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
+ if ! glibc_run_test '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n'
+ 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"
+ eerror "http://bugs.gentoo.org/262698"
die "keeping your system alive, say thank you"
fi
- # Check for broken kernels #279260
- cd "${T}"
- printf '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' > kern-enosys-test.c
- emake kern-enosys-test || die
- if ! ./kern-enosys-test ; then
+ if ! glibc_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n'
+ then
eerror "Your old kernel is broken. You need to update it to"
eerror "a newer version as syscall(<bignum>) will break."
eerror "http://bugs.gentoo.org/279260"
@@ -49,13 +87,6 @@ eblit-glibc-pkg_setup() {
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 when running with a 32bit"
@@ -64,4 +95,28 @@ eblit-glibc-pkg_setup() {
use hardened && ! gcc-specs-pie && \
ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
+
+ # Make sure host system is up to date #394453
+ if has_version '<sys-libs/glibc-2.13' && \
+ [[ -n $(scanelf -qys__guard -F'#s%F' "${ROOT}"/lib*/l*-*.so) ]]
+ then
+ ebegin "Scanning system for __guard to see if you need to rebuild first ..."
+ local files=$(
+ scanelf -qys__guard -F'#s%F' \
+ "${ROOT}"/*bin/ \
+ "${ROOT}"/lib* \
+ "${ROOT}"/usr/*bin/ \
+ "${ROOT}"/usr/lib* | \
+ egrep -v \
+ -e "^${ROOT}/lib.*/(libc|ld)-2.*.so$" \
+ -e "^${ROOT}/sbin/(ldconfig|sln)$"
+ )
+ [[ -z ${files} ]]
+ if ! eend $? ; then
+ eerror "Your system still has old SSP __guard symbols. You need to"
+ eerror "rebuild all the packages that provide these files first:"
+ eerror "${files}"
+ die "old __guard detected"
+ fi
+ fi
}
41 sys-libs/glibc/files/eblits/src_compile.eblit
View
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.16 2010/11/10 21:51:18 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.28 2012/07/03 20:07:34 vapier Exp $
glibc_do_configure() {
local myconf
@@ -19,16 +19,11 @@ glibc_do_configure() {
[[ -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
+ if has_version '<sys-libs/glibc-2.13' ; 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
@@ -86,27 +81,40 @@ glibc_do_configure() {
--infodir=/usr/share/info
--libexecdir=/usr/$(get_libdir)/misc/glibc
$(use_multiarch || echo --disable-multi-arch)
+ --enable-obsolete-rpc
+ $(in_iuse systemtap && use_enable systemtap)
${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)
+ # We take care of patching our binutils to use both hash styles,
+ # and many people like to force gnu hash style only, so disable
+ # this overriding check. #347761
+ export libc_cv_hashstyle=no
+
local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1
mkdir -p "${GBUILDDIR}"
cd "${GBUILDDIR}"
echo "${S}"/configure ${myconf}
"${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
+ # ia64 static cross-compilers are a pita in so much that they
+ # can't produce static ELFs (as the libgcc.a is broken). so
+ # disable building of the programs for those targets if it
+ # doesn't work.
+ # XXX: We could turn this into a compiler test, but ia64 is
+ # the only one that matters, so this should be fine for now.
+ if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
+ sed -i '1i+link-static = touch $@' config.make
+ fi
}
toolchain-glibc_src_compile() {
echo
local v
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do
+ for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC {AS,C,CPP,CXX,LD}FLAGS ; do
einfo " $(printf '%15s' ${v}:) ${!v}"
done
export CC=$(tc-getCC ${CTARGET})
@@ -135,7 +143,7 @@ toolchain-glibc_headers_compile() {
# the best here ...
export \
ac_cv_header_cpuid_h=yes \
- libc_cv_386_tls=yes \
+ libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{32,64},sh,x86_64}_tls=yes \
libc_cv_asm_cfi_directives=yes \
libc_cv_broken_visibility_attribute=no \
libc_cv_gcc___thread=yes \
@@ -167,9 +175,11 @@ toolchain-glibc_headers_compile() {
# Nothing is compiled here which would affect the headers for the target.
# so forcing CC/CFLAGS is sane. unless you dont have `gcc`. then i
# dont care :p.
- einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}"
+ echo "${S}"/configure ${myconf}
CC=gcc \
CFLAGS="-O1 -pipe" \
+ CPPFLAGS="-U_FORTIFY_SOURCE" \
+ LDFLAGS="" \
"${S}"/configure ${myconf} || die "failed to configure glibc"
}
@@ -181,6 +191,7 @@ eblit-glibc-src_compile() {
fi
if just_headers ; then
+ export ABI=default
toolchain-glibc_headers_compile
return
fi
@@ -191,10 +202,10 @@ eblit-glibc-src_compile() {
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
+ einfo "Building glibc for ABIs: ${abilist}"
if [[ -n ${abilist} ]] ; then
OABI=${ABI}
for ABI in ${abilist} ; do
85 sys-libs/glibc/files/eblits/src_install.eblit
View
@@ -1,6 +1,6 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.10 2010/08/10 08:08:05 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.22 2012/07/03 20:07:34 vapier Exp $
toolchain-glibc_src_install() {
local GBUILDDIR
@@ -10,23 +10,16 @@ toolchain-glibc_src_install() {
GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
fi
- local install_root=${D}
- is_crosscompile && install_root="${install_root}/usr/${CTARGET}"
+ local install_root="${D}$(alt_prefix)"
if want_linuxthreads ; then
cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
einfo "Installing GLIBC ${ABI} with linuxthreads ..."
- else # nptlonly
+ else
cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl
einfo "Installing GLIBC ${ABI} with NPTL ..."
fi
emake install_root="${install_root}" install || die
- 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
@@ -73,25 +66,20 @@ toolchain-glibc_src_install() {
# 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 if glibc itself doesn't do it
- # XXX: curr glibc should finally handle all of them correctly
- #case $(tc-arch) in
- # amd64|mips|ppc|s390) ;;
- # *) prep_ml_includes $(alt_headers) ;;
- #esac
+ # Everything past this point just needs to be done once ...
+ is_final_abi || return 0
- # 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
+ # Make sure the non-native interp can be found on multilib systems
+ if [[ ${SYMLINK_LIB} == "yes" ]] && has_multilib_profile ; then
+ local abi32 ldso
+ case $(tc-arch) in
+ amd64) abi32="x86" ldso="ld-linux.so.2" ;;
+ ppc64) abi32="ppc" ldso="ld.so.1" ;;
+ esac
+ if [[ -n ${ldso} ]] ; then
+ [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
+ dosym ../$(get_abi_LIBDIR ${abi32})/${ldso} $(alt_prefix)/lib/${ldso}
+ fi
fi
#################################################################
@@ -100,25 +88,17 @@ toolchain-glibc_src_install() {
# 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
+ # We need to make sure that /lib and /usr/lib always exists.
+ # gcc likes to use relative paths to get to its multilibs like
+ # /usr/lib/../lib64/. So while we don't install any files into
+ # /usr/lib/, we do need it to exist.
+ cd "${D}"$(alt_libdir)/..
+ [[ -e lib ]] || mkdir lib
+ cd "${D}"$(alt_usrlibdir)/..
+ [[ -e lib ]] || mkdir lib
- # 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
+ dosym usr/include $(alt_prefix)/sys-include
+ return 0
fi
# Files for Debian-style locale updating
@@ -175,7 +155,9 @@ toolchain-glibc_src_install() {
echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
doenvd "${T}"/00glibc || die
- dodoc BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README*
+ for d in BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
+ [[ -s ${d} ]] && dodoc ${d}
+ done
# Prevent overwriting of the /etc/localtime symlink. We'll handle the
# creation of the "factory" symlink in pkg_postinst().
@@ -185,7 +167,7 @@ toolchain-glibc_src_install() {
toolchain-glibc_headers_install() {
local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers
cd "${GBUILDDIR}"
- emake install_root="${D}/usr/${CTARGET}" install-headers || die "install-headers failed"
+ emake install_root="${D}$(alt_prefix)" install-headers || die
# 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
@@ -202,7 +184,7 @@ src_strip() {
# gdb is lame and requires some debugging information to remain in
# libpthread, so we need to strip it by hand. libthread_db makes no
# sense stripped as it is only used when debugging.
- local pthread=$(hasq splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}")
+ local pthread=$(has splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}")
env \
-uRESTRICT \
CHOST=${CTARGET} \
@@ -210,13 +192,14 @@ src_strip() {
prepallstrip
# if user has stripping enabled and does not have split debug turned on,
# then leave the debugging sections in libpthread.
- if ! hasq nostrip ${FEATURES} && ! hasq splitdebug ${FEATURES} ; then
+ if ! has nostrip ${FEATURES} && ! has splitdebug ${FEATURES} ; then
${STRIP:-${CTARGET}-strip} --strip-debug "${D}"/*/libpthread-*.so
fi
}
eblit-glibc-src_install() {
if just_headers ; then
+ export ABI=default
toolchain-glibc_headers_install
return
fi
49 sys-libs/glibc/files/eblits/src_unpack.eblit
View
@@ -1,6 +1,6 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.11 2010/06/08 04:59:56 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.16 2012/02/16 00:27:08 vapier Exp $
int_to_KV() {
local version=$1 major minor micro
@@ -69,15 +69,28 @@ unpack_pkg() {
a="${a}-${RELEASE_VER}"
fi
fi
- unpack ${a}.tar.bz2
- [[ -n $1 ]] && mv ${a} $1
+ if has ${a}.tar.xz ${A} ; then
+ unpacker ${a}.tar.xz
+ else
+ unpack ${a}.tar.bz2
+ fi
+ [[ -n $1 ]] && { mv ${a} $1 || die ; }
}
toolchain-glibc_src_unpack() {
# Check NPTL support _before_ we unpack things to save some time
want_nptl && check_nptl_support
- unpack_pkg
+ if [[ -n ${EGIT_REPO_URIS} ]] ; then
+ local i d
+ for ((i=0; i<${#EGIT_REPO_URIS[@]}; ++i)) ; do
+ EGIT_REPO_URI=${EGIT_REPO_URIS[$i]}
+ EGIT_SOURCEDIR=${EGIT_SOURCEDIRS[$i]}
+ git-2_src_unpack
+ done
+ else
+ unpack_pkg
+ fi
cd "${S}"
touch locale/C-translit.h #185476 #218003
@@ -134,6 +147,16 @@ toolchain-glibc_src_unpack() {
echo "Gentoo patchset ${PATCH_VER}" >> csu/Banner
fi
+ if just_headers ; then
+ if [[ -e ports/sysdeps/mips/preconfigure ]] ; then
+ # mips peeps like to screw with us. if building headers,
+ # we don't have a real compiler, so we can't let them
+ # insert -mabi on us.
+ sed -i '/CPPFLAGS=.*-mabi/s|.*|:|' ports/sysdeps/mips/preconfigure || die
+ find ports/sysdeps/mips/ -name Makefile -exec sed -i '/^CC.*-mabi=/s:-mabi=.*:-D_MIPS_SZPTR=32:' {} +
+ fi
+ fi
+
epatch_user
gnuconfig_update
@@ -144,22 +167,6 @@ eblit-glibc-src_unpack() {
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
255 sys-libs/glibc/glibc-2.15-r2.ebuild
View
@@ -0,0 +1,255 @@
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib unpacker multiprocessing
+
+DESCRIPTION="GNU libc6 (also called glibc2) C library"
+HOMEPAGE="http://www.gnu.org/software/libc/libc.html"
+
+LICENSE="LGPL-2"
+KEYWORDS="~*"
+RESTRICT="strip" # strip ourself #46186
+EMULTILIB_PKG="true"
+
+# Configuration variables
+RELEASE_VER=""
+BRANCH_UPDATE=""
+SNAP_VER=""
+case ${PV} in
+9999*)
+ EGIT_REPO_URIS=( "git://sourceware.org/git/glibc.git" "git://sourceware.org/git/glibc-ports.git" )
+ EGIT_SOURCEDIRS=( "${S}" "${S}/ports" )
+ inherit git-2
+ ;;
+*_p*)
+ RELEASE_VER=${PV%_p*}
+ SNAP_VER=${PV#*_p}
+ ;;
+*)
+ RELEASE_VER=${PV}
+ ;;
+esac
+MANPAGE_VER="" # pregenerated manpages
+INFOPAGE_VER="" # pregenerated infopages
+LIBIDN_VER="" # it's integrated into the main tarball now
+PATCH_VER="21" # Gentoo patchset
+PORTS_VER=${RELEASE_VER} # version of glibc ports addon
+NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires
+
+IUSE="debug gd hardened multilib selinux profile vanilla crosscompile_opts_headers-only"
+[[ -n ${RELEASE_VER} ]] && 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} ]]
+}
+
+# Why SLOT 2.2 you ask yourself while sippin your tea ?
+# Everyone knows 2.2 > 0, duh.
+SLOT="2.2"
+
+# General: We need a new-enough binutils 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 )
+ x86? ( >=sys-devel/gcc-4.3 )
+ amd64? ( >=sys-devel/binutils-2.19 >=sys-devel/gcc-4.3 )
+ ppc? ( >=sys-devel/gcc-4.1.0 )
+ ppc64? ( >=sys-devel/gcc-4.1.0 )
+ >=sys-devel/binutils-2.15.94
+ >=app-misc/pax-utils-0.1.10
+ virtual/os-headers
+ !<sys-apps/sandbox-1.2.18.1-r2
+ !<sys-apps/portage-2.1.2
+ !<sys-devel/patch-2.6
+ selinux? ( sys-libs/libselinux )
+ >=sys-kernel/linux-headers-3.1
+ >sys-devel/libtool-2.4"
+RDEPEND="!sys-kernel/ps3-sources
+ selinux? ( sys-libs/libselinux )
+ !sys-libs/nss-db"
+
+if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ DEPEND="${DEPEND} !crosscompile_opts_headers-only? ( ${CATEGORY}/gcc )"
+ [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers"
+else
+ DEPEND="${DEPEND} !vanilla? ( >=sys-libs/timezone-data-2007c )"
+ RDEPEND="${RDEPEND}
+ vanilla? ( !sys-libs/timezone-data )
+ !vanilla? ( 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
+ elif [[ -z ${EGIT_REPO_URIS} ]] ; then
+ upstream_uris ${TARNAME}-${RELEASE_VER}.tar.xz
+ fi
+ [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2
+ [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.xz
+ [[ -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
+ [[ $1 == pkg_* ]] && skipable=true
+
+ local e v func=$1 ver=$2
+ [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
+ for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
+ e="${FILESDIR}/eblits/${func}${v}.eblit"
+ if [[ -e ${e} ]] ; then
+ source "${e}"
+ return 0
+ fi
+ done
+ ${skipable} && return 0
+ die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
+}
+
+# eblit-run-maybe <function>
+# run the specified function if it is defined
+eblit-run-maybe() {
+ [[ $(type -t "$@") == "function" ]] && "$@"
+}
+
+# eblit-run <function> [version]
+# aka: src_unpack() { eblit-run src_unpack ; }
+eblit-run() {
+ eblit-include --skip common "${*:2}"
+ eblit-include "$@"
+ eblit-run-maybe eblit-$1-pre
+ eblit-${PN}-$1
+ eblit-run-maybe eblit-$1-post
+}
+
+src_unpack() { eblit-run src_unpack ; }
+src_compile() { eblit-run src_compile ; }
+src_test() { eblit-run src_test ; }
+src_install() { eblit-run src_install ; }
+
+# FILESDIR might not be available during binpkg install
+for x in setup {pre,post}inst ; do
+ e="${FILESDIR}/eblits/pkg_${x}.eblit"
+ if [[ -e ${e} ]] ; then
+ . "${e}"
+ eval "pkg_${x}() { eblit-run pkg_${x} ; }"
+ fi
+done
+
+eblit-src_unpack-pre() {
+ if [[ ${CTARGET} == x86_64* ]] && has x32 $(get_all_abis) ; then
+ GLIBC_PATCH_EXCLUDE+=" 0080_all_glibc-2.15-revert-x86_64-eagain-pthread_cond_wait.patch"
+ else
+ GLIBC_PATCH_EXCLUDE+=" 120?_all_glibc-${PV}-x32*.patch"
+ fi
+}
+
+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.12/glibc-2.12-hardened-pie.patch
+ epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-configure-picdefault.patch
+ epatch "${FILESDIR}"/2.10/glibc-2.10-hardened-inittls-nosysenter.patch
+
+ einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
+ cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \
+ debug/stack_chk_fail.c || die
+ cp -f "${FILESDIR}"/2.10/glibc-2.10-gentoo-chk_fail.c \
+ debug/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"
+ sed -i \
+ -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
+ debug/Makefile \
+ || die "Failed to modify debug/Makefile for debug fortify 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
+}
+
+eblit-pkg_preinst-post() {
+ if [[ ${CTARGET} == arm* ]] ; then
+ # Backwards compat support for renaming hardfp ldsos #417287
+ local oldso='/lib/ld-linux.so.3'
+ local nldso='/lib/ld-linux-armhf.so.3'
+ if [[ -e ${D}${nldso} ]] ; then
+ if scanelf -qRyi "${ROOT}$(alt_prefix)"/*bin/ | grep -s "^${oldso}" ; then
+ ewarn "Symlinking old ldso (${oldso}) to new ldso (${nldso})."
+ ewarn "Please rebuild all packages using this old ldso as compat"
+ ewarn "support will be dropped in the future."
+ ln -s "${nldso##*/}" "${D}$(alt_prefix)${oldso}"
+ fi
+ fi
+ 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
+}
Please sign in to comment.
Something went wrong with that request. Please try again.