1 |
commit: b278d294c68556de8e05f8fb689032fcfd640aac |
2 |
Author: Benda Xu <heroxbd <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 24 14:09:10 2016 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 24 14:09:10 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/android.git/commit/?id=b278d294 |
7 |
|
8 |
sys-libs/glibc: files/eblits merge latest changes. |
9 |
|
10 |
sys-libs/glibc/Manifest | 21 +-- |
11 |
sys-libs/glibc/files/eblits/common.eblit | 148 +++++++++++++-------- |
12 |
sys-libs/glibc/files/eblits/pkg_postinst.eblit | 2 +- |
13 |
sys-libs/glibc/files/eblits/pkg_preinst.eblit | 22 ++- |
14 |
.../eblits/{pkg_setup.eblit => pkg_pretend.eblit} | 38 +++++- |
15 |
sys-libs/glibc/files/eblits/pkg_setup.eblit | 124 +---------------- |
16 |
sys-libs/glibc/files/eblits/src_compile.eblit | 2 +- |
17 |
sys-libs/glibc/files/eblits/src_configure.eblit | 63 ++++++--- |
18 |
sys-libs/glibc/files/eblits/src_install.eblit | 2 +- |
19 |
sys-libs/glibc/files/eblits/src_prepare.eblit | 2 +- |
20 |
sys-libs/glibc/files/eblits/src_test.eblit | 2 +- |
21 |
sys-libs/glibc/files/eblits/src_unpack.eblit | 2 +- |
22 |
12 files changed, 202 insertions(+), 226 deletions(-) |
23 |
|
24 |
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest |
25 |
index bae5e8d..4213ffd 100644 |
26 |
--- a/sys-libs/glibc/Manifest |
27 |
+++ b/sys-libs/glibc/Manifest |
28 |
@@ -28,16 +28,17 @@ AUX 2.5/glibc-2.5-hardened-pie.patch 1569 SHA256 ff9cde8857c5da89faa4039e2a81748 |
29 |
AUX 2.6/glibc-2.6-gentoo-stack_chk_fail.c 9545 SHA256 1410ded812be80d452eada5f9d6b9bd7bdb504c14f01cc27dce3e36b6f92b92a SHA512 360b77df2d19d14060e19e763878297bf042eccd5206ce4829a33c78c982b59b46144116d237a7cac73a22dd6cb4987c8dd50f1d16003baa22c2cb2942d2cbdf WHIRLPOOL 44e14dacdd258c46201a44c2c6aae4d975b960a914c24e49f2b39dae960636512049daa052d3cd8e8d93819d263327c28eac947efdb5d9e240d1bc6e9964016f |
30 |
AUX 2.6/glibc-2.6-hardened-inittls-nosysenter.patch 8674 SHA256 cf58ded8fbe9fcb3dc094521feec2588c1520ff2c632b20c69d6a210325c4fcf SHA512 094b24474e42a9714f5298b0768d44f2c0e01b7d8c3b0a754bb16caa6c024106e8c0b1acbce670bacec1ead6653f8365397173d62cb8168b946c8f521ca155d2 WHIRLPOOL 9fa16256f9d3bd2f38023549c0bd4c932d3173b6c3f4ef66e19cdb3eff5cb2def6ec02fa72a7e57ba74da6d5f29b82ddb9692d59f6c694d45b5989fa0bfa6057 |
31 |
AUX 2.7/glibc-2.7-hardened-inittls-nosysenter.patch 8755 SHA256 b0b1bf0746f7160b89cf281502b95c38dec9cb948d6a50a907b84fd6230a2dc3 SHA512 50563c26e1fd2e71cb034c8a1b85e0e4075ac6467bae46d4cba0c105c940c5aa6531c39cf00c63ebf94be4e290ee485d7bd8239ff08dbc781db605b45c4aa38f WHIRLPOOL 2047148b53073bae4031ad864fc360112e2812115ec455142c82d4694a57387b49b36c98f400dd6f77f5dab3d419303faabe8183a16f0fd68387996c95888a43 |
32 |
-AUX eblits/common.eblit 11878 SHA256 8b97d1db83e410b8ae44494e84f44f4072972fb2319d5c52ffe798def5bd848d SHA512 d4e981279500dc9949516f2ea293287c33c0578b4ed55cf4a87216bee5590102e33b481bcbafc0b0a763b921b6fcf7952563602f7c21d758f6067ed884815fc7 WHIRLPOOL 2943eb1f59fc72d9c4c6fbe65464d09de3c649334942aed114d7aa921dfbfaf44f747a91f5b8401d3235ed71df7722ca8e337f80728638d24f054a1a7a944ddf |
33 |
-AUX eblits/pkg_postinst.eblit 1085 SHA256 71b7a853cd825ed7044e69c8a76b6ee3e00d46614015960d411941c4d12f5d20 SHA512 fc39960f370f0a4d5ef4d794f6de14594a53730ec0b3a49956cfddced17196f485337b9cb29759f232ccd33b4e9af7affe92aac93752397aa2e29ff0c1e36809 WHIRLPOOL 22936beba3ab465ef32717c1659dffa6ef7094d59d0c8ce2455563d56ce371598deac783f365abe2c55a527e7bdb28d07733ee3ea0858e2df86c65d66d729031 |
34 |
-AUX eblits/pkg_preinst.eblit 2610 SHA256 9e2128b921342534ce8286f5b5d5e3d89435c1d0ef307f67438bdb27862fff25 SHA512 a3b48453670f0f31ffaddfe5d397f2a28a3748840bfcea621ccde6b7a0efec180ef528cf9bf9b99bf523b3c379c978d21d036df621e1726b5ea6f1555c361a92 WHIRLPOOL b4c4e720579bfb1b13e47aba5fa1bf40b9265432e7ba2ab21decf7f11c9a90dc3b5c0cb283bdbf8f903f27712854c48265cae4e3c926f4b06e6261fb47365170 |
35 |
-AUX eblits/pkg_setup.eblit 3963 SHA256 385b1315ef36265375d4a552687437a59cade4dbc937aa99a313002abea63736 SHA512 db970d0bf24182993f10713234316f7a4392859a3d8eff419a2ed7220f4e159daf1b6944888d34bc777587b2e9160a1bd911526fc28512d47aa60ebe3029d4da WHIRLPOOL 8a00c72f2d81e39de89e43f0eb973315035702357aec986032af7085bc1e5ad02ba2c6341c22f1e967219e239de3e5c714a156117141f875821e116bc78de4cc |
36 |
-AUX eblits/src_compile.eblit 712 SHA256 2f7250659b1ea316dd67a0baa229b9248693b55738416e242bcacbd6efec96b2 SHA512 f812075621013eb9db7748e16997f7785e6029f691147ef63c9c5e4c0ec98ca47cad81a9aa135e69dd57296454d158191deced0cb47201343698d9495b8dd34e WHIRLPOOL 0692b14ac23a7f995e68c15fc91643bd72707f4072e319460a31014a91fe789794b10ac155021b48f02b9bea636305408ec56bb161664a21ec7f5ff86ccff7fe |
37 |
-AUX eblits/src_configure.eblit 7382 SHA256 782eb8eb0e462e0592477e9dfe1660821dceca2c79784047d64a625d05bee200 SHA512 462b7fa883973a4ec31dec43d6977c8551301e00df5267955041f139254f985ad0f8a906ffa048f4a80d2909dea7638e3b09db7ca7327beed01d6b4f9895bbdd WHIRLPOOL 865639efd635682201f7dac099dd43dd6515091c7d080d753d4a9d562f9c062df2eb900af08ad1e77c35f5bbb62ef96224e905fb09445b8ad7c7de7eb1db3e93 |
38 |
-AUX eblits/src_install.eblit 7940 SHA256 e6b3c927b52ccb2afd3a080be482e34481a821f4f4280f426f8b5ddc29db8c30 SHA512 df13584e9fb4d307a7871e2a26347d944d089938f6e5f4c6538a09c23f42b683a4808dc426547af3127787a4b0420459fbdd52f5910ddea45ed1c247fe8b520e WHIRLPOOL 76ec59abcafc6a530ec7f243ab18dad7176196f60800dc743ba120a8e1503a0ff6159bcfa75e5ba0f5d32c25af07ebfa426a5100d8912b37a9dffd6b5f355c46 |
39 |
-AUX eblits/src_prepare.eblit 2344 SHA256 7898682539bc85f126e491bc9c9a727cc5d922680f91dd409aec50c068ca93aa SHA512 30d706f26475db2dfe8cfaaa003c3a21988328ba0cc7cdca439d248c968430308d8d0afefa60302315d4c76011e4de51925307ee19d15eba10e24f1ede2b956f WHIRLPOOL 3a5ad0de18649805d97b0d78ea33e52608e7b6694ac567313db9e09da18a0bca9b95a027fe0181b50738b5bfe83ac49254d29b077cef36fb311a9707683261b5 |
40 |
-AUX eblits/src_test.eblit 808 SHA256 8a652acb87e941fe767ddfbe0e0a42e3b5f208f5408606c5d9de22a85b1f8ebe SHA512 b8a37cd8294f5b6d2735d9971e7bc4bde1a7671540d6f76764d06203f5f179c143c487f57c57747c8e72e7a1d89d05928df51331a44f46d4290e9b89449eed63 WHIRLPOOL c33b33b71431f3438fbe350c8c1d3c67d17fdccef61687bc645397635875d09af8b4e2b545a4405429c2b8ee4a012fd753205e4b5ce3bb2f93e4341d34a18eb4 |
41 |
-AUX eblits/src_unpack.eblit 3209 SHA256 82b23ecfe2fc3b7e93545af4b67e2525e1ee3c9f2d4eac3af435cf44e8254da4 SHA512 4f9cb34be2869864c0f814141bf1b6504b4138c3c672dd1fef9c5ad448c6fabab98445551cb364035978898c9e7829168ef702b068b4dadf325cf925c70ab42f WHIRLPOOL bdcf238477e6148dcdb8371eee40cb8ee920e039848e1088923922e615529fea70089fb5f1094630269d3a876c4752f41d0433b2948f5b5283a532938c9858df |
42 |
+AUX eblits/common.eblit 12044 SHA256 fc6d9e2e88549add4561ff66d267ebb4b1841bf740c0c366a1bad29546640617 SHA512 1df934a5809587a0968442ae3846a83bd508d5ff09fd35c06496f5ba5c3371182f98829abdad264ed95a8ddf6a28404be5f5d8b78d269164f4172a03af78f0c4 WHIRLPOOL e9a6485cd3d8cd0f782536879cc02cad9d01fb75a11ac0398dac91a9e4babc809bef2003387615711347b2d567b73fe2760807390696570ba95d02d52e5a28ba |
43 |
+AUX eblits/pkg_postinst.eblit 971 SHA256 abcb925bb0730d1eae22bbcee7a4ba6523280390f410f38bfdf9eb44e0280000 SHA512 65e577c77a9a488c5e93ccd4afa325ab7e3904df594c13fda17136c8aa2748fa4e6d0102f4799b4ac9b8c3bea9920faadc4db356ece9929ee708bbfa9151dfc2 WHIRLPOOL fb3cdfb702b0ce616064f94321b9225a53b300f76d95495098b6c97eb3ab1650ea2d323eae169bb8d1fd8795134aacb5c54ba6927fe743b01f124aec416b15a0 |
44 |
+AUX eblits/pkg_preinst.eblit 2076 SHA256 1d2f3107f463baf916378ea1b6079ef4d03983e1dc01fb7ce551f94c457992b8 SHA512 78fde8ac1338029c7e66ac592044ad797fa7771dfdb8ed21ab681bb3ce5d9778a960b8606cdb7d35f6ace0188d0053dfab29a9e31b1d0051a2f2170c9449d368 WHIRLPOOL 474b8e6883dccd735808bd4f8c0cf42b619c01c2c55a80c2eeff4bdf4716cd706c834bed2a919350fc339f0b8b61c8ba94c342df5736332f32b40ba3155075b6 |
45 |
+AUX eblits/pkg_pretend.eblit 4990 SHA256 219947e495090b640ec6229b028299edc3f06ee81a130211cf91803923ccf477 SHA512 cb27a05b798ec892576239d6146403f2430c9568faad410f42933610c83c60317bcd79198be4ff9b6c08f9e13b3e0ea897a9ddb8613ccc75975fa227e3c9e26d WHIRLPOOL 613f1920a3d8f51fc6274f73d72cc2be1f3df8b5f2d5af173d050142cbea8b52da4eabe50ba28192af2f2a62c259d512d466b33b303a16648cc82e6422904ba7 |
46 |
+AUX eblits/pkg_setup.eblit 275 SHA256 c5de97dc69d3508555ac579e14ead694a75edf4707c1749219677ebee88ca9ab SHA512 627740976e372842b09034b79f61f5cb5d8283f47c94cfe66b2aa1517c901df0bf3b456f1ba26a9ddc0aa0215190d0415ed4f881cc950d163d8203a0e6bba2a9 WHIRLPOOL 16ef3155b35671311443f4c231c1867d12731035aa603dedb6e86eabdc1501c67183474a26bb06048e12c19ac3bda054fdb8a107792a3dddb743b6dc7d447339 |
47 |
+AUX eblits/src_compile.eblit 598 SHA256 3b90a6f44d307b92cee36fdd91d412bdb9fcbab555e6c6bf8174c8e3f29137ca SHA512 ee216aa3bb13f75313d141459acb47523442addf12a6bb8d829ca40eda4f63324911a13ff0ae90fe6eed1fbe0058c89308a2205c5357a0e1897a89573fea2f51 WHIRLPOOL 3bfc5406e794ee9ee4005e97aa2d40a82d77de090c72767d6b43be6993048536b4f2442bf6864157d036e7ea3fce6ba6537a97cd2afee04c61f9e98e1adc3c00 |
48 |
+AUX eblits/src_configure.eblit 8252 SHA256 0a7dc30cd01127f5c515bf82f4e0329a049a2bbda33d1c0144637c497861810d SHA512 f3d4885e36fba410ce47d6db26289a38beff6aa6de4098cfb80899779218bc976214823ebbad0fd1c2a667aa8e0adf609246629e996f2284b12d834d7f21e497 WHIRLPOOL 40ee39374ec084a91957107b615d4ae7e19f0fe5d273546e30f4d609f70701d6caf351b52a4828ec1c6a8bb54df0dfefc3216d08a4affcfc2b82d57c0e3c4715 |
49 |
+AUX eblits/src_install.eblit 7826 SHA256 1315570d5f1662c75aa0ff0b012d57e54b550f2ef6dc5a78607f163f90821e7c SHA512 83eb3e5817f587f94a7b9aaa91e56ea6c27040c4c4189659899edac8c82d92766804ec86fe9a4bf5de8ad9ce72e78fe7578234d97e3ea47820c2b52ca162df16 WHIRLPOOL dbaebcd7fb8dff629fbe702a116e4096a4e20ec8e763f495e4733fbccd4efbe4454c9ae5a90d82e65fe138734ad00acb13da76ac7f23a7c158645fbfed662a59 |
50 |
+AUX eblits/src_prepare.eblit 2231 SHA256 02e28094bb57137d0f12031dc3ed75d022df711847904f428ffea2e0bc42b778 SHA512 967e831a0390c2fb328cb69a75489f3ecddf2a3aecd3d8b95e8ef36fdced3b0b15a320245cd1274e5bf78bc49a17a862fe4af26f610c3f864418c707e7d6150a WHIRLPOOL 4855e3979903daa6b4586d5bed08a1f7806c03b9873f4b51a0b6b73254bb40eb08cb0e6329992f663f98907e8d82f485ee7f49ee4f82fd52dbfe880f8dd1fe70 |
51 |
+AUX eblits/src_test.eblit 698 SHA256 96b044ef9a27c2591b2a440b45bd89989022d0b41c546ce4dcea58a631315bf4 SHA512 0a46dddf53ccbfaab3f85ba7d2e8f202b4d5be98052601686592eca0ec115de29d8cb1f324ba12dcb77f3a8d4bbb39032532042b8adf809a772ebcc845b1a152 WHIRLPOOL 42af8b97859789b52a5a0c100ba109d8c3dd47532ef3f0b764c95b7a61be9d293d99de25e601dacd840c0a4cc921740b5acc2a3567b5aa3ae8ac6f88430ccf04 |
52 |
+AUX eblits/src_unpack.eblit 3096 SHA256 f0934fe81278797a0625fde2518f5bdf8531c75443ed3dc6ba7d18aa751cb235 SHA512 6fb32f854920ac4c0df5d60d334f4b9376b05d9b2df7d1bfac979acc3d7c282846fcce36c9816558ee75db030c3551b95f2ff26e53ea166adf97a2ae5db55abf WHIRLPOOL cee004cf4967f0b073f56ef5bbc67e56981f109400622f70cfba51ce120115f4c25ee7696a5b9baf7b22080d01d038ea936d5c342d65b7331b3801510a509123 |
53 |
AUX nscd 1621 SHA256 6165db3a2fcb251d4f3655c0461e018ce9c92a37f7f22a8fd2b75178b5435bc8 SHA512 3e1255ab014b3806112120000c3d2189a7c1c69dcd6639d5ce55e96bec721683a22b141982f6a6c6d44b14481c33fbbaa470863bef04e9b9eab7ccad1ddd5d95 WHIRLPOOL b7152f8d888fca13a16ea403c44eadbf1da2249dae3add11f73999259061824460a5479aa7e58c012bd737b62ecc81814109832cee33638279d90d4c08bfdbdc |
54 |
AUX nscd.service 337 SHA256 de7bc9946309d34f0ab44aa22a4d3cf259fe91c57e8000d741cb09ecd3a6caa0 SHA512 2001100f3b054843c69b6fd2d38852c7c824282aa8998c25a3c0352db993705429d25c70d8ce6cb3579f836b7089644c520acac423ebd69cb1b36e94a77c5bea WHIRLPOOL f01d191971b0dc45f541c9ebaaa1a40f3497e2cc838cff6a20a7b1828d726c248abbd94322a5a5ff30c33ddb7d9086cd4d2ba3bdc1811fed59ff292ef3983a72 |
55 |
AUX nscd.tmpfilesd 111 SHA256 f0f64c4612d2097173854d2ec2e94ecbf4b77c7a6e94d950874e37346aa90d72 SHA512 53b80b331e1a85d8ee16eb2ce547a7249e944926c3d1cdd4a47a5301a5c842ffc7ec1e3dc0a731542a8facf8261c1c57121802d01741aa89898a3476c09da340 WHIRLPOOL cf1fed1a7e2ac1623a84f1cfa2062645afe3f791da2f4ace3859d12aa05df0e282b4c2e367a460015956ac2a8d01fee4cda84917a3adf2c38561dff200335270 |
56 |
|
57 |
diff --git a/sys-libs/glibc/files/eblits/common.eblit b/sys-libs/glibc/files/eblits/common.eblit |
58 |
index bb2ef63..66ce76d 100644 |
59 |
--- a/sys-libs/glibc/files/eblits/common.eblit |
60 |
+++ b/sys-libs/glibc/files/eblits/common.eblit |
61 |
@@ -1,6 +1,5 @@ |
62 |
-# Copyright 1999-2014 Gentoo Foundation |
63 |
+# Copyright 1999-2015 Gentoo Foundation |
64 |
# Distributed under the terms of the GNU General Public License v2 |
65 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.45 2014/10/18 23:09:51 vapier Exp $ |
66 |
|
67 |
: ${TPREFIX:=$(is_crosscompile && echo "" || echo ${EPREFIX})} |
68 |
|
69 |
@@ -15,6 +14,8 @@ |
70 |
# -------------------+-----------------------------+--------------+---------+----------------------- |
71 |
# ebuild helper ED/ /usr/CTARGET/TPREFIX /usr/CTARGET NULL $(alt_prefix) |
72 |
alt_prefix() { |
73 |
+# $Id$ |
74 |
+ |
75 |
if is_crosscompile; then |
76 |
[[ $1 == root ]] && echo -n ${EPREFIX} |
77 |
echo -n /usr/${CTARGET} |
78 |
@@ -74,6 +75,13 @@ setup_target_flags() { |
79 |
case $(tc-arch) in |
80 |
x86) |
81 |
# -march needed for #185404 #199334 |
82 |
+ # TODO: When creating the first glibc cross-compile, this test will |
83 |
+ # always fail as it does a full link which in turn requires glibc. |
84 |
+ # Probably also applies when changing multilib profile settings (e.g. |
85 |
+ # enabling x86 when the profile was amd64-only previously). |
86 |
+ # We could change main to _start and pass -nostdlib here so that we |
87 |
+ # only test the gcc code compilation. Or we could do a compile and |
88 |
+ # then look for the symbol via scanelf. |
89 |
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 |
90 |
local t=${CTARGET_OPT:-${CTARGET}} |
91 |
t=${t%%-*} |
92 |
@@ -84,9 +92,15 @@ setup_target_flags() { |
93 |
;; |
94 |
amd64) |
95 |
# -march needed for #185404 #199334 |
96 |
+ # Note: This test only matters when the x86 ABI is enabled, so we could |
97 |
+ # optimize a bit and elide it. |
98 |
+ # TODO: See cross-compile issues listed above for x86. |
99 |
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 |
100 |
local t=${CTARGET_OPT:-${CTARGET}} |
101 |
t=${t%%-*} |
102 |
+ # Normally the target is x86_64-xxx, so turn that into the -march that |
103 |
+ # gcc actually accepts. #528708 |
104 |
+ [[ ${t} == "x86_64" ]] && t="x86-64" |
105 |
filter-flags '-march=*' |
106 |
# ugly, ugly, ugly. ugly. |
107 |
CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}") |
108 |
@@ -94,6 +108,10 @@ setup_target_flags() { |
109 |
einfo "Auto adding -march=${t} to CFLAGS_x86 #185404" |
110 |
fi |
111 |
;; |
112 |
+ mips) |
113 |
+ # The mips abi cannot support the GNU style hashes. #233233 |
114 |
+ filter-ldflags -Wl,--hash-style=gnu -Wl,--hash-style=both |
115 |
+ ;; |
116 |
ppc) |
117 |
append-flags "-freorder-blocks" |
118 |
;; |
119 |
@@ -101,62 +119,82 @@ setup_target_flags() { |
120 |
# Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. |
121 |
filter-flags "-fcall-used-g7" |
122 |
append-flags "-fcall-used-g6" |
123 |
- filter-flags "-mvis" |
124 |
- |
125 |
- GLIBCMAJOR=$(get_version_component_range 1 ${PV}) |
126 |
- GLIBCMINOR=$(get_version_component_range 2 ${PV}) |
127 |
- |
128 |
- # set CTARGET_OPT so glibc can use cpu-specific .S files for better performance |
129 |
- # - UltraSPARC T1 (niagara) support requires >= glibc 2.8 |
130 |
- # - UltraSPARC T2 (niagara2) support requires >= glibc 2.7 |
131 |
- |
132 |
- if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then |
133 |
- case ${ABI}:${CTARGET} in |
134 |
- sparc64:*|\ |
135 |
- default:sparc64*) |
136 |
- filter-flags -Wa,-xarch -Wa,-A |
137 |
- |
138 |
- if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then |
139 |
- CTARGET_OPT="sparc64v2-unknown-linux-gnu" |
140 |
- append-flags "-Wa,-xarch=v9b" |
141 |
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b" |
142 |
- elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then |
143 |
- CTARGET_OPT="sparc64v-unknown-linux-gnu" |
144 |
- append-flags "-Wa,-xarch=v9b" |
145 |
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b" |
146 |
- elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then |
147 |
- CTARGET_OPT="sparc64b-unknown-linux-gnu" |
148 |
- append-flags "-Wa,-xarch=v9b" |
149 |
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b" |
150 |
- else |
151 |
- CTARGET_OPT="sparc64-unknown-linux-gnu" |
152 |
- append-flags "-Wa,-xarch=v9a" |
153 |
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a" |
154 |
- fi |
155 |
+ |
156 |
+ # If the CHOST is the basic one (e.g. not sparcv9-xxx already), |
157 |
+ # try to pick a better one so glibc can use cpu-specific .S files. |
158 |
+ # We key off the CFLAGS to get a good value. Also need to handle |
159 |
+ # version skew. |
160 |
+ # We can't force users to set their CHOST to their exact machine |
161 |
+ # as many of these are not recognized by config.sub/gcc and such :(. |
162 |
+ # Note: If the mcpu values don't scale, we might try probing CPP defines. |
163 |
+ # Note: Should we factor in -Wa,-AvXXX flags too ? Or -mvis/etc... ? |
164 |
+ |
165 |
+ local cpu |
166 |
+ case ${CTARGET} in |
167 |
+ sparc64-*) |
168 |
+ case $(get-flag mcpu) in |
169 |
+ niagara[234]) |
170 |
+ if version_is_at_least 2.8 ; then |
171 |
+ cpu="sparc64v2" |
172 |
+ elif version_is_at_least 2.4 ; then |
173 |
+ cpu="sparc64v" |
174 |
+ elif version_is_at_least 2.2.3 ; then |
175 |
+ cpu="sparc64b" |
176 |
+ fi |
177 |
;; |
178 |
- *) |
179 |
- if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then |
180 |
- CTARGET_OPT="sparcv9v2-unknown-linux-gnu" |
181 |
- elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then |
182 |
- CTARGET_OPT="sparcv9v-unknown-linux-gnu" |
183 |
- elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then |
184 |
- CTARGET_OPT="sparcv9b-unknown-linux-gnu" |
185 |
- else |
186 |
- CTARGET_OPT="sparcv9-unknown-linux-gnu" |
187 |
- fi |
188 |
+ niagara) |
189 |
+ if version_is_at_least 2.4 ; then |
190 |
+ cpu="sparc64v" |
191 |
+ elif version_is_at_least 2.2.3 ; then |
192 |
+ cpu="sparc64b" |
193 |
+ fi |
194 |
+ ;; |
195 |
+ ultrasparc3) |
196 |
+ cpu="sparc64b" |
197 |
+ ;; |
198 |
+ *) |
199 |
+ # We need to force at least v9a because the base build doesn't |
200 |
+ # work with just v9. |
201 |
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=19477 |
202 |
+ [[ -z ${cpu} ]] && append-flags "-Wa,-xarch=v9a" |
203 |
;; |
204 |
esac |
205 |
- else |
206 |
- if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then |
207 |
- CTARGET_OPT="sparcv9v2-unknown-linux-gnu" |
208 |
- elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then |
209 |
- CTARGET_OPT="sparcv9v-unknown-linux-gnu" |
210 |
- elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then |
211 |
- CTARGET_OPT="sparcv9b-unknown-linux-gnu" |
212 |
- elif { is_crosscompile && want_nptl; } || is-flagq "-mcpu=ultrasparc2" || is-flagq "-mcpu=ultrasparc"; then |
213 |
- CTARGET_OPT="sparcv9-unknown-linux-gnu" |
214 |
- fi |
215 |
- fi |
216 |
+ ;; |
217 |
+ sparc-*) |
218 |
+ case $(get-flag mcpu) in |
219 |
+ niagara[234]) |
220 |
+ if version_is_at_least 2.8 ; then |
221 |
+ cpu="sparcv9v2" |
222 |
+ elif version_is_at_least 2.4 ; then |
223 |
+ cpu="sparcv9v" |
224 |
+ elif version_is_at_least 2.2.3 ; then |
225 |
+ cpu="sparcv9b" |
226 |
+ else |
227 |
+ cpu="sparcv9" |
228 |
+ fi |
229 |
+ ;; |
230 |
+ niagara) |
231 |
+ if version_is_at_least 2.4 ; then |
232 |
+ cpu="sparcv9v" |
233 |
+ elif version_is_at_least 2.2.3 ; then |
234 |
+ cpu="sparcv9b" |
235 |
+ else |
236 |
+ cpu="sparcv9" |
237 |
+ fi |
238 |
+ ;; |
239 |
+ ultrasparc3) |
240 |
+ cpu="sparcv9b" |
241 |
+ ;; |
242 |
+ v9|ultrasparc) |
243 |
+ cpu="sparcv9" |
244 |
+ ;; |
245 |
+ v8|supersparc|hypersparc|leon|leon3) |
246 |
+ cpu="sparcv8" |
247 |
+ ;; |
248 |
+ esac |
249 |
+ ;; |
250 |
+ esac |
251 |
+ [[ -n ${cpu} ]] && CTARGET_OPT="${cpu}-${CTARGET#*-}" |
252 |
;; |
253 |
esac |
254 |
} |
255 |
|
256 |
diff --git a/sys-libs/glibc/files/eblits/pkg_postinst.eblit b/sys-libs/glibc/files/eblits/pkg_postinst.eblit |
257 |
index 10bed71..8178fa1 100644 |
258 |
--- a/sys-libs/glibc/files/eblits/pkg_postinst.eblit |
259 |
+++ b/sys-libs/glibc/files/eblits/pkg_postinst.eblit |
260 |
@@ -1,6 +1,6 @@ |
261 |
# Copyright 1999-2012 Gentoo Foundation |
262 |
# Distributed under the terms of the GNU General Public License v2 |
263 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_postinst.eblit,v 1.2 2012/04/15 20:04:44 vapier Exp $ |
264 |
+# $Id$ |
265 |
|
266 |
eblit-glibc-pkg_postinst() { |
267 |
# nothing to do if just installing headers |
268 |
|
269 |
diff --git a/sys-libs/glibc/files/eblits/pkg_preinst.eblit b/sys-libs/glibc/files/eblits/pkg_preinst.eblit |
270 |
index e454452..0c78b55 100644 |
271 |
--- a/sys-libs/glibc/files/eblits/pkg_preinst.eblit |
272 |
+++ b/sys-libs/glibc/files/eblits/pkg_preinst.eblit |
273 |
@@ -1,6 +1,6 @@ |
274 |
-# Copyright 1999-2014 Gentoo Foundation |
275 |
+# Copyright 1999-2015 Gentoo Foundation |
276 |
# Distributed under the terms of the GNU General Public License v2 |
277 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_preinst.eblit,v 1.13 2014/08/10 03:35:56 vapier Exp $ |
278 |
+# $Id$ |
279 |
|
280 |
# Simple test to make sure our new glibc isnt completely broken. |
281 |
# Make sure we don't test with statically built binaries since |
282 |
@@ -29,6 +29,9 @@ glibc_sanity_check() { |
283 |
*"statically linked"*) continue;; |
284 |
*"ASCII text"*) continue;; |
285 |
esac |
286 |
+ # We need to clear the locale settings as the upgrade might want |
287 |
+ # incompatible locale data. This test is not for verifying that. |
288 |
+ LC_ALL=C \ |
289 |
./ld-*.so --library-path . ${x} > /dev/null \ |
290 |
|| die "simple run test (${x}) failed" |
291 |
done |
292 |
@@ -53,17 +56,8 @@ eblit-glibc-pkg_preinst() { |
293 |
[[ -d ${ED}/$(get_libdir) ]] || return 0 |
294 |
glibc_sanity_check |
295 |
|
296 |
- # Make sure devpts is mounted correctly for use w/out setuid pt_chown. |
297 |
- if in_iuse suid && ! use suid ; then |
298 |
- if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then |
299 |
- eerror "In order to use glibc with USE=-suid, you must make sure that" |
300 |
- eerror "you have devpts mounted at /dev/pts with the gid=5 option." |
301 |
- eerror "Openrc should do this for you, so you should check /etc/fstab" |
302 |
- eerror "and make sure you do not have any invalid settings there." |
303 |
- # Do not die on older kernels as devpts did not export these settings #489520. |
304 |
- if version_is_at_least 2.6.25 $(uname -r) ; then |
305 |
- die "mount & fix your /dev/pts settings" |
306 |
- fi |
307 |
- fi |
308 |
+ # For newer EAPIs, this was run in pkg_pretend. |
309 |
+ if [[ ${EAPI:-0} == [0123] ]] ; then |
310 |
+ check_devpts |
311 |
fi |
312 |
} |
313 |
|
314 |
diff --git a/sys-libs/glibc/files/eblits/pkg_setup.eblit b/sys-libs/glibc/files/eblits/pkg_pretend.eblit |
315 |
similarity index 75% |
316 |
copy from sys-libs/glibc/files/eblits/pkg_setup.eblit |
317 |
copy to sys-libs/glibc/files/eblits/pkg_pretend.eblit |
318 |
index bd5b093..c900ccc 100644 |
319 |
--- a/sys-libs/glibc/files/eblits/pkg_setup.eblit |
320 |
+++ b/sys-libs/glibc/files/eblits/pkg_pretend.eblit |
321 |
@@ -1,6 +1,6 @@ |
322 |
-# Copyright 1999-2014 Gentoo Foundation |
323 |
+# Copyright 1999-2015 Gentoo Foundation |
324 |
# Distributed under the terms of the GNU General Public License v2 |
325 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.14 2014/10/17 17:30:04 vapier Exp $ |
326 |
+# $Id$ |
327 |
|
328 |
glibc_compile_test() { |
329 |
local ret save_cflags=${CFLAGS} |
330 |
@@ -45,7 +45,39 @@ glibc_run_test() { |
331 |
return ${ret} |
332 |
} |
333 |
|
334 |
-eblit-glibc-pkg_setup() { |
335 |
+check_devpts() { |
336 |
+ # Make sure devpts is mounted correctly for use w/out setuid pt_chown. |
337 |
+ |
338 |
+ # If merely building the binary package, then there's nothing to verify. |
339 |
+ [[ ${MERGE_TYPE} == "buildonly" ]] && return |
340 |
+ |
341 |
+ # Only sanity check when installing the native glibc. |
342 |
+ [[ ${ROOT} != "/" ]] && return |
343 |
+ |
344 |
+ # Older versions always installed setuid, so no need to check. |
345 |
+ in_iuse suid || return |
346 |
+ |
347 |
+ # If they're opting in to the old suid code, then no need to check. |
348 |
+ use suid && return |
349 |
+ |
350 |
+ if awk '$3 == "devpts" && $4 ~ /[, ]gid=5[, ]/ { exit 1 }' /proc/mounts ; then |
351 |
+ eerror "In order to use glibc with USE=-suid, you must make sure that" |
352 |
+ eerror "you have devpts mounted at /dev/pts with the gid=5 option." |
353 |
+ eerror "Openrc should do this for you, so you should check /etc/fstab" |
354 |
+ eerror "and make sure you do not have any invalid settings there." |
355 |
+ # Do not die on older kernels as devpts did not export these settings #489520. |
356 |
+ if version_is_at_least 2.6.25 $(uname -r) ; then |
357 |
+ die "mount & fix your /dev/pts settings" |
358 |
+ fi |
359 |
+ fi |
360 |
+} |
361 |
+ |
362 |
+eblit-glibc-pkg_pretend() { |
363 |
+ # For older EAPIs, this is run in pkg_preinst. |
364 |
+ if [[ ${EAPI:-0} != [0123] ]] ; then |
365 |
+ check_devpts |
366 |
+ fi |
367 |
+ |
368 |
# prevent native builds from downgrading ... maybe update to allow people |
369 |
# to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2) |
370 |
if [[ ${MERGE_TYPE} != "buildonly" ]] && \ |
371 |
|
372 |
diff --git a/sys-libs/glibc/files/eblits/pkg_setup.eblit b/sys-libs/glibc/files/eblits/pkg_setup.eblit |
373 |
index bd5b093..2aff258 100644 |
374 |
--- a/sys-libs/glibc/files/eblits/pkg_setup.eblit |
375 |
+++ b/sys-libs/glibc/files/eblits/pkg_setup.eblit |
376 |
@@ -1,125 +1,9 @@ |
377 |
-# Copyright 1999-2014 Gentoo Foundation |
378 |
+# Copyright 1999-2015 Gentoo Foundation |
379 |
# Distributed under the terms of the GNU General Public License v2 |
380 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.14 2014/10/17 17:30:04 vapier Exp $ |
381 |
+# $Id$ |
382 |
|
383 |
-glibc_compile_test() { |
384 |
- local ret save_cflags=${CFLAGS} |
385 |
- CFLAGS+=" $1" |
386 |
- shift |
387 |
- |
388 |
- pushd "${T}" >/dev/null |
389 |
- |
390 |
- rm -f glibc-test* |
391 |
- printf '%b' "$*" > glibc-test.c |
392 |
- |
393 |
- _nonfatal emake -s glibc-test |
394 |
- ret=$? |
395 |
- |
396 |
- popd >/dev/null |
397 |
- |
398 |
- CFLAGS=${save_cflags} |
399 |
- return ${ret} |
400 |
-} |
401 |
- |
402 |
-glibc_run_test() { |
403 |
- local ret |
404 |
- |
405 |
- if [[ ${EMERGE_FROM} == "binary" ]] ; then |
406 |
- # ignore build failures when installing a binary package #324685 |
407 |
- glibc_compile_test "" "$@" 2>/dev/null || return 0 |
408 |
- else |
409 |
- if ! glibc_compile_test "" "$@" ; then |
410 |
- ewarn "Simple build failed ... assuming this is desired #324685" |
411 |
- return 0 |
412 |
- fi |
413 |
- fi |
414 |
- |
415 |
- pushd "${T}" >/dev/null |
416 |
- |
417 |
- ./glibc-test |
418 |
- ret=$? |
419 |
- rm -f glibc-test* |
420 |
- |
421 |
- popd >/dev/null |
422 |
- |
423 |
- return ${ret} |
424 |
-} |
425 |
+[[ ${EAPI:-0} == [0123] ]] && source "${FILESDIR}/eblits/pkg_pretend.eblit" |
426 |
|
427 |
eblit-glibc-pkg_setup() { |
428 |
- # prevent native builds from downgrading ... maybe update to allow people |
429 |
- # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2) |
430 |
- if [[ ${MERGE_TYPE} != "buildonly" ]] && \ |
431 |
- [[ ${ROOT} == "/" ]] && \ |
432 |
- [[ ${CBUILD} == ${CHOST} ]] && \ |
433 |
- [[ ${CHOST} == ${CTARGET} ]] ; then |
434 |
- if has_version '>'${CATEGORY}/${PF} ; then |
435 |
- eerror "Sanity check to keep you from breaking your system:" |
436 |
- eerror " Downgrading glibc is not supported and a sure way to destruction" |
437 |
- die "aborting to save your system" |
438 |
- fi |
439 |
- |
440 |
- if ! glibc_run_test '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n' |
441 |
- then |
442 |
- eerror "Your patched vendor kernel is broken. You need to get an" |
443 |
- eerror "update from whoever is providing the kernel to you." |
444 |
- eerror "http://sourceware.org/bugzilla/show_bug.cgi?id=5227" |
445 |
- eerror "http://bugs.gentoo.org/262698" |
446 |
- die "keeping your system alive, say thank you" |
447 |
- fi |
448 |
- |
449 |
- if ! glibc_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n' |
450 |
- then |
451 |
- eerror "Your old kernel is broken. You need to update it to" |
452 |
- eerror "a newer version as syscall(<bignum>) will break." |
453 |
- eerror "http://bugs.gentoo.org/279260" |
454 |
- die "keeping your system alive, say thank you" |
455 |
- fi |
456 |
- fi |
457 |
- |
458 |
- # users have had a chance to phase themselves, time to give em the boot |
459 |
- if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then |
460 |
- eerror "You still haven't deleted ${EROOT}/etc/locales.build." |
461 |
- eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher." |
462 |
- die "lazy upgrader detected" |
463 |
- fi |
464 |
- |
465 |
- if [[ ${CTARGET} == i386-* ]] ; then |
466 |
- eerror "i386 CHOSTs are no longer supported." |
467 |
- eerror "Chances are you don't actually want/need i386." |
468 |
- eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml" |
469 |
- die "please fix your CHOST" |
470 |
- fi |
471 |
- |
472 |
- if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then |
473 |
- ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." |
474 |
- ewarn "This will result in a 50% performance penalty when running with a 32bit" |
475 |
- ewarn "hypervisor, which is probably not what you want." |
476 |
- fi |
477 |
- |
478 |
- use hardened && ! gcc-specs-pie && \ |
479 |
- ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" |
480 |
- |
481 |
- # Make sure host system is up to date #394453 |
482 |
- if has_version '<sys-libs/glibc-2.13' && \ |
483 |
- [[ -n $(scanelf -qys__guard -F'#s%F' "${EROOT}"/lib*/l*-*.so) ]] |
484 |
- then |
485 |
- ebegin "Scanning system for __guard to see if you need to rebuild first ..." |
486 |
- local files=$( |
487 |
- scanelf -qys__guard -F'#s%F' \ |
488 |
- "${EROOT}"/*bin/ \ |
489 |
- "${EROOT}"/lib* \ |
490 |
- "${EROOT}"/usr/*bin/ \ |
491 |
- "${EROOT}"/usr/lib* | \ |
492 |
- egrep -v \ |
493 |
- -e "^${EROOT}/lib.*/(libc|ld)-2.*.so$" \ |
494 |
- -e "^${EROOT}/sbin/(ldconfig|sln)$" |
495 |
- ) |
496 |
- [[ -z ${files} ]] |
497 |
- if ! eend $? ; then |
498 |
- eerror "Your system still has old SSP __guard symbols. You need to" |
499 |
- eerror "rebuild all the packages that provide these files first:" |
500 |
- eerror "${files}" |
501 |
- die "old __guard detected" |
502 |
- fi |
503 |
- fi |
504 |
+ [[ ${EAPI:-0} == [0123] ]] && eblit-glibc-pkg_pretend |
505 |
} |
506 |
|
507 |
diff --git a/sys-libs/glibc/files/eblits/src_compile.eblit b/sys-libs/glibc/files/eblits/src_compile.eblit |
508 |
index 7704d83..7a38b3e 100644 |
509 |
--- a/sys-libs/glibc/files/eblits/src_compile.eblit |
510 |
+++ b/sys-libs/glibc/files/eblits/src_compile.eblit |
511 |
@@ -1,6 +1,6 @@ |
512 |
# Copyright 1999-2014 Gentoo Foundation |
513 |
# Distributed under the terms of the GNU General Public License v2 |
514 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.45 2014/09/10 18:45:21 vapier Exp $ |
515 |
+# $Id$ |
516 |
|
517 |
[[ ${EAPI:-0} == [01] ]] && source "${FILESDIR}/eblits/src_configure.eblit" |
518 |
|
519 |
|
520 |
diff --git a/sys-libs/glibc/files/eblits/src_configure.eblit b/sys-libs/glibc/files/eblits/src_configure.eblit |
521 |
index 72f39ea..5b50a53 100644 |
522 |
--- a/sys-libs/glibc/files/eblits/src_configure.eblit |
523 |
+++ b/sys-libs/glibc/files/eblits/src_configure.eblit |
524 |
@@ -1,6 +1,6 @@ |
525 |
-# Copyright 1999-2014 Gentoo Foundation |
526 |
+# Copyright 1999-2015 Gentoo Foundation |
527 |
# Distributed under the terms of the GNU General Public License v2 |
528 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_configure.eblit,v 1.2 2014/09/18 16:48:15 vapier Exp $ |
529 |
+# $Id$ |
530 |
|
531 |
dump_toolchain_settings() { |
532 |
echo |
533 |
@@ -8,23 +8,20 @@ dump_toolchain_settings() { |
534 |
einfo "$*" |
535 |
|
536 |
local v |
537 |
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC {AS,C,CPP,CXX,LD}FLAGS ; do |
538 |
+ for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC LD {AS,C,CPP,CXX,LD}FLAGS ; do |
539 |
einfo " $(printf '%15s' ${v}:) ${!v}" |
540 |
done |
541 |
|
542 |
- export CC=$(tc-getCC ${CTARGET}) |
543 |
- # Glibc does not work with gold (for various reasons) #269274. |
544 |
- if $(tc-getLD ${CTARGET}) --version | grep -q 'GNU gold' ; then |
545 |
- local d="${T}/bfd-linker" |
546 |
- mkdir -p "${d}" |
547 |
- ln -sf $(which ${CTARGET}-ld.bfd) "${d}"/ld |
548 |
- CC+=" -B${d}" |
549 |
- fi |
550 |
+ # The glibc configure script doesn't properly use LDFLAGS all the time. |
551 |
+ export CC="$(tc-getCC ${CTARGET}) ${LDFLAGS}" |
552 |
einfo " $(printf '%15s' 'Manual CC:') ${CC}" |
553 |
echo |
554 |
} |
555 |
|
556 |
glibc_do_configure() { |
557 |
+ # Glibc does not work with gold (for various reasons) #269274. |
558 |
+ tc-ld-disable-gold |
559 |
+ |
560 |
dump_toolchain_settings "Configuring glibc for $1" |
561 |
|
562 |
local myconf=() |
563 |
@@ -101,6 +98,7 @@ glibc_do_configure() { |
564 |
|
565 |
myconf+=( |
566 |
--without-cvs |
567 |
+ --disable-werror |
568 |
--enable-bind-now |
569 |
--build=${CBUILD_OPT:-${CBUILD}} |
570 |
--host=${CTARGET_OPT:-${CTARGET}} |
571 |
@@ -117,12 +115,21 @@ glibc_do_configure() { |
572 |
--with-bugurl=http://bugs.gentoo.org/ |
573 |
--with-pkgversion="$(glibc_banner)" |
574 |
$(use_multiarch || echo --disable-multi-arch) |
575 |
- --enable-obsolete-rpc |
576 |
+ $(in_iuse rpc && use_enable rpc obsolete-rpc || echo --enable-obsolete-rpc) |
577 |
$(in_iuse systemtap && use_enable systemtap) |
578 |
$(in_iuse nscd && use_enable nscd) |
579 |
${EXTRA_ECONF} |
580 |
) |
581 |
|
582 |
+ # We rely on sys-libs/timezone-data for timezone tools normally. |
583 |
+ if version_is_at_least 2.23 ; then |
584 |
+ myconf+=( $(use_enable vanilla timezone-tools) ) |
585 |
+ fi |
586 |
+ |
587 |
+ # These libs don't have configure flags. |
588 |
+ ac_cv_lib_audit_audit_log_user_avc_message=$(in_iuse audit && usex audit || echo no) |
589 |
+ ac_cv_lib_cap_cap_init=$(in_iuse caps && usex caps || echo no) |
590 |
+ |
591 |
# There is no configure option for this and we need to export it |
592 |
# since the glibc build will re-run configure on itself |
593 |
export libc_cv_slibdir=${TPREFIX}/$(get_libdir) |
594 |
@@ -204,6 +211,9 @@ toolchain-glibc_headers_configure() { |
595 |
libc_cv_z_relro=yes |
596 |
libc_mips_abi=${ABI} |
597 |
libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard) |
598 |
+ # These libs don't have configure flags. |
599 |
+ ac_cv_lib_audit_audit_log_user_avc_message=no |
600 |
+ ac_cv_lib_cap_cap_init=no |
601 |
) |
602 |
einfo "Forcing cached settings:" |
603 |
for v in "${vars[@]}" ; do |
604 |
@@ -211,14 +221,20 @@ toolchain-glibc_headers_configure() { |
605 |
export ${v} |
606 |
done |
607 |
|
608 |
- # Pick out the correct location for build headers |
609 |
- local ports="" myconf=() |
610 |
- [[ -d ${S}/ports ]] && ports=",ports" |
611 |
+ # Blow away some random CC settings that screw things up. #550192 |
612 |
+ if [[ -d ${S}/sysdeps/mips ]]; then |
613 |
+ pushd "${S}"/sysdeps/mips >/dev/null |
614 |
+ sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die |
615 |
+ sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die |
616 |
+ popd >/dev/null |
617 |
+ fi |
618 |
+ |
619 |
+ local myconf=() |
620 |
myconf+=( |
621 |
--disable-sanity-checks |
622 |
--enable-hacker-mode |
623 |
- --enable-add-ons=nptl${ports} |
624 |
--without-cvs |
625 |
+ --disable-werror |
626 |
--enable-bind-now |
627 |
--build=${CBUILD_OPT:-${CBUILD}} |
628 |
--host=${CTARGET_OPT:-${CTARGET}} |
629 |
@@ -227,9 +243,16 @@ toolchain-glibc_headers_configure() { |
630 |
${EXTRA_ECONF} |
631 |
) |
632 |
|
633 |
+ local addons |
634 |
+ [[ -d ${S}/ports ]] && addons+=",ports" |
635 |
+ # Newer versions require nptl, so there is no addon for it. |
636 |
+ version_is_at_least 2.20 || addons+=",nptl" |
637 |
+ myconf+=( --enable-add-ons="${addons#,}" ) |
638 |
+ |
639 |
# Nothing is compiled here which would affect the headers for the target. |
640 |
# So forcing CC/CFLAGS is sane. |
641 |
set -- "${S}"/configure "${myconf[@]}" |
642 |
+ echo "$@" |
643 |
CC="$(tc-getBUILD_CC)" \ |
644 |
CFLAGS="-O1 -pipe" \ |
645 |
CPPFLAGS="-U_FORTIFY_SOURCE" \ |
646 |
@@ -238,8 +261,12 @@ toolchain-glibc_headers_configure() { |
647 |
} |
648 |
|
649 |
toolchain-glibc_src_configure() { |
650 |
- want_linuxthreads && glibc_do_configure linuxthreads |
651 |
- want_nptl && glibc_do_configure nptl |
652 |
+ if just_headers ; then |
653 |
+ toolchain-glibc_headers_configure |
654 |
+ else |
655 |
+ want_linuxthreads && glibc_do_configure linuxthreads |
656 |
+ want_nptl && glibc_do_configure nptl |
657 |
+ fi |
658 |
} |
659 |
|
660 |
eblit-glibc-src_configure() { |
661 |
|
662 |
diff --git a/sys-libs/glibc/files/eblits/src_install.eblit b/sys-libs/glibc/files/eblits/src_install.eblit |
663 |
index e46924c..7599f63 100644 |
664 |
--- a/sys-libs/glibc/files/eblits/src_install.eblit |
665 |
+++ b/sys-libs/glibc/files/eblits/src_install.eblit |
666 |
@@ -1,6 +1,6 @@ |
667 |
# Copyright 1999-2014 Gentoo Foundation |
668 |
# Distributed under the terms of the GNU General Public License v2 |
669 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.38 2014/09/10 18:15:55 vapier Exp $ |
670 |
+# $Id$ |
671 |
|
672 |
toolchain-glibc_src_install() { |
673 |
local builddir=$(builddir $(want_linuxthreads && echo linuxthreads || echo nptl)) |
674 |
|
675 |
diff --git a/sys-libs/glibc/files/eblits/src_prepare.eblit b/sys-libs/glibc/files/eblits/src_prepare.eblit |
676 |
index dc57fae..162cf53 100644 |
677 |
--- a/sys-libs/glibc/files/eblits/src_prepare.eblit |
678 |
+++ b/sys-libs/glibc/files/eblits/src_prepare.eblit |
679 |
@@ -1,6 +1,6 @@ |
680 |
# Copyright 1999-2014 Gentoo Foundation |
681 |
# Distributed under the terms of the GNU General Public License v2 |
682 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_prepare.eblit,v 1.1 2014/09/10 05:59:03 vapier Exp $ |
683 |
+# $Id$ |
684 |
|
685 |
eblit-glibc-src_prepare() { |
686 |
# XXX: We should do the branchupdate, before extracting the manpages and |
687 |
|
688 |
diff --git a/sys-libs/glibc/files/eblits/src_test.eblit b/sys-libs/glibc/files/eblits/src_test.eblit |
689 |
index 210cca3..fc5b950 100644 |
690 |
--- a/sys-libs/glibc/files/eblits/src_test.eblit |
691 |
+++ b/sys-libs/glibc/files/eblits/src_test.eblit |
692 |
@@ -1,6 +1,6 @@ |
693 |
# Copyright 1999-2014 Gentoo Foundation |
694 |
# Distributed under the terms of the GNU General Public License v2 |
695 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit,v 1.9 2014/09/17 22:53:43 vapier Exp $ |
696 |
+# $Id$ |
697 |
|
698 |
glibc_src_test() { |
699 |
cd "$(builddir $1)" |
700 |
|
701 |
diff --git a/sys-libs/glibc/files/eblits/src_unpack.eblit b/sys-libs/glibc/files/eblits/src_unpack.eblit |
702 |
index 94f33b5..8d4c740 100644 |
703 |
--- a/sys-libs/glibc/files/eblits/src_unpack.eblit |
704 |
+++ b/sys-libs/glibc/files/eblits/src_unpack.eblit |
705 |
@@ -1,6 +1,6 @@ |
706 |
# Copyright 1999-2014 Gentoo Foundation |
707 |
# Distributed under the terms of the GNU General Public License v2 |
708 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.27 2014/09/10 05:59:03 vapier Exp $ |
709 |
+# $Id$ |
710 |
|
711 |
[[ ${EAPI:-0} == [01] ]] && source "${FILESDIR}/eblits/src_prepare.eblit" |