1 |
commit: 8893df0d11de029e26b31bc3310e43ccb6b35dc3 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 1 16:47:47 2019 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 1 16:50:41 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8893df0d |
7 |
|
8 |
sys-libs/glibc: revert CPPFLAGS fix for cross-compilers |
9 |
|
10 |
In https://sourceware.org/PR24577 we discovered that riscv |
11 |
can't really install libc headers as it needs a cross-compiler. |
12 |
|
13 |
This revert reintroduces riscv bootstrap on crossdev. |
14 |
To workaround it use the -without-headers option until |
15 |
it's a crossdev's default. |
16 |
|
17 |
Bug: https://sourceware.org/PR24577 |
18 |
Bug: https://bugs.gentoo.org/692052 |
19 |
Bug: https://bugs.gentoo.org/686248 |
20 |
Package-Manager: Portage-2.3.74, Repoman-2.3.17 |
21 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
22 |
|
23 |
sys-libs/glibc/Manifest | 4 +- |
24 |
.../{glibc-9999.ebuild => glibc-2.29-r5.ebuild} | 122 +++++++++++---------- |
25 |
.../{glibc-9999.ebuild => glibc-2.30-r1.ebuild} | 81 ++++++++------ |
26 |
sys-libs/glibc/glibc-9999.ebuild | 2 +- |
27 |
4 files changed, 114 insertions(+), 95 deletions(-) |
28 |
|
29 |
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest |
30 |
index b75203288d8..e8f7dda1268 100644 |
31 |
--- a/sys-libs/glibc/Manifest |
32 |
+++ b/sys-libs/glibc/Manifest |
33 |
@@ -14,7 +14,9 @@ DIST glibc-2.28-patches-9.tar.xz 98588 BLAKE2B 4ab583be712994f949dee2512da6e12fd |
34 |
DIST glibc-2.28.tar.xz 16484344 BLAKE2B 9aa8cbd5a145c2a6fde3a60b3d0a14b12b46ed79333ad1ca3e73464adcfe700277a17a9e7fd0ca36e355a0c5b0b27decfa091da320ba802741ad75cc955bbcc8 SHA512 521f820953ff07c69ece4c2186f59fc061a7f9747932cd70ef2995c2b2deee76eeb6de700d85071cdca5949179aa8ccee75eda7feca1394121ec7b821ad0a3f3 |
35 |
DIST glibc-2.29-patches-3.tar.xz 35812 BLAKE2B 90b8bc57b7a63f03617795c368b92e525eccfec462d638dbc25c581e5b7a2a72ffd5191842f5ac443a868cbc950838d7e5120e866d343a14b80c55dcbfa48f30 SHA512 4c9b78d9d1a8aa629418f2d758ef800857780b8a1fd8d3582b88348a513ca26ca7f6ac9110a8c6bae16949b360ba36840d184f42293cd4324760273592d1b438 |
36 |
DIST glibc-2.29-patches-5.tar.xz 64032 BLAKE2B 6c3104bd80aaba617201812a631b734ded4b02f8d4dadb5e353af48692f2a1509ddae1d34098de913ae5b3ac1a29111a44dfae71c3024fab4a805a22e9d66e33 SHA512 39add1388268ecf2029cb90b8312fb610b203f459a092dc1da8b46ce91ccfbbdff235592aa6174edf9efe71039d984ee121dc9adf7e18490cf92fe24561b1267 |
37 |
+DIST glibc-2.29-patches-6.tar.xz 64076 BLAKE2B 04c1baf838eff9275e79145d4a5a642dcd6572aadcdfc6782769f2de107dcd1648b81d0690068db8c0d53229efe2130e279f4aafe8a91238e5dd6a8a7120a433 SHA512 6494dcd23441fe308de97706f7abbea1571e0015d1456e719268b8026e1fb23733c2efd5256840f4b9f0df4f02ac7827b1fad56905cbd8919bca9c25b0afe822 |
38 |
DIST glibc-2.29.tar.xz 16515488 BLAKE2B b754e6825176538a2b8ca03fce014f0d87d333dc4d038bf0cda5ee8a2f484cd3ce93ad78ec126737e093ab64b55ceedf04cd08aecb4f8041daaa329e99717afa SHA512 146bc0769fe853d9edbf93cea7f74c5b3d84d69cb7614c62588e7acdecd1ec789a9d8949f3e8b99f8f36f2ccac740a003bed94f32b07817baf780b06cfeb6ed0 |
39 |
DIST glibc-2.30-patches-1.tar.xz 19364 BLAKE2B 853ae651cf48a78796ac0a3c9c84098731d5a43b37644ee5029d2e2b06dab0d1d96b9dd7c3fd896c5513f5f712beca13845c1e24c698fe824ce0f529a2a827d4 SHA512 23065ec67b1a6302eece79da1ba731aa158a2abc0c65aed755cafea388c19aa1f545a6ea6d9db1fd128d06c6878b4c73aea07c6acc053b56bc416143e96e1c05 |
40 |
+DIST glibc-2.30-patches-2.tar.xz 19588 BLAKE2B 672343ef8a44486304f03091844635febef9d1bc8000ab3382d702dcc1111a107b5e758355beaef8db5012f7e324e4c2365e10fc642b01c9f9a3a315de2dc7f6 SHA512 494155147b56e094a4427aed79e278b4a350928ddaff84330d6a40fad079131a4574f20c591dc95e572391b68ef72c49790571ee5323a2a541ec0757bcaeb161 |
41 |
DIST glibc-2.30.tar.xz 16576920 BLAKE2B bd5aae4c9854f40785b91f83c3b632de6d48d811027ddfe61651cb1bc617db8017d7914c23a770cdd3feed06fcc316da841eea916cdba54179e7eace4ea45484 SHA512 37483990cd653685873e96c45dd1651b32b441b6d7919a68ebe3bae31a0c3f7ce183fc9b110f0b268b353f80312f18370559a1e7aecea0e5aa755c8f2aef1d6b |
42 |
-DIST glibc-9999-patches-13.tar.xz 18316 BLAKE2B c55359dda094dabfec85f53e48fcd43985d41211f29c0c3ba0d07c4ce28994f96c334c9fcc2a6b78e64123363253c701ed6e9335f4e74274c984734ac8881731 SHA512 627799f65f79e60ed3a9ba1a499d21e771f1b109934967c9fbdf3300b0c1509ef5382834e63c8ead23ffbaee80becf541da5b25e4e2cfa8f6baa801c3838c69d |
43 |
+DIST glibc-9999-patches-14.tar.xz 17908 BLAKE2B a6e1f22a4358111ff757431c5d42fd020f6095584c3517aa854ea266129d1a177a7c09b310643f1cea32ffaf253806ac08f3aed864fb477097aaa2c4010450f4 SHA512 ef28b409b26472ec1d868167345aecfee70b1edf1863374dc2f25892f40c10f0826620a8b22fbbc9f737c8f611569b3412e8e2ea041da1ad1ef7f6398b82cddc |
44 |
|
45 |
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-2.29-r5.ebuild |
46 |
similarity index 94% |
47 |
copy from sys-libs/glibc/glibc-9999.ebuild |
48 |
copy to sys-libs/glibc/glibc-2.29-r5.ebuild |
49 |
index 1075f02be79..d02d0fcb97d 100644 |
50 |
--- a/sys-libs/glibc/glibc-9999.ebuild |
51 |
+++ b/sys-libs/glibc/glibc-2.29-r5.ebuild |
52 |
@@ -1,16 +1,17 @@ |
53 |
# Copyright 1999-2019 Gentoo Authors |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
|
56 |
-EAPI=7 |
57 |
+EAPI=6 |
58 |
|
59 |
PYTHON_COMPAT=( python3_{5,6,7} ) |
60 |
|
61 |
-inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ |
62 |
+inherit python-any-r1 prefix eutils eapi7-ver toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ |
63 |
multilib systemd multiprocessing |
64 |
|
65 |
DESCRIPTION="GNU libc C library" |
66 |
HOMEPAGE="https://www.gnu.org/software/libc/" |
67 |
LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" |
68 |
+RESTRICT="strip" # Strip ourself #46186 |
69 |
SLOT="2.2" |
70 |
|
71 |
EMULTILIB_PKG="true" |
72 |
@@ -19,8 +20,7 @@ if [[ ${PV} == 9999* ]]; then |
73 |
EGIT_REPO_URI="https://sourceware.org/git/glibc.git" |
74 |
inherit git-r3 |
75 |
else |
76 |
- #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
77 |
- KEYWORDS="" |
78 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sh ~sparc ~x86" |
79 |
SRC_URI="mirror://gnu/glibc/${P}.tar.xz" |
80 |
fi |
81 |
|
82 |
@@ -29,12 +29,12 @@ RELEASE_VER=${PV} |
83 |
GCC_BOOTSTRAP_VER=20180511 |
84 |
|
85 |
# Gentoo patchset |
86 |
-PATCH_VER=13 |
87 |
+PATCH_VER=6 |
88 |
|
89 |
SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz" |
90 |
SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" |
91 |
|
92 |
-IUSE="audit caps cet compile-locales custom-cflags doc gd headers-only +multiarch multilib nscd profile selinux +ssp +static-libs suid systemtap test vanilla" |
93 |
+IUSE="audit caps cet compile-locales doc gd headers-only +multiarch multilib nscd profile selinux +ssp suid systemtap test vanilla" |
94 |
|
95 |
# Minimum kernel version that glibc requires |
96 |
MIN_KERN_VER="3.2.0" |
97 |
@@ -64,16 +64,6 @@ fi |
98 |
# We need a new-enough binutils/gcc to match upstream baseline. |
99 |
# Also we need to make sure our binutils/gcc supports TLS, |
100 |
# and that gcc already contains the hardened patches. |
101 |
-BDEPEND=" |
102 |
- ${PYTHON_DEPS} |
103 |
- >=app-misc/pax-utils-0.1.10 |
104 |
- sys-devel/bison |
105 |
- !<sys-apps/sandbox-1.6 |
106 |
- !<sys-apps/portage-2.1.2 |
107 |
- !<sys-devel/bison-2.7 |
108 |
- !<sys-devel/make-4 |
109 |
- doc? ( sys-apps/texinfo ) |
110 |
-" |
111 |
COMMON_DEPEND=" |
112 |
nscd? ( selinux? ( |
113 |
audit? ( sys-process/audit ) |
114 |
@@ -84,6 +74,14 @@ COMMON_DEPEND=" |
115 |
systemtap? ( dev-util/systemtap ) |
116 |
" |
117 |
DEPEND="${COMMON_DEPEND} |
118 |
+ ${PYTHON_DEPS} |
119 |
+ >=app-misc/pax-utils-0.1.10 |
120 |
+ sys-devel/bison |
121 |
+ !<sys-apps/sandbox-1.6 |
122 |
+ !<sys-apps/portage-2.1.2 |
123 |
+ !<sys-devel/bison-2.7 |
124 |
+ !<sys-devel/make-4 |
125 |
+ doc? ( sys-apps/texinfo ) |
126 |
test? ( >=net-dns/libidn2-2.0.5 ) |
127 |
" |
128 |
RDEPEND="${COMMON_DEPEND} |
129 |
@@ -93,17 +91,17 @@ RDEPEND="${COMMON_DEPEND} |
130 |
" |
131 |
|
132 |
if [[ ${CATEGORY} == cross-* ]] ; then |
133 |
- BDEPEND+=" !headers-only? ( |
134 |
+ DEPEND+=" !headers-only? ( |
135 |
>=${CATEGORY}/binutils-2.24 |
136 |
>=${CATEGORY}/gcc-6 |
137 |
)" |
138 |
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" |
139 |
else |
140 |
- BDEPEND+=" |
141 |
+ DEPEND+=" |
142 |
>=sys-devel/binutils-2.24 |
143 |
>=sys-devel/gcc-6 |
144 |
+ virtual/os-headers |
145 |
" |
146 |
- DEPEND+=" virtual/os-headers " |
147 |
RDEPEND+=" |
148 |
>=net-dns/libidn2-2.0.5 |
149 |
vanilla? ( !sys-libs/timezone-data ) |
150 |
@@ -358,18 +356,11 @@ setup_flags() { |
151 |
ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} |
152 |
ASFLAGS=${ASFLAGS_BASE} |
153 |
|
154 |
- # Allow users to explicitly avoid flag sanitization via |
155 |
- # USE=custom-cflags. |
156 |
- if ! use custom-cflags; then |
157 |
- # Over-zealous CFLAGS can often cause problems. What may work for one |
158 |
- # person may not work for another. To avoid a large influx of bugs |
159 |
- # relating to failed builds, we strip most CFLAGS out to ensure as few |
160 |
- # problems as possible. |
161 |
- strip-flags |
162 |
- # Lock glibc at -O2; we want to be conservative here. |
163 |
- filter-flags '-O?' |
164 |
- append-flags -O2 |
165 |
- fi |
166 |
+ # Over-zealous CFLAGS can often cause problems. What may work for one |
167 |
+ # person may not work for another. To avoid a large influx of bugs |
168 |
+ # relating to failed builds, we strip most CFLAGS out to ensure as few |
169 |
+ # problems as possible. |
170 |
+ strip-flags |
171 |
strip-unsupported-flags |
172 |
filter-flags -m32 -m64 '-mabi=*' |
173 |
|
174 |
@@ -391,9 +382,10 @@ setup_flags() { |
175 |
CBUILD_OPT=${CTARGET_OPT} |
176 |
fi |
177 |
|
178 |
- # glibc's headers disallow -O0 and fail at build time: |
179 |
- # include/libc-symbols.h:75:3: #error "glibc cannot be compiled without optimization" |
180 |
- replace-flags -O0 -O1 |
181 |
+ # Lock glibc at -O2; we want to be conservative here. |
182 |
+ # -fno-strict-aliasing is to work around #155906. |
183 |
+ filter-flags '-O?' |
184 |
+ append-flags -O2 -fno-strict-aliasing |
185 |
|
186 |
filter-flags '-fstack-protector*' |
187 |
} |
188 |
@@ -523,7 +515,7 @@ check_devpts() { |
189 |
[[ ${MERGE_TYPE} == "buildonly" ]] && return |
190 |
|
191 |
# Only sanity check when installing the native glibc. |
192 |
- [[ -n ${ROOT} ]] && return |
193 |
+ [[ ${ROOT} != "/" ]] && return |
194 |
|
195 |
# If they're opting in to the old suid code, then no need to check. |
196 |
use suid && return |
197 |
@@ -611,7 +603,7 @@ sanity_prechecks() { |
198 |
|
199 |
# Prevent native builds from downgrading |
200 |
if [[ ${MERGE_TYPE} != "buildonly" ]] && \ |
201 |
- [[ -z ${ROOT} ]] && \ |
202 |
+ [[ ${ROOT} == "/" ]] && \ |
203 |
[[ ${CBUILD} == ${CHOST} ]] && \ |
204 |
[[ ${CHOST} == ${CTARGET} ]] ; then |
205 |
|
206 |
@@ -1103,7 +1095,7 @@ src_configure() { |
207 |
} |
208 |
|
209 |
do_src_compile() { |
210 |
- emake -C "$(builddir nptl)" |
211 |
+ emake -C "$(builddir nptl)" || die "make nptl for ${ABI} failed" |
212 |
} |
213 |
|
214 |
src_compile() { |
215 |
@@ -1151,7 +1143,7 @@ run_locale_gen() { |
216 |
|
217 |
local locale_list="${root}/etc/locale.gen" |
218 |
|
219 |
- pushd "${ED}"/$(get_libdir) >/dev/null |
220 |
+ pushd "${ED}"/$(get_libdir) |
221 |
|
222 |
if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then |
223 |
[[ -z ${inplace} ]] && ewarn "Generating all locales; edit /etc/locale.gen to save time/space" |
224 |
@@ -1161,14 +1153,14 @@ run_locale_gen() { |
225 |
locale-gen ${inplace} --jobs $(makeopts_jobs) --config "${locale_list}" \ |
226 |
--destdir "${root}" |
227 |
|
228 |
- popd >/dev/null |
229 |
+ popd |
230 |
} |
231 |
|
232 |
glibc_do_src_install() { |
233 |
local builddir=$(builddir nptl) |
234 |
cd "${builddir}" |
235 |
|
236 |
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install |
237 |
+ emake install_root="${D}$(build_eprefix)$(alt_prefix)" install || die |
238 |
|
239 |
# This version (2.26) provides some compatibility libraries for the NIS/NIS+ support |
240 |
# which come without headers etc. Only needed for binary packages since the |
241 |
@@ -1181,18 +1173,13 @@ glibc_do_src_install() { |
242 |
# '#define VERSION "2.26.90"' -> '2.26.90' |
243 |
local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) |
244 |
|
245 |
- # gdb is lame and requires some debugging information to remain in |
246 |
- # libpthread. libthread_db makes no sense stripped as it is only used when debugging. |
247 |
- dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so |
248 |
- dostrip -x $(alt_libdir)/libthread_db-1.0.so |
249 |
- |
250 |
- if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then |
251 |
+ if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then |
252 |
# Move versioned .a file out of libdir to evade portage QA checks |
253 |
# instead of using gen_usr_ldscript(). We fix ldscript as: |
254 |
# "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..." |
255 |
- sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die |
256 |
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die |
257 |
dodir $(alt_usrlibdir)/${P} |
258 |
- mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die |
259 |
+ mv "${ED}"$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die |
260 |
fi |
261 |
|
262 |
# We'll take care of the cache ourselves |
263 |
@@ -1350,7 +1337,7 @@ glibc_do_src_install() { |
264 |
|
265 |
# Generate all locales if this is a native build as locale generation |
266 |
if use compile-locales && ! is_crosscompile ; then |
267 |
- run_locale_gen --inplace-glibc "${ED}/" |
268 |
+ run_locale_gen --inplace-glibc "${ED}" |
269 |
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die |
270 |
fi |
271 |
} |
272 |
@@ -1358,7 +1345,7 @@ glibc_do_src_install() { |
273 |
glibc_headers_install() { |
274 |
local builddir=$(builddir "headers") |
275 |
cd "${builddir}" |
276 |
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers |
277 |
+ emake install_root="${D}$(build_eprefix)$(alt_prefix)" install-headers |
278 |
|
279 |
insinto $(alt_headers)/gnu |
280 |
doins "${S}"/include/gnu/stubs.h |
281 |
@@ -1369,6 +1356,23 @@ glibc_headers_install() { |
282 |
dosym usr/include $(alt_prefix)/sys-include |
283 |
} |
284 |
|
285 |
+src_strip() { |
286 |
+ # gdb is lame and requires some debugging information to remain in |
287 |
+ # libpthread, so we need to strip it by hand. libthread_db makes no |
288 |
+ # sense stripped as it is only used when debugging. |
289 |
+ local pthread=$(has splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}") |
290 |
+ env \ |
291 |
+ -uRESTRICT \ |
292 |
+ CHOST=${CTARGET} \ |
293 |
+ STRIP_MASK="/*/{,tls/}${pthread}*" \ |
294 |
+ prepallstrip |
295 |
+ # if user has stripping enabled and does not have split debug turned on, |
296 |
+ # then leave the debugging sections in libpthread. |
297 |
+ if ! has nostrip ${FEATURES} && ! has splitdebug ${FEATURES} ; then |
298 |
+ ${STRIP:-${CTARGET}-strip} --strip-debug "${ED}"$(alt_prefix)/*/libpthread-*.so |
299 |
+ fi |
300 |
+} |
301 |
+ |
302 |
src_install() { |
303 |
if just_headers ; then |
304 |
export ABI=default |
305 |
@@ -1377,11 +1381,7 @@ src_install() { |
306 |
fi |
307 |
|
308 |
foreach_abi glibc_do_src_install |
309 |
- |
310 |
- if ! use static-libs ; then |
311 |
- elog "Not installing static glibc libraries" |
312 |
- find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete |
313 |
- fi |
314 |
+ src_strip |
315 |
} |
316 |
|
317 |
# Simple test to make sure our new glibc isn't completely broken. |
318 |
@@ -1434,7 +1434,7 @@ pkg_preinst() { |
319 |
einfo "Defaulting /etc/host.conf:multi to on" |
320 |
fi |
321 |
|
322 |
- [[ -n ${ROOT} ]] && return 0 |
323 |
+ [[ ${ROOT} != "/" ]] && return 0 |
324 |
[[ -d ${ED}/$(get_libdir) ]] || return 0 |
325 |
[[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check |
326 |
} |
327 |
@@ -1445,11 +1445,15 @@ pkg_postinst() { |
328 |
|
329 |
if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then |
330 |
# Generate fastloading iconv module configuration file. |
331 |
- "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" |
332 |
+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" |
333 |
fi |
334 |
|
335 |
- if ! is_crosscompile && [[ -z ${ROOT} ]] ; then |
336 |
- use compile-locales || run_locale_gen "${EROOT}/" |
337 |
+ if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then |
338 |
+ # Reload init ... if in a chroot or a diff init package, ignore |
339 |
+ # errors from this step #253697 |
340 |
+ /sbin/telinit U 2>/dev/null |
341 |
+ |
342 |
+ use compile-locales || run_locale_gen "${EROOT}" |
343 |
fi |
344 |
|
345 |
# Check for sanity of /etc/nsswitch.conf, take 2 |
346 |
|
347 |
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-2.30-r1.ebuild |
348 |
similarity index 96% |
349 |
copy from sys-libs/glibc/glibc-9999.ebuild |
350 |
copy to sys-libs/glibc/glibc-2.30-r1.ebuild |
351 |
index 1075f02be79..2846ee6a61c 100644 |
352 |
--- a/sys-libs/glibc/glibc-9999.ebuild |
353 |
+++ b/sys-libs/glibc/glibc-2.30-r1.ebuild |
354 |
@@ -1,16 +1,17 @@ |
355 |
# Copyright 1999-2019 Gentoo Authors |
356 |
# Distributed under the terms of the GNU General Public License v2 |
357 |
|
358 |
-EAPI=7 |
359 |
+EAPI=6 |
360 |
|
361 |
PYTHON_COMPAT=( python3_{5,6,7} ) |
362 |
|
363 |
-inherit python-any-r1 prefix eutils toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ |
364 |
+inherit python-any-r1 prefix eutils eapi7-ver toolchain-funcs flag-o-matic gnuconfig usr-ldscript \ |
365 |
multilib systemd multiprocessing |
366 |
|
367 |
DESCRIPTION="GNU libc C library" |
368 |
HOMEPAGE="https://www.gnu.org/software/libc/" |
369 |
LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE" |
370 |
+RESTRICT="strip" # Strip ourself #46186 |
371 |
SLOT="2.2" |
372 |
|
373 |
EMULTILIB_PKG="true" |
374 |
@@ -29,7 +30,7 @@ RELEASE_VER=${PV} |
375 |
GCC_BOOTSTRAP_VER=20180511 |
376 |
|
377 |
# Gentoo patchset |
378 |
-PATCH_VER=13 |
379 |
+PATCH_VER=2 |
380 |
|
381 |
SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz" |
382 |
SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" |
383 |
@@ -64,16 +65,6 @@ fi |
384 |
# We need a new-enough binutils/gcc to match upstream baseline. |
385 |
# Also we need to make sure our binutils/gcc supports TLS, |
386 |
# and that gcc already contains the hardened patches. |
387 |
-BDEPEND=" |
388 |
- ${PYTHON_DEPS} |
389 |
- >=app-misc/pax-utils-0.1.10 |
390 |
- sys-devel/bison |
391 |
- !<sys-apps/sandbox-1.6 |
392 |
- !<sys-apps/portage-2.1.2 |
393 |
- !<sys-devel/bison-2.7 |
394 |
- !<sys-devel/make-4 |
395 |
- doc? ( sys-apps/texinfo ) |
396 |
-" |
397 |
COMMON_DEPEND=" |
398 |
nscd? ( selinux? ( |
399 |
audit? ( sys-process/audit ) |
400 |
@@ -84,6 +75,14 @@ COMMON_DEPEND=" |
401 |
systemtap? ( dev-util/systemtap ) |
402 |
" |
403 |
DEPEND="${COMMON_DEPEND} |
404 |
+ ${PYTHON_DEPS} |
405 |
+ >=app-misc/pax-utils-0.1.10 |
406 |
+ sys-devel/bison |
407 |
+ !<sys-apps/sandbox-1.6 |
408 |
+ !<sys-apps/portage-2.1.2 |
409 |
+ !<sys-devel/bison-2.7 |
410 |
+ !<sys-devel/make-4 |
411 |
+ doc? ( sys-apps/texinfo ) |
412 |
test? ( >=net-dns/libidn2-2.0.5 ) |
413 |
" |
414 |
RDEPEND="${COMMON_DEPEND} |
415 |
@@ -93,17 +92,17 @@ RDEPEND="${COMMON_DEPEND} |
416 |
" |
417 |
|
418 |
if [[ ${CATEGORY} == cross-* ]] ; then |
419 |
- BDEPEND+=" !headers-only? ( |
420 |
+ DEPEND+=" !headers-only? ( |
421 |
>=${CATEGORY}/binutils-2.24 |
422 |
>=${CATEGORY}/gcc-6 |
423 |
)" |
424 |
[[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers" |
425 |
else |
426 |
- BDEPEND+=" |
427 |
+ DEPEND+=" |
428 |
>=sys-devel/binutils-2.24 |
429 |
>=sys-devel/gcc-6 |
430 |
+ virtual/os-headers |
431 |
" |
432 |
- DEPEND+=" virtual/os-headers " |
433 |
RDEPEND+=" |
434 |
>=net-dns/libidn2-2.0.5 |
435 |
vanilla? ( !sys-libs/timezone-data ) |
436 |
@@ -523,7 +522,7 @@ check_devpts() { |
437 |
[[ ${MERGE_TYPE} == "buildonly" ]] && return |
438 |
|
439 |
# Only sanity check when installing the native glibc. |
440 |
- [[ -n ${ROOT} ]] && return |
441 |
+ [[ ${ROOT} != "/" ]] && return |
442 |
|
443 |
# If they're opting in to the old suid code, then no need to check. |
444 |
use suid && return |
445 |
@@ -611,7 +610,7 @@ sanity_prechecks() { |
446 |
|
447 |
# Prevent native builds from downgrading |
448 |
if [[ ${MERGE_TYPE} != "buildonly" ]] && \ |
449 |
- [[ -z ${ROOT} ]] && \ |
450 |
+ [[ ${ROOT} == "/" ]] && \ |
451 |
[[ ${CBUILD} == ${CHOST} ]] && \ |
452 |
[[ ${CHOST} == ${CTARGET} ]] ; then |
453 |
|
454 |
@@ -1103,7 +1102,7 @@ src_configure() { |
455 |
} |
456 |
|
457 |
do_src_compile() { |
458 |
- emake -C "$(builddir nptl)" |
459 |
+ emake -C "$(builddir nptl)" || die "make nptl for ${ABI} failed" |
460 |
} |
461 |
|
462 |
src_compile() { |
463 |
@@ -1168,7 +1167,7 @@ glibc_do_src_install() { |
464 |
local builddir=$(builddir nptl) |
465 |
cd "${builddir}" |
466 |
|
467 |
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install |
468 |
+ emake install_root="${D}$(build_eprefix)$(alt_prefix)" install || die |
469 |
|
470 |
# This version (2.26) provides some compatibility libraries for the NIS/NIS+ support |
471 |
# which come without headers etc. Only needed for binary packages since the |
472 |
@@ -1181,18 +1180,13 @@ glibc_do_src_install() { |
473 |
# '#define VERSION "2.26.90"' -> '2.26.90' |
474 |
local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) |
475 |
|
476 |
- # gdb is lame and requires some debugging information to remain in |
477 |
- # libpthread. libthread_db makes no sense stripped as it is only used when debugging. |
478 |
- dostrip -x $(alt_libdir)/libpthread-${upstream_pv}.so |
479 |
- dostrip -x $(alt_libdir)/libthread_db-1.0.so |
480 |
- |
481 |
- if [[ -e ${ED}/$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then |
482 |
+ if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then |
483 |
# Move versioned .a file out of libdir to evade portage QA checks |
484 |
# instead of using gen_usr_ldscript(). We fix ldscript as: |
485 |
# "GROUP ( /usr/lib64/libm-<pv>.a ..." -> "GROUP ( /usr/lib64/glibc-<pv>/libm-<pv>.a ..." |
486 |
- sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"/$(alt_usrlibdir)/libm.a || die |
487 |
+ sed -i "s@\(libm-${upstream_pv}.a\)@${P}/\1@" "${ED}"$(alt_usrlibdir)/libm.a || die |
488 |
dodir $(alt_usrlibdir)/${P} |
489 |
- mv "${ED}"/$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"/$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die |
490 |
+ mv "${ED}"$(alt_usrlibdir)/libm-${upstream_pv}.a "${ED}"$(alt_usrlibdir)/${P}/libm-${upstream_pv}.a || die |
491 |
fi |
492 |
|
493 |
# We'll take care of the cache ourselves |
494 |
@@ -1350,7 +1344,7 @@ glibc_do_src_install() { |
495 |
|
496 |
# Generate all locales if this is a native build as locale generation |
497 |
if use compile-locales && ! is_crosscompile ; then |
498 |
- run_locale_gen --inplace-glibc "${ED}/" |
499 |
+ run_locale_gen --inplace-glibc "${ED}" |
500 |
sed -e 's:COMPILED_LOCALES="":COMPILED_LOCALES="1":' -i "${ED}"/usr/sbin/locale-gen || die |
501 |
fi |
502 |
} |
503 |
@@ -1358,7 +1352,7 @@ glibc_do_src_install() { |
504 |
glibc_headers_install() { |
505 |
local builddir=$(builddir "headers") |
506 |
cd "${builddir}" |
507 |
- emake install_root="${D}/$(build_eprefix)$(alt_prefix)" install-headers |
508 |
+ emake install_root="${D}$(build_eprefix)$(alt_prefix)" install-headers |
509 |
|
510 |
insinto $(alt_headers)/gnu |
511 |
doins "${S}"/include/gnu/stubs.h |
512 |
@@ -1369,6 +1363,23 @@ glibc_headers_install() { |
513 |
dosym usr/include $(alt_prefix)/sys-include |
514 |
} |
515 |
|
516 |
+src_strip() { |
517 |
+ # gdb is lame and requires some debugging information to remain in |
518 |
+ # libpthread, so we need to strip it by hand. libthread_db makes no |
519 |
+ # sense stripped as it is only used when debugging. |
520 |
+ local pthread=$(has splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}") |
521 |
+ env \ |
522 |
+ -uRESTRICT \ |
523 |
+ CHOST=${CTARGET} \ |
524 |
+ STRIP_MASK="/*/{,tls/}${pthread}*" \ |
525 |
+ prepallstrip |
526 |
+ # if user has stripping enabled and does not have split debug turned on, |
527 |
+ # then leave the debugging sections in libpthread. |
528 |
+ if ! has nostrip ${FEATURES} && ! has splitdebug ${FEATURES} ; then |
529 |
+ ${STRIP:-${CTARGET}-strip} --strip-debug "${ED}"$(alt_prefix)/*/libpthread-*.so |
530 |
+ fi |
531 |
+} |
532 |
+ |
533 |
src_install() { |
534 |
if just_headers ; then |
535 |
export ABI=default |
536 |
@@ -1382,6 +1393,8 @@ src_install() { |
537 |
elog "Not installing static glibc libraries" |
538 |
find "${ED}" -name "*.a" -and -not -name "*_nonshared.a" -delete |
539 |
fi |
540 |
+ |
541 |
+ src_strip |
542 |
} |
543 |
|
544 |
# Simple test to make sure our new glibc isn't completely broken. |
545 |
@@ -1434,7 +1447,7 @@ pkg_preinst() { |
546 |
einfo "Defaulting /etc/host.conf:multi to on" |
547 |
fi |
548 |
|
549 |
- [[ -n ${ROOT} ]] && return 0 |
550 |
+ [[ ${ROOT} != "/" ]] && return 0 |
551 |
[[ -d ${ED}/$(get_libdir) ]] || return 0 |
552 |
[[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check |
553 |
} |
554 |
@@ -1445,11 +1458,11 @@ pkg_postinst() { |
555 |
|
556 |
if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then |
557 |
# Generate fastloading iconv module configuration file. |
558 |
- "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}/" |
559 |
+ "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" |
560 |
fi |
561 |
|
562 |
- if ! is_crosscompile && [[ -z ${ROOT} ]] ; then |
563 |
- use compile-locales || run_locale_gen "${EROOT}/" |
564 |
+ if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then |
565 |
+ use compile-locales || run_locale_gen "${EROOT}" |
566 |
fi |
567 |
|
568 |
# Check for sanity of /etc/nsswitch.conf, take 2 |
569 |
|
570 |
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild |
571 |
index 1075f02be79..cd66539a922 100644 |
572 |
--- a/sys-libs/glibc/glibc-9999.ebuild |
573 |
+++ b/sys-libs/glibc/glibc-9999.ebuild |
574 |
@@ -29,7 +29,7 @@ RELEASE_VER=${PV} |
575 |
GCC_BOOTSTRAP_VER=20180511 |
576 |
|
577 |
# Gentoo patchset |
578 |
-PATCH_VER=13 |
579 |
+PATCH_VER=14 |
580 |
|
581 |
SRC_URI+=" https://dev.gentoo.org/~slyfox/distfiles/${P}-patches-${PATCH_VER}.tar.xz" |
582 |
SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )" |