Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/glibc/
Date: Sun, 22 Oct 2017 19:46:48
Message-Id: 1508701578.4c0ab174902048d0332c99c880a6475328b4a410.dilfridge@gentoo
1 commit: 4c0ab174902048d0332c99c880a6475328b4a410
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 22 12:35:25 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 22 19:46:18 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0ab174
7
8 sys-libs/glibc: Remove old revisions
9
10 Package-Manager: Portage-2.3.12, Repoman-2.3.3
11
12 sys-libs/glibc/Manifest | 3 -
13 sys-libs/glibc/glibc-2.25-r4.ebuild | 150 -------
14 sys-libs/glibc/glibc-2.25-r5.ebuild | 151 -------
15 sys-libs/glibc/glibc-2.25-r7.ebuild | 151 -------
16 sys-libs/glibc/glibc-2.26-r1.ebuild | 795 ------------------------------------
17 5 files changed, 1250 deletions(-)
18
19 diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest
20 index f5e38565b6a..88147f03cd5 100644
21 --- a/sys-libs/glibc/Manifest
22 +++ b/sys-libs/glibc/Manifest
23 @@ -17,10 +17,7 @@ DIST glibc-2.23.tar.xz 13455260 SHA256 94efeb00e4603c8546209cefb3e1a50a5315c86fa
24 DIST glibc-2.24-patches-10.tar.bz2 73586 SHA256 d479033b63ff796fea56fb1bde390c442021acd856994b15c983b4a89e46fbbe SHA512 fc9191a85da53a2515bbaab228648936682e04267284049468e0c82284f618ab2907b9247baca701e16edc50640199ff6d8e2a6a93ccbd5a9d3b0eb73cc484ca WHIRLPOOL 7afe94307900a70de2f5e028d8ec9e0f4b06b661ec6493217e51a13d750f891e10b45c0f66d86fa83c16cc3ce539bb257039b33bc3e363469cd03502d956d75e
25 DIST glibc-2.24.tar.xz 13554048 SHA256 99d4a3e8efd144d71488e478f62587578c0f4e1fa0b4eed47ee3d4975ebeb5d3 SHA512 a4cb28a2c51a0cc029ed69da7cba11931a615ba897235590b4f7fad2eaabec9042f8250eaac2a5860997437a69ab13304f10a634000e52c0336b5593b7969adb WHIRLPOOL be82b47fc73f7e780e8e73a5f58b313d8e861d5ea8c4320f95ef0d8c1e125ff011d61dcfc0380be0e83868bd8c3299de1ea662da7fc8d709050e89b2c126e3eb
26 DIST glibc-2.25-patches-11.tar.bz2 64221 SHA256 38c76c844238a7bbaecc85b359e67af6a98a1614f3196f25d85f83dec4358e99 SHA512 cbbbca9653f55f0cb3b73c38c979cb439c87b172819f3e999d2b435d59cd2bef2c89f11a398300c53f447ad433ee87f47a0f3e890c78f8694705c788455325dd WHIRLPOOL e61203ac129d7283f3beda1421e1365da58c229bcb6b6a1f8b71755d9ea0e2bfb64b8be69ab7698861a593d4b98ab6163d574f3c215fba0a0d9e6a1b15d2eed5
27 -DIST glibc-2.25-patches-8.tar.bz2 47110 SHA256 1dc41664153369886d240a1851b15bf0c3c3739c8319e6d68cb0c2f85fc98901 SHA512 41d772c47770a63502c863f3c9bb05164e0ceab69fb7b7f355c25685ae4285d73e9ab0e3836162bd11852339055329d0bdc7238f3191fde39a50ce0d9a60454c WHIRLPOOL c6e0443d75e2e4607226caa4df1ce2b10ef21ec2564b447e2a287888d1f593d51f334a6e1ab942f5d1602d02c6fee87ce4ef9a7db3409de6063bc377a470a42d
28 -DIST glibc-2.25-patches-9.tar.bz2 67901 SHA256 cbd8af837aa0776940fd41e34874e930a7f25d78cdd212e138dd9a85e1349519 SHA512 b4f0be5b20834aff102394df23084cc0adf1ab674e6ce050550f6b6658cf0eab57f7685cac079b1a19388dba927a36b8ca31f58af3dddc559d7230674ffd59b5 WHIRLPOOL 81c18056fe26a79c7a7598da1181ba02e83daf7d9e9883a3c1195804a35fe22a79d7cc4a8411f2f4a4ce6430e506978199f59b61d3ed0a70b4e4f7dd05ecfafe
29 DIST glibc-2.25.tar.xz 13873900 SHA256 067bd9bb3390e79aa45911537d13c3721f1d9d3769931a30c2681bfee66f23a0 SHA512 5b7a2418d5b8a1b6a907c6c7fb6477ee2a473151cb45e03d0d4cdd9a33497c90b1ee39e2e7e885e2b25743dcd3747336ef114b4a73eb001da1fd79f29e0f9a6e WHIRLPOOL dc2fafaa4a0e5581268338453838a03ed0c5e7a2af844e8fb7086ab8d3ae48efbdbe6f25db1d089ae669cd2f8b0412f690d965506753d86f8525da2df59b7953
30 -DIST glibc-2.26-patches-1.tar.bz2 26479 SHA256 ce54a83d17dc2d605e69045a9031d31c729e660fa33e740780de2fea1f186115 SHA512 416cd1e2f4a7eaed2c1f5cd2d483a9d695e82e33add42d0f1c854fd69ccb2ce7f99666aee8fb7bc2320d5d3f44780c3d872134f383279ba573325df91f061dbf WHIRLPOOL deb3a5d12510b20f427a4d82a8b5fff4ab4c4932e6096ddd056efe07d1453f5099040db2c9794c3df4fa79516424a28d2c0c2158e3aec6ae6b05b840ee5e156d
31 DIST glibc-2.26-patches-2.tar.bz2 68040 SHA256 c40f03059d389fd8b22b54f83c0a669c44a38ee84cc359cb86d8f6dbdd1b957f SHA512 2b54d6e33b29d5ee5e4d4b64f299bf15e22ece5ce6555dafe43fd97ec8a2d9ef0645075ff24dc593ec6f89e02caf40c25a72af93ecd11113fba77268ccf486e2 WHIRLPOOL 59c54cdd2e3e64091dd206ad6b5ff467eff6c0d7f8ef5ab11504a4e6cfe958f762b9de2fbe8b6004a9e19963520a84a493ccf03908a78ea0a452dbc28e0df1e5
32 DIST glibc-2.26.tar.xz 14682748 SHA256 e54e0a934cd2bc94429be79da5e9385898d2306b9eaf3c92d5a77af96190f6bd SHA512 6ed368523bc55f00976f96c5177f114e3f714b27273d7bffc252812c8b98fb81970403c1f5b5f0a61da678811532fb446530745492d2b49bfefc0d5bd71ce8c0 WHIRLPOOL 9091c3bccc9b590de6b9595aa391ba01091f0c301bd9199d7c48fbeaeeb013ec9c683c68b65b59c5a69e3905b7f842cca1b0a410431967ecb3a1229b8535486f
33 DIST glibc-9999-patches-3.tar.bz2 19892 SHA256 97f60ed6debd495610b123d7a27227e75942bea1a0fb1e5f78833a6f3bbe6c64 SHA512 75084b86a83d447d3a4b3959fa2a93d849e304ba9473ebec5570ca4fb5e2f8dfb38548faf3abc9fbd29b529f2c608b52eb2ef2e6e9a2ad5bea9a9298a19ef596 WHIRLPOOL 04a5c30aabf72530fa96fa3a8eadf8207d85d3a2a948ba5f4b72c0deeeae24e7eb71b99875f0e9b1018051fabb4a23630b41873fa4ff0d6ba9778ca6051212bf
34
35 diff --git a/sys-libs/glibc/glibc-2.25-r4.ebuild b/sys-libs/glibc/glibc-2.25-r4.ebuild
36 deleted file mode 100644
37 index 27cd42605ff..00000000000
38 --- a/sys-libs/glibc/glibc-2.25-r4.ebuild
39 +++ /dev/null
40 @@ -1,150 +0,0 @@
41 -# Copyright 1999-2017 Gentoo Foundation
42 -# Distributed under the terms of the GNU General Public License v2
43 -
44 -EAPI="5"
45 -
46 -inherit toolchain-glibc
47 -
48 -DESCRIPTION="GNU libc6 (also called glibc2) C library"
49 -HOMEPAGE="https://www.gnu.org/software/libc/libc.html"
50 -
51 -LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
52 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
53 -RESTRICT="strip" # strip ourself #46186
54 -EMULTILIB_PKG="true"
55 -
56 -# Configuration variables
57 -RELEASE_VER=""
58 -case ${PV} in
59 -9999*)
60 - EGIT_REPO_URIS="git://sourceware.org/git/glibc.git"
61 - EGIT_SOURCEDIRS="${S}"
62 - inherit git-2
63 - ;;
64 -*)
65 - RELEASE_VER=${PV}
66 - ;;
67 -esac
68 -GCC_BOOTSTRAP_VER="4.7.3-r1"
69 -# patches live at https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/
70 -PATCH_VER="8" # Gentoo patchset
71 -: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires
72 -
73 -IUSE="audit caps debug gd hardened multilib nscd +rpc selinux systemtap profile suid vanilla crosscompile_opts_headers-only"
74 -
75 -# Here's how the cross-compile logic breaks down ...
76 -# CTARGET - machine that will target the binaries
77 -# CHOST - machine that will host the binaries
78 -# CBUILD - machine that will build the binaries
79 -# If CTARGET != CHOST, it means you want a libc for cross-compiling.
80 -# If CHOST != CBUILD, it means you want to cross-compile the libc.
81 -# CBUILD = CHOST = CTARGET - native build/install
82 -# CBUILD != (CHOST = CTARGET) - cross-compile a native build
83 -# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
84 -# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
85 -# For install paths:
86 -# CHOST = CTARGET - install into /
87 -# CHOST != CTARGET - install into /usr/CTARGET/
88 -
89 -export CBUILD=${CBUILD:-${CHOST}}
90 -export CTARGET=${CTARGET:-${CHOST}}
91 -if [[ ${CTARGET} == ${CHOST} ]] ; then
92 - if [[ ${CATEGORY} == cross-* ]] ; then
93 - export CTARGET=${CATEGORY#cross-}
94 - fi
95 -fi
96 -
97 -is_crosscompile() {
98 - [[ ${CHOST} != ${CTARGET} ]]
99 -}
100 -
101 -# Why SLOT 2.2 you ask yourself while sippin your tea ?
102 -# Everyone knows 2.2 > 0, duh.
103 -SLOT="2.2"
104 -
105 -# General: We need a new-enough binutils/gcc to match upstream baseline.
106 -# arch: we need to make sure our binutils/gcc supports TLS.
107 -COMMON_DEPEND="
108 - nscd? ( selinux? (
109 - audit? ( sys-process/audit )
110 - caps? ( sys-libs/libcap )
111 - ) )
112 - suid? ( caps? ( sys-libs/libcap ) )
113 - selinux? ( sys-libs/libselinux )
114 -"
115 -DEPEND="${COMMON_DEPEND}
116 - >=app-misc/pax-utils-0.1.10
117 - !<sys-apps/sandbox-1.6
118 - !<sys-apps/portage-2.1.2"
119 -RDEPEND="${COMMON_DEPEND}
120 - !sys-kernel/ps3-sources
121 - sys-apps/gentoo-functions
122 - !sys-libs/nss-db"
123 -
124 -if [[ ${CATEGORY} == cross-* ]] ; then
125 - DEPEND+=" !crosscompile_opts_headers-only? (
126 - >=${CATEGORY}/binutils-2.24
127 - >=${CATEGORY}/gcc-4.7
128 - )"
129 - [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
130 -else
131 - DEPEND+="
132 - >=sys-devel/binutils-2.24
133 - >=sys-devel/gcc-4.7
134 - virtual/os-headers"
135 - RDEPEND+=" vanilla? ( !sys-libs/timezone-data )"
136 - PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
137 -fi
138 -
139 -upstream_uris() {
140 - echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1
141 -}
142 -gentoo_uris() {
143 - local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI HTTP~tamiko/distfiles/URI HTTP~slyfox/distfiles/URI"
144 - devspace=${devspace//HTTP/https://dev.gentoo.org/}
145 - echo mirror://gentoo/$1 ${devspace//URI/$1}
146 -}
147 -SRC_URI=$(
148 - [[ -z ${EGIT_REPO_URIS} ]] && upstream_uris ${P}.tar.xz
149 - [[ -n ${PATCH_VER} ]] && gentoo_uris ${P}-patches-${PATCH_VER}.tar.bz2
150 -)
151 -SRC_URI+=" ${GCC_BOOTSTRAP_VER:+multilib? ( $(gentoo_uris gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2) )}"
152 -
153 -src_unpack() {
154 - [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
155 -
156 - toolchain-glibc_src_unpack
157 -}
158 -
159 -src_prepare() {
160 - toolchain-glibc_src_prepare
161 -
162 - cd "${S}"
163 -
164 - epatch "${FILESDIR}"/2.19/${PN}-2.19-ia64-gcc-4.8-reloc-hack.patch #503838
165 -
166 - if use hardened ; then
167 - # We don't enable these for non-hardened as the output is very terse --
168 - # it only states that a crash happened. The default upstream behavior
169 - # includes backtraces and symbols.
170 - einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
171 - cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die
172 - cp "${FILESDIR}"/2.25/glibc-2.25-gentoo-chk_fail.c debug/chk_fail.c || die
173 -
174 - if use debug ; then
175 - # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested.
176 - sed -i \
177 - -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
178 - -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
179 - debug/Makefile || die
180 - fi
181 - fi
182 -
183 - case $(gcc-fullversion) in
184 - 4.8.[0-3]|4.9.0)
185 - eerror "You need to switch to a newer compiler; gcc-4.8.[0-3] and gcc-4.9.0 miscompile"
186 - eerror "glibc. See https://bugs.gentoo.org/547420 for details."
187 - die "need to switch compilers #547420"
188 - ;;
189 - esac
190 -}
191
192 diff --git a/sys-libs/glibc/glibc-2.25-r5.ebuild b/sys-libs/glibc/glibc-2.25-r5.ebuild
193 deleted file mode 100644
194 index 24ad65b328f..00000000000
195 --- a/sys-libs/glibc/glibc-2.25-r5.ebuild
196 +++ /dev/null
197 @@ -1,151 +0,0 @@
198 -# Copyright 1999-2017 Gentoo Foundation
199 -# Distributed under the terms of the GNU General Public License v2
200 -
201 -EAPI="5"
202 -
203 -inherit toolchain-glibc
204 -
205 -DESCRIPTION="GNU libc6 (also called glibc2) C library"
206 -HOMEPAGE="https://www.gnu.org/software/libc/libc.html"
207 -
208 -LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
209 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
210 -RESTRICT="strip" # strip ourself #46186
211 -EMULTILIB_PKG="true"
212 -
213 -# Configuration variables
214 -RELEASE_VER=""
215 -case ${PV} in
216 -9999*)
217 - EGIT_REPO_URIS="git://sourceware.org/git/glibc.git"
218 - EGIT_SOURCEDIRS="${S}"
219 - inherit git-2
220 - ;;
221 -*)
222 - RELEASE_VER=${PV}
223 - ;;
224 -esac
225 -GCC_BOOTSTRAP_VER="4.7.3-r1"
226 -# patches live at https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/
227 -PATCH_VER="9" # Gentoo patchset
228 -: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires
229 -
230 -IUSE="audit caps debug gd hardened multilib nscd +rpc selinux systemtap profile suid vanilla crosscompile_opts_headers-only"
231 -
232 -# Here's how the cross-compile logic breaks down ...
233 -# CTARGET - machine that will target the binaries
234 -# CHOST - machine that will host the binaries
235 -# CBUILD - machine that will build the binaries
236 -# If CTARGET != CHOST, it means you want a libc for cross-compiling.
237 -# If CHOST != CBUILD, it means you want to cross-compile the libc.
238 -# CBUILD = CHOST = CTARGET - native build/install
239 -# CBUILD != (CHOST = CTARGET) - cross-compile a native build
240 -# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
241 -# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
242 -# For install paths:
243 -# CHOST = CTARGET - install into /
244 -# CHOST != CTARGET - install into /usr/CTARGET/
245 -
246 -export CBUILD=${CBUILD:-${CHOST}}
247 -export CTARGET=${CTARGET:-${CHOST}}
248 -if [[ ${CTARGET} == ${CHOST} ]] ; then
249 - if [[ ${CATEGORY} == cross-* ]] ; then
250 - export CTARGET=${CATEGORY#cross-}
251 - fi
252 -fi
253 -
254 -is_crosscompile() {
255 - [[ ${CHOST} != ${CTARGET} ]]
256 -}
257 -
258 -# Why SLOT 2.2 you ask yourself while sippin your tea ?
259 -# Everyone knows 2.2 > 0, duh.
260 -SLOT="2.2"
261 -
262 -# General: We need a new-enough binutils/gcc to match upstream baseline.
263 -# arch: we need to make sure our binutils/gcc supports TLS.
264 -COMMON_DEPEND="
265 - nscd? ( selinux? (
266 - audit? ( sys-process/audit )
267 - caps? ( sys-libs/libcap )
268 - ) )
269 - suid? ( caps? ( sys-libs/libcap ) )
270 - selinux? ( sys-libs/libselinux )
271 - systemtap? ( dev-util/systemtap )
272 -"
273 -DEPEND="${COMMON_DEPEND}
274 - >=app-misc/pax-utils-0.1.10
275 - !<sys-apps/sandbox-1.6
276 - !<sys-apps/portage-2.1.2"
277 -RDEPEND="${COMMON_DEPEND}
278 - !sys-kernel/ps3-sources
279 - sys-apps/gentoo-functions
280 - !sys-libs/nss-db"
281 -
282 -if [[ ${CATEGORY} == cross-* ]] ; then
283 - DEPEND+=" !crosscompile_opts_headers-only? (
284 - >=${CATEGORY}/binutils-2.24
285 - >=${CATEGORY}/gcc-4.7
286 - )"
287 - [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
288 -else
289 - DEPEND+="
290 - >=sys-devel/binutils-2.24
291 - >=sys-devel/gcc-4.7
292 - virtual/os-headers"
293 - RDEPEND+=" vanilla? ( !sys-libs/timezone-data )"
294 - PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
295 -fi
296 -
297 -upstream_uris() {
298 - echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1
299 -}
300 -gentoo_uris() {
301 - local devspace="HTTP~vapier/dist/URI HTTP~dilfridge/distfiles/URI HTTP~tamiko/distfiles/URI HTTP~slyfox/distfiles/URI"
302 - devspace=${devspace//HTTP/https://dev.gentoo.org/}
303 - echo mirror://gentoo/$1 ${devspace//URI/$1}
304 -}
305 -SRC_URI=$(
306 - [[ -z ${EGIT_REPO_URIS} ]] && upstream_uris ${P}.tar.xz
307 - [[ -n ${PATCH_VER} ]] && gentoo_uris ${P}-patches-${PATCH_VER}.tar.bz2
308 -)
309 -SRC_URI+=" ${GCC_BOOTSTRAP_VER:+multilib? ( $(gentoo_uris gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2) )}"
310 -
311 -src_unpack() {
312 - [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
313 -
314 - toolchain-glibc_src_unpack
315 -}
316 -
317 -src_prepare() {
318 - toolchain-glibc_src_prepare
319 -
320 - cd "${S}"
321 -
322 - epatch "${FILESDIR}"/2.19/${PN}-2.19-ia64-gcc-4.8-reloc-hack.patch #503838
323 -
324 - if use hardened ; then
325 - # We don't enable these for non-hardened as the output is very terse --
326 - # it only states that a crash happened. The default upstream behavior
327 - # includes backtraces and symbols.
328 - einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
329 - cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die
330 - cp "${FILESDIR}"/2.25/glibc-2.25-gentoo-chk_fail.c debug/chk_fail.c || die
331 -
332 - if use debug ; then
333 - # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested.
334 - sed -i \
335 - -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
336 - -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
337 - debug/Makefile || die
338 - fi
339 - fi
340 -
341 - case $(gcc-fullversion) in
342 - 4.8.[0-3]|4.9.0)
343 - eerror "You need to switch to a newer compiler; gcc-4.8.[0-3] and gcc-4.9.0 miscompile"
344 - eerror "glibc. See https://bugs.gentoo.org/547420 for details."
345 - die "need to switch compilers #547420"
346 - ;;
347 - esac
348 -}
349
350 diff --git a/sys-libs/glibc/glibc-2.25-r7.ebuild b/sys-libs/glibc/glibc-2.25-r7.ebuild
351 deleted file mode 100644
352 index 18cab6ab379..00000000000
353 --- a/sys-libs/glibc/glibc-2.25-r7.ebuild
354 +++ /dev/null
355 @@ -1,151 +0,0 @@
356 -# Copyright 1999-2017 Gentoo Foundation
357 -# Distributed under the terms of the GNU General Public License v2
358 -
359 -EAPI="5"
360 -
361 -inherit toolchain-glibc
362 -
363 -DESCRIPTION="GNU libc6 (also called glibc2) C library"
364 -HOMEPAGE="https://www.gnu.org/software/libc/libc.html"
365 -
366 -LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
367 -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
368 -RESTRICT="strip" # strip ourself #46186
369 -EMULTILIB_PKG="true"
370 -
371 -# Configuration variables
372 -RELEASE_VER=""
373 -case ${PV} in
374 -9999*)
375 - EGIT_REPO_URIS="git://sourceware.org/git/glibc.git"
376 - EGIT_SOURCEDIRS="${S}"
377 - inherit git-2
378 - ;;
379 -*)
380 - RELEASE_VER=${PV}
381 - ;;
382 -esac
383 -GCC_BOOTSTRAP_VER="4.7.3-r1"
384 -# patches live at https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/glibc/
385 -PATCH_VER="11" # Gentoo patchset
386 -: ${NPTL_KERN_VER:="2.6.32"} # min kernel version nptl requires
387 -
388 -IUSE="audit caps debug gd hardened multilib nscd +rpc selinux systemtap profile suid vanilla crosscompile_opts_headers-only"
389 -
390 -# Here's how the cross-compile logic breaks down ...
391 -# CTARGET - machine that will target the binaries
392 -# CHOST - machine that will host the binaries
393 -# CBUILD - machine that will build the binaries
394 -# If CTARGET != CHOST, it means you want a libc for cross-compiling.
395 -# If CHOST != CBUILD, it means you want to cross-compile the libc.
396 -# CBUILD = CHOST = CTARGET - native build/install
397 -# CBUILD != (CHOST = CTARGET) - cross-compile a native build
398 -# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
399 -# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
400 -# For install paths:
401 -# CHOST = CTARGET - install into /
402 -# CHOST != CTARGET - install into /usr/CTARGET/
403 -
404 -export CBUILD=${CBUILD:-${CHOST}}
405 -export CTARGET=${CTARGET:-${CHOST}}
406 -if [[ ${CTARGET} == ${CHOST} ]] ; then
407 - if [[ ${CATEGORY} == cross-* ]] ; then
408 - export CTARGET=${CATEGORY#cross-}
409 - fi
410 -fi
411 -
412 -is_crosscompile() {
413 - [[ ${CHOST} != ${CTARGET} ]]
414 -}
415 -
416 -# Why SLOT 2.2 you ask yourself while sippin your tea ?
417 -# Everyone knows 2.2 > 0, duh.
418 -SLOT="2.2"
419 -
420 -# General: We need a new-enough binutils/gcc to match upstream baseline.
421 -# arch: we need to make sure our binutils/gcc supports TLS.
422 -COMMON_DEPEND="
423 - nscd? ( selinux? (
424 - audit? ( sys-process/audit )
425 - caps? ( sys-libs/libcap )
426 - ) )
427 - suid? ( caps? ( sys-libs/libcap ) )
428 - selinux? ( sys-libs/libselinux )
429 - systemtap? ( dev-util/systemtap )
430 -"
431 -DEPEND="${COMMON_DEPEND}
432 - >=app-misc/pax-utils-0.1.10
433 - !<sys-apps/sandbox-1.6
434 - !<sys-apps/portage-2.1.2"
435 -RDEPEND="${COMMON_DEPEND}
436 - !sys-kernel/ps3-sources
437 - sys-apps/gentoo-functions
438 - !sys-libs/nss-db"
439 -
440 -if [[ ${CATEGORY} == cross-* ]] ; then
441 - DEPEND+=" !crosscompile_opts_headers-only? (
442 - >=${CATEGORY}/binutils-2.24
443 - >=${CATEGORY}/gcc-4.7
444 - )"
445 - [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
446 -else
447 - DEPEND+="
448 - >=sys-devel/binutils-2.24
449 - >=sys-devel/gcc-4.7
450 - virtual/os-headers"
451 - RDEPEND+=" vanilla? ( !sys-libs/timezone-data )"
452 - PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
453 -fi
454 -
455 -upstream_uris() {
456 - echo mirror://gnu/glibc/$1 ftp://sourceware.org/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1
457 -}
458 -gentoo_uris() {
459 - local devspace="HTTP~vapier/dist/URI HTTP~dilfridge/distfiles/URI HTTP~tamiko/distfiles/URI HTTP~slyfox/distfiles/URI"
460 - devspace=${devspace//HTTP/https://dev.gentoo.org/}
461 - echo mirror://gentoo/$1 ${devspace//URI/$1}
462 -}
463 -SRC_URI=$(
464 - [[ -z ${EGIT_REPO_URIS} ]] && upstream_uris ${P}.tar.xz
465 - [[ -n ${PATCH_VER} ]] && gentoo_uris ${P}-patches-${PATCH_VER}.tar.bz2
466 -)
467 -SRC_URI+=" ${GCC_BOOTSTRAP_VER:+multilib? ( $(gentoo_uris gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2) )}"
468 -
469 -src_unpack() {
470 - [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
471 -
472 - toolchain-glibc_src_unpack
473 -}
474 -
475 -src_prepare() {
476 - toolchain-glibc_src_prepare
477 -
478 - cd "${S}"
479 -
480 - epatch "${FILESDIR}"/2.19/${PN}-2.19-ia64-gcc-4.8-reloc-hack.patch #503838
481 -
482 - if use hardened ; then
483 - # We don't enable these for non-hardened as the output is very terse --
484 - # it only states that a crash happened. The default upstream behavior
485 - # includes backtraces and symbols.
486 - einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
487 - cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die
488 - cp "${FILESDIR}"/2.25/glibc-2.25-gentoo-chk_fail.c debug/chk_fail.c || die
489 -
490 - if use debug ; then
491 - # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested.
492 - sed -i \
493 - -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
494 - -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
495 - debug/Makefile || die
496 - fi
497 - fi
498 -
499 - case $(gcc-fullversion) in
500 - 4.8.[0-3]|4.9.0)
501 - eerror "You need to switch to a newer compiler; gcc-4.8.[0-3] and gcc-4.9.0 miscompile"
502 - eerror "glibc. See https://bugs.gentoo.org/547420 for details."
503 - die "need to switch compilers #547420"
504 - ;;
505 - esac
506 -}
507
508 diff --git a/sys-libs/glibc/glibc-2.26-r1.ebuild b/sys-libs/glibc/glibc-2.26-r1.ebuild
509 deleted file mode 100644
510 index 29d3ad98709..00000000000
511 --- a/sys-libs/glibc/glibc-2.26-r1.ebuild
512 +++ /dev/null
513 @@ -1,795 +0,0 @@
514 -# Copyright 1999-2017 Gentoo Foundation
515 -# Distributed under the terms of the GNU General Public License v2
516 -
517 -EAPI=6
518 -
519 -inherit prefix toolchain-glibc
520 -
521 -DESCRIPTION="GNU libc C library"
522 -HOMEPAGE="https://www.gnu.org/software/libc/"
523 -
524 -LICENSE="LGPL-2.1+ BSD HPND ISC inner-net rc PCRE"
525 -RESTRICT="strip" # Strip ourself #46186
526 -EMULTILIB_PKG="true"
527 -
528 -# Configuration variables
529 -
530 -if [[ ${PV} == 9999* ]]; then
531 - EGIT_REPO_URI="git://sourceware.org/git/glibc.git"
532 - inherit git-r3
533 -else
534 - # KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
535 - KEYWORDS=""
536 - SRC_URI="mirror://gnu/glibc/${P}.tar.xz"
537 -fi
538 -
539 -RELEASE_VER=${PV}
540 -
541 -GCC_BOOTSTRAP_VER="4.7.3-r1"
542 -
543 -# Gentoo patchset
544 -PATCH_VER="1"
545 -
546 -SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2"
547 -SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2 )"
548 -
549 -IUSE="audit caps debug gd hardened multilib nscd selinux systemtap profile suid vanilla crosscompile_opts_headers-only"
550 -
551 -# Min kernel version nptl requires
552 -: ${NPTL_KERN_VER:="2.6.32"}
553 -
554 -# Here's how the cross-compile logic breaks down ...
555 -# CTARGET - machine that will target the binaries
556 -# CHOST - machine that will host the binaries
557 -# CBUILD - machine that will build the binaries
558 -# If CTARGET != CHOST, it means you want a libc for cross-compiling.
559 -# If CHOST != CBUILD, it means you want to cross-compile the libc.
560 -# CBUILD = CHOST = CTARGET - native build/install
561 -# CBUILD != (CHOST = CTARGET) - cross-compile a native build
562 -# (CBUILD = CHOST) != CTARGET - libc for cross-compiler
563 -# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler
564 -# For install paths:
565 -# CHOST = CTARGET - install into /
566 -# CHOST != CTARGET - install into /usr/CTARGET/
567 -
568 -export CBUILD=${CBUILD:-${CHOST}}
569 -export CTARGET=${CTARGET:-${CHOST}}
570 -if [[ ${CTARGET} == ${CHOST} ]] ; then
571 - if [[ ${CATEGORY} == cross-* ]] ; then
572 - export CTARGET=${CATEGORY#cross-}
573 - fi
574 -fi
575 -
576 -is_crosscompile() {
577 - [[ ${CHOST} != ${CTARGET} ]]
578 -}
579 -
580 -SLOT="2.2"
581 -
582 -# General: We need a new-enough binutils/gcc to match upstream baseline.
583 -# arch: we need to make sure our binutils/gcc supports TLS.
584 -COMMON_DEPEND="
585 - nscd? ( selinux? (
586 - audit? ( sys-process/audit )
587 - caps? ( sys-libs/libcap )
588 - ) )
589 - suid? ( caps? ( sys-libs/libcap ) )
590 - selinux? ( sys-libs/libselinux )
591 - systemtap? ( dev-util/systemtap )
592 -"
593 -DEPEND="${COMMON_DEPEND}
594 - >=app-misc/pax-utils-0.1.10
595 - !<sys-apps/sandbox-1.6
596 - !<sys-apps/portage-2.1.2
597 -"
598 -RDEPEND="${COMMON_DEPEND}
599 - !sys-kernel/ps3-sources
600 - sys-apps/gentoo-functions
601 - !sys-libs/nss-db
602 -"
603 -
604 -if [[ ${CATEGORY} == cross-* ]] ; then
605 - DEPEND+=" !crosscompile_opts_headers-only? (
606 - >=${CATEGORY}/binutils-2.24
607 - >=${CATEGORY}/gcc-4.9
608 - )"
609 - [[ ${CATEGORY} == *-linux* ]] && DEPEND+=" ${CATEGORY}/linux-headers"
610 -else
611 - DEPEND+="
612 - >=sys-devel/binutils-2.24
613 - >=sys-devel/gcc-4.9
614 - virtual/os-headers
615 - "
616 - RDEPEND+=" vanilla? ( !sys-libs/timezone-data )"
617 - PDEPEND+=" !vanilla? ( sys-libs/timezone-data )"
618 -fi
619 -
620 -#
621 -# the phases
622 -#
623 -
624 -pkg_pretend() {
625 - # Make sure devpts is mounted correctly for use w/out setuid pt_chown
626 - check_devpts
627 -
628 - # Prevent native builds from downgrading
629 - if [[ ${MERGE_TYPE} != "buildonly" ]] && \
630 - [[ ${ROOT} == "/" ]] && \
631 - [[ ${CBUILD} == ${CHOST} ]] && \
632 - [[ ${CHOST} == ${CTARGET} ]] ; then
633 - # The high rev # is to allow people to downgrade between -r# versions.
634 - # We want to block 2.20->2.19, but 2.20-r3->2.20-r2 should be fine.
635 - # Hopefully we never actually use a r# this high.
636 - if has_version ">${CATEGORY}/${P}-r10000" ; then
637 - eerror "Sanity check to keep you from breaking your system:"
638 - eerror " Downgrading glibc is not supported and a sure way to destruction"
639 - die "Aborting to save your system"
640 - fi
641 -
642 - if ! glibc_run_test '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n'
643 - then
644 - eerror "Your patched vendor kernel is broken. You need to get an"
645 - eerror "update from whoever is providing the kernel to you."
646 - eerror "https://sourceware.org/bugzilla/show_bug.cgi?id=5227"
647 - eerror "https://bugs.gentoo.org/262698"
648 - die "Keeping your system alive, say thank you"
649 - fi
650 -
651 - if ! glibc_run_test '#include <unistd.h>\n#include <sys/syscall.h>\nint main(){return syscall(1000)!=-1;}\n'
652 - then
653 - eerror "Your old kernel is broken. You need to update it to"
654 - eerror "a newer version as syscall(<bignum>) will break."
655 - eerror "https://bugs.gentoo.org/279260"
656 - die "Keeping your system alive, say thank you"
657 - fi
658 - fi
659 -
660 - # Users have had a chance to phase themselves, time to give em the boot
661 - if [[ -e ${EROOT}/etc/locale.gen ]] && [[ -e ${EROOT}/etc/locales.build ]] ; then
662 - eerror "You still haven't deleted ${EROOT}/etc/locales.build."
663 - eerror "Do so now after making sure ${EROOT}/etc/locale.gen is kosher."
664 - die "Lazy upgrader detected"
665 - fi
666 -
667 - if [[ ${CTARGET} == i386-* ]] ; then
668 - eerror "i386 CHOSTs are no longer supported."
669 - eerror "Chances are you don't actually want/need i386."
670 - eerror "Please read https://www.gentoo.org/doc/en/change-chost.xml"
671 - die "Please fix your CHOST"
672 - fi
673 -
674 - if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then
675 - ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS."
676 - ewarn "This will result in a 50% performance penalty when running with a 32bit"
677 - ewarn "hypervisor, which is probably not what you want."
678 - fi
679 -
680 - use hardened && ! tc-enables-pie && \
681 - ewarn "PIE hardening not applied, as your compiler doesn't default to PIE"
682 -
683 - # Make sure host system is up to date #394453
684 - if has_version '<sys-libs/glibc-2.13' && \
685 - [[ -n $(scanelf -qys__guard -F'#s%F' "${EROOT}"/lib*/l*-*.so) ]]
686 - then
687 - ebegin "Scanning system for __guard to see if you need to rebuild first ..."
688 - local files=$(
689 - scanelf -qys__guard -F'#s%F' \
690 - "${EROOT}"/*bin/ \
691 - "${EROOT}"/lib* \
692 - "${EROOT}"/usr/*bin/ \
693 - "${EROOT}"/usr/lib* | \
694 - egrep -v \
695 - -e "^${EROOT}/lib.*/(libc|ld)-2.*.so$" \
696 - -e "^${EROOT}/sbin/(ldconfig|sln)$"
697 - )
698 - [[ -z ${files} ]]
699 - if ! eend $? ; then
700 - eerror "Your system still has old SSP __guard symbols. You need to"
701 - eerror "rebuild all the packages that provide these files first:"
702 - eerror "${files}"
703 - die "old __guard detected"
704 - fi
705 - fi
706 -}
707 -
708 -src_unpack() {
709 - use multilib && unpack gcc-${GCC_BOOTSTRAP_VER}-multilib-bootstrap.tar.bz2
710 -
711 - setup_env
712 -
713 - # Check NPTL support _before_ we unpack things to save some time
714 - check_nptl_support
715 -
716 - if [[ -n ${EGIT_REPO_URI} ]] ; then
717 - git-r3_src_unpack
718 - else
719 - unpack ${P}.tar.xz
720 - fi
721 -
722 - cd "${S}"
723 - touch locale/C-translit.h #185476 #218003
724 -
725 - cd "${WORKDIR}"
726 - unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2
727 - # pull out all the addons
728 - local d
729 - for d in extra/*/configure ; do
730 - d=${d%/configure}
731 - [[ -d ${S}/${d} ]] && die "${d} already exists in \${S}"
732 - mv "${d}" "${S}" || die "moving ${d} failed"
733 - done
734 -}
735 -
736 -src_prepare() {
737 - if ! use vanilla ; then
738 - elog "Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER} ..."
739 - eapply "${WORKDIR}"/patches/*.patch
740 - fi
741 -
742 - if just_headers ; then
743 - if [[ -e ports/sysdeps/mips/preconfigure ]] ; then
744 - # mips peeps like to screw with us. if building headers,
745 - # we don't have a real compiler, so we can't let them
746 - # insert -mabi on us.
747 - sed -i '/CPPFLAGS=.*-mabi/s|.*|:|' ports/sysdeps/mips/preconfigure || die
748 - find ports/sysdeps/mips/ -name Makefile -exec sed -i '/^CC.*-mabi=/s:-mabi=.*:-D_MIPS_SZPTR=32:' {} +
749 - fi
750 - fi
751 -
752 - default
753 -
754 - gnuconfig_update
755 -
756 - cd "${WORKDIR}"
757 - find . -name configure -exec touch {} +
758 -
759 - eprefixify extra/locale/locale-gen
760 -
761 - # Fix permissions on some of the scripts.
762 - chmod u+x "${S}"/scripts/*.sh
763 -
764 - cd "${S}"
765 -
766 - if use hardened ; then
767 - # We don't enable these for non-hardened as the output is very terse --
768 - # it only states that a crash happened. The default upstream behavior
769 - # includes backtraces and symbols.
770 - einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler"
771 - cp "${FILESDIR}"/2.20/glibc-2.20-gentoo-stack_chk_fail.c debug/stack_chk_fail.c || die
772 - cp "${FILESDIR}"/2.25/glibc-2.25-gentoo-chk_fail.c debug/chk_fail.c || die
773 -
774 - if use debug ; then
775 - # Allow SIGABRT to dump core on non-hardened systems, or when debug is requested.
776 - sed -i \
777 - -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
778 - -e '/^CFLAGS-backtrace.c/ iCPPFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \
779 - debug/Makefile || die
780 - fi
781 - fi
782 -}
783 -
784 -glibc_do_configure() {
785 - # Glibc does not work with gold (for various reasons) #269274.
786 - tc-ld-disable-gold
787 -
788 - # CXX isnt handled by the multilib system, so if we dont unset here
789 - # we accumulate crap across abis
790 - unset CXX
791 -
792 - einfo "Configuring glibc for $1"
793 -
794 - local v
795 - for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CXX LD {AS,C,CPP,CXX,LD}FLAGS ; do
796 - einfo " $(printf '%15s' ${v}:) ${!v}"
797 - done
798 -
799 - # The glibc configure script doesn't properly use LDFLAGS all the time.
800 - export CC="$(tc-getCC ${CTARGET}) ${LDFLAGS}"
801 - einfo " $(printf '%15s' 'Manual CC:') ${CC}"
802 -
803 - # Some of the tests are written in C++, so we need to force our multlib abis in, bug 623548
804 - export CXX="$(tc-getCXX ${CTARGET}) $(get_abi_CFLAGS)"
805 - einfo " $(printf '%15s' 'Manual CXX:') ${CXX}"
806 -
807 - echo
808 -
809 - local myconf=()
810 -
811 - # set addons
812 - pushd "${S}" > /dev/null
813 - local addons=$(echo */configure | sed \
814 - -e 's:/configure::g' \
815 - -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \
816 - -e 's: \+$::' \
817 - -e 's! !,!g' \
818 - -e 's!^!,!' \
819 - -e '/^,\*$/d')
820 - [[ -d ports ]] && addons+=",ports"
821 - popd > /dev/null
822 -
823 - case ${CTARGET} in
824 - powerpc-*)
825 - # Currently gcc on powerpc32 generates invalid code for
826 - # __builtin_return_address(0) calls. Normally programs
827 - # don't do that but malloc hooks in glibc do:
828 - # https://gcc.gnu.org/PR81996
829 - # https://bugs.gentoo.org/629054
830 - myconf+=( --enable-stack-protector=no )
831 - ;;
832 - *)
833 - myconf+=( --enable-stack-protector=all )
834 - ;;
835 - esac
836 - myconf+=( --enable-stackguard-randomization )
837 -
838 - [[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
839 -
840 - if [[ $1 == "nptl" ]] ; then
841 - myconf+=( --enable-kernel=${NPTL_KERN_VER} )
842 - else
843 - die "invalid pthread option"
844 - fi
845 - myconf+=( --enable-add-ons="${addons#,}" )
846 -
847 - # Since SELinux support is only required for nscd, only enable it if:
848 - # 1. USE selinux
849 - # 2. only for the primary ABI on multilib systems
850 - # 3. Not a crosscompile
851 - if ! is_crosscompile && use selinux ; then
852 - if use multilib ; then
853 - if is_final_abi ; then
854 - myconf+=( --with-selinux )
855 - else
856 - myconf+=( --without-selinux )
857 - fi
858 - else
859 - myconf+=( --with-selinux )
860 - fi
861 - else
862 - myconf+=( --without-selinux )
863 - fi
864 -
865 - # Force a few tests where we always know the answer but
866 - # configure is incapable of finding it.
867 - if is_crosscompile ; then
868 - export \
869 - libc_cv_c_cleanup=yes \
870 - libc_cv_forced_unwind=yes
871 - fi
872 -
873 - myconf+=(
874 - --without-cvs
875 - --disable-werror
876 - --enable-bind-now
877 - --build=${CBUILD_OPT:-${CBUILD}}
878 - --host=${CTARGET_OPT:-${CTARGET}}
879 - $(use_enable profile)
880 - $(use_with gd)
881 - --with-headers=$(alt_build_headers)
882 - --prefix="${EPREFIX}/usr"
883 - --sysconfdir="${EPREFIX}/etc"
884 - --localstatedir="${EPREFIX}/var"
885 - --libdir='$(prefix)'/$(get_libdir)
886 - --mandir='$(prefix)'/share/man
887 - --infodir='$(prefix)'/share/info
888 - --libexecdir='$(libdir)'/misc/glibc
889 - --with-bugurl=https://bugs.gentoo.org/
890 - --with-pkgversion="$(glibc_banner)"
891 - $(use_multiarch || echo --disable-multi-arch)
892 - $(in_iuse systemtap && use_enable systemtap)
893 - $(in_iuse nscd && use_enable nscd)
894 - ${EXTRA_ECONF}
895 - )
896 -
897 - # We rely on sys-libs/timezone-data for timezone tools normally.
898 - myconf+=( $(use_enable vanilla timezone-tools) )
899 -
900 - # These libs don't have configure flags.
901 - ac_cv_lib_audit_audit_log_user_avc_message=$(in_iuse audit && usex audit || echo no)
902 - ac_cv_lib_cap_cap_init=$(in_iuse caps && usex caps || echo no)
903 -
904 - # There is no configure option for this and we need to export it
905 - # since the glibc build will re-run configure on itself
906 - export libc_cv_rootsbindir="${EPREFIX}/sbin"
907 - export libc_cv_slibdir="${EPREFIX}/$(get_libdir)"
908 -
909 - # We take care of patching our binutils to use both hash styles,
910 - # and many people like to force gnu hash style only, so disable
911 - # this overriding check. #347761
912 - export libc_cv_hashstyle=no
913 -
914 - local builddir=$(builddir "$1")
915 - mkdir -p "${builddir}"
916 - cd "${builddir}"
917 - set -- "${S}"/configure "${myconf[@]}"
918 - echo "$@"
919 - "$@" || die "failed to configure glibc"
920 -
921 - # ia64 static cross-compilers are a pita in so much that they
922 - # can't produce static ELFs (as the libgcc.a is broken). so
923 - # disable building of the programs for those targets if it
924 - # doesn't work.
925 - # XXX: We could turn this into a compiler test, but ia64 is
926 - # the only one that matters, so this should be fine for now.
927 - if is_crosscompile && [[ ${CTARGET} == ia64* ]] ; then
928 - sed -i '1i+link-static = touch $@' config.make
929 - fi
930 -
931 - # If we're trying to migrate between ABI sets, we need
932 - # to lie and use a local copy of gcc. Like if the system
933 - # is built with MULTILIB_ABIS="amd64 x86" but we want to
934 - # add x32 to it, gcc/glibc don't yet support x32.
935 - if [[ -n ${GCC_BOOTSTRAP_VER} ]] && use multilib ; then
936 - echo 'main(){}' > "${T}"/test.c
937 - if ! $(tc-getCC ${CTARGET}) ${CFLAGS} ${LDFLAGS} "${T}"/test.c -Wl,-emain -lgcc 2>/dev/null ; then
938 - sed -i -e '/^CC = /s:$: -B$(objdir)/../'"gcc-${GCC_BOOTSTRAP_VER}/${ABI}:" config.make || die
939 - mkdir -p sunrpc
940 - cp $(which rpcgen) sunrpc/cross-rpcgen || die
941 - touch -t 202001010101 sunrpc/cross-rpcgen || die
942 - fi
943 - fi
944 -}
945 -
946 -glibc_headers_configure() {
947 - export ABI=default
948 -
949 - local builddir=$(builddir "headers")
950 - mkdir -p "${builddir}"
951 - cd "${builddir}"
952 -
953 - # if we don't have a compiler yet, we can't really test it now ...
954 - # hopefully they don't affect header generation, so let's hope for
955 - # the best here ...
956 - local v vars=(
957 - ac_cv_header_cpuid_h=yes
958 - libc_cv_{386,390,alpha,arm,hppa,ia64,mips,{powerpc,sparc}{,32,64},sh,x86_64}_tls=yes
959 - libc_cv_asm_cfi_directives=yes
960 - libc_cv_broken_visibility_attribute=no
961 - libc_cv_c_cleanup=yes
962 - libc_cv_forced_unwind=yes
963 - libc_cv_gcc___thread=yes
964 - libc_cv_mlong_double_128=yes
965 - libc_cv_mlong_double_128ibm=yes
966 - libc_cv_ppc_machine=yes
967 - libc_cv_ppc_rel16=yes
968 - libc_cv_predef_fortify_source=no
969 - libc_cv_visibility_attribute=yes
970 - libc_cv_z_combreloc=yes
971 - libc_cv_z_execstack=yes
972 - libc_cv_z_initfirst=yes
973 - libc_cv_z_nodelete=yes
974 - libc_cv_z_nodlopen=yes
975 - libc_cv_z_relro=yes
976 - libc_mips_abi=${ABI}
977 - libc_mips_float=$([[ $(tc-is-softfloat) == "yes" ]] && echo soft || echo hard)
978 - # These libs don't have configure flags.
979 - ac_cv_lib_audit_audit_log_user_avc_message=no
980 - ac_cv_lib_cap_cap_init=no
981 - )
982 -
983 - einfo "Forcing cached settings:"
984 - for v in "${vars[@]}" ; do
985 - einfo " ${v}"
986 - export ${v}
987 - done
988 -
989 - # Blow away some random CC settings that screw things up. #550192
990 - if [[ -d ${S}/sysdeps/mips ]]; then
991 - pushd "${S}"/sysdeps/mips >/dev/null
992 - sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=32:' mips32/Makefile mips64/n32/Makefile || die
993 - sed -i -e '/^CC +=/s:=.*:= -D_MIPS_SZPTR=64:' mips64/n64/Makefile || die
994 -
995 - # Force the mips ABI to the default. This is OK because the set of
996 - # installed headers in this phase is the same between the 3 ABIs.
997 - # If this ever changes, this hack will break, but that's unlikely
998 - # as glibc discourages that behavior.
999 - # https://crbug.com/647033
1000 - sed -i -e 's:abiflag=.*:abiflag=_ABIO32:' preconfigure || die
1001 -
1002 - popd >/dev/null
1003 - fi
1004 -
1005 - local myconf=()
1006 - myconf+=(
1007 - --disable-sanity-checks
1008 - --enable-hacker-mode
1009 - --without-cvs
1010 - --disable-werror
1011 - --enable-bind-now
1012 - --build=${CBUILD_OPT:-${CBUILD}}
1013 - --host=${CTARGET_OPT:-${CTARGET}}
1014 - --with-headers=$(alt_build_headers)
1015 - --prefix="${EPREFIX}/usr"
1016 - ${EXTRA_ECONF}
1017 - )
1018 -
1019 - local addons
1020 - [[ -d ${S}/ports ]] && addons+=",ports"
1021 - myconf+=( --enable-add-ons="${addons#,}" )
1022 -
1023 - # Nothing is compiled here which would affect the headers for the target.
1024 - # So forcing CC/CFLAGS is sane.
1025 - set -- "${S}"/configure "${myconf[@]}"
1026 - echo "$@"
1027 - CC="$(tc-getBUILD_CC)" \
1028 - CFLAGS="-O1 -pipe" \
1029 - CPPFLAGS="-U_FORTIFY_SOURCE" \
1030 - LDFLAGS="" \
1031 - "$@" || die "failed to configure glibc"
1032 -}
1033 -
1034 -do_src_configure() {
1035 - if just_headers ; then
1036 - glibc_headers_configure
1037 - else
1038 - glibc_do_configure nptl
1039 - fi
1040 -}
1041 -
1042 -src_configure() {
1043 - foreach_abi do_src_configure
1044 -}
1045 -
1046 -do_src_compile() {
1047 - emake -C "$(builddir nptl)" || die "make nptl for ${ABI} failed"
1048 -}
1049 -
1050 -src_compile() {
1051 - if just_headers ; then
1052 - return
1053 - fi
1054 -
1055 - foreach_abi do_src_compile
1056 -}
1057 -
1058 -glibc_src_test() {
1059 - cd "$(builddir $1)"
1060 - emake -j1 check
1061 -}
1062 -
1063 -do_src_test() {
1064 - local ret=0
1065 -
1066 - glibc_src_test nptl
1067 - : $(( ret |= $? ))
1068 -
1069 - return ${ret}
1070 -}
1071 -
1072 -src_test() {
1073 - # Give tests more time to complete.
1074 - export TIMEOUTFACTOR=5
1075 -
1076 - foreach_abi do_src_test || die "tests failed"
1077 -}
1078 -
1079 -glibc_do_src_install() {
1080 - local builddir=$(builddir nptl)
1081 - cd "${builddir}"
1082 -
1083 - emake install_root="${D}$(alt_prefix)" install || die
1084 -
1085 - # This version (2.26) provides some compatibility libraries for the NIS/NIS+ support
1086 - # which come without headers etc. Only needed for binary packages since the
1087 - # external net-libs/libnsl has increased soversion. Keep only versioned libraries.
1088 - find "${D}" -name "libnsl.a" -delete
1089 - find "${D}" -name "libnsl.so" -delete
1090 -
1091 - # Normally real_pv is ${PV}. Live ebuilds are exception, there we need
1092 - # to infer upstream version:
1093 - # '#define VERSION "2.26.90"' -> '2.26.90'
1094 - local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h)
1095 -
1096 - # Newer versions get fancy with libm linkage to include vectorized support.
1097 - # While we don't really need a ldscript here, portage QA checks get upset.
1098 - if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then
1099 - dosym ../../$(get_libdir)/libm-${upstream_pv}.so $(alt_usrlibdir)/libm-${upstream_pv}.so
1100 - fi
1101 -
1102 - # We'll take care of the cache ourselves
1103 - rm -f "${ED}"/etc/ld.so.cache
1104 -
1105 - # Everything past this point just needs to be done once ...
1106 - is_final_abi || return 0
1107 -
1108 - # Make sure the non-native interp can be found on multilib systems even
1109 - # if the main library set isn't installed into the right place. Maybe
1110 - # we should query the active gcc for info instead of hardcoding it ?
1111 - local i ldso_abi ldso_name
1112 - local ldso_abi_list=(
1113 - # x86
1114 - amd64 /lib64/ld-linux-x86-64.so.2
1115 - x32 /libx32/ld-linux-x32.so.2
1116 - x86 /lib/ld-linux.so.2
1117 - # mips
1118 - o32 /lib/ld.so.1
1119 - n32 /lib32/ld.so.1
1120 - n64 /lib64/ld.so.1
1121 - # powerpc
1122 - ppc /lib/ld.so.1
1123 - ppc64 /lib64/ld64.so.1
1124 - # s390
1125 - s390 /lib/ld.so.1
1126 - s390x /lib/ld64.so.1
1127 - # sparc
1128 - sparc32 /lib/ld-linux.so.2
1129 - sparc64 /lib64/ld-linux.so.2
1130 - )
1131 - case $(tc-endian) in
1132 - little)
1133 - ldso_abi_list+=(
1134 - # arm
1135 - arm64 /lib/ld-linux-aarch64.so.1
1136 - )
1137 - ;;
1138 - big)
1139 - ldso_abi_list+=(
1140 - # arm
1141 - arm64 /lib/ld-linux-aarch64_be.so.1
1142 - )
1143 - ;;
1144 - esac
1145 - if [[ ${SYMLINK_LIB} == "yes" ]] && [[ ! -e ${ED}/$(alt_prefix)/lib ]] ; then
1146 - dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
1147 - fi
1148 - for (( i = 0; i < ${#ldso_abi_list[@]}; i += 2 )) ; do
1149 - ldso_abi=${ldso_abi_list[i]}
1150 - has ${ldso_abi} $(get_install_abis) || continue
1151 -
1152 - ldso_name="$(alt_prefix)${ldso_abi_list[i+1]}"
1153 - if [[ ! -L ${ED}/${ldso_name} && ! -e ${ED}/${ldso_name} ]] ; then
1154 - dosym ../$(get_abi_LIBDIR ${ldso_abi})/${ldso_name##*/} ${ldso_name}
1155 - fi
1156 - done
1157 -
1158 - # With devpts under Linux mounted properly, we do not need the pt_chown
1159 - # binary to be setuid. This is because the default owners/perms will be
1160 - # exactly what we want.
1161 - if in_iuse suid && ! use suid ; then
1162 - find "${ED}" -name pt_chown -exec chmod -s {} +
1163 - fi
1164 -
1165 - #################################################################
1166 - # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY #
1167 - # Make sure we install some symlink hacks so that when we build
1168 - # a 2nd stage cross-compiler, gcc finds the target system
1169 - # headers correctly. See gcc/doc/gccinstall.info
1170 - if is_crosscompile ; then
1171 - # We need to make sure that /lib and /usr/lib always exists.
1172 - # gcc likes to use relative paths to get to its multilibs like
1173 - # /usr/lib/../lib64/. So while we don't install any files into
1174 - # /usr/lib/, we do need it to exist.
1175 - cd "${ED}"$(alt_libdir)/..
1176 - [[ -e lib ]] || mkdir lib
1177 - cd "${ED}"$(alt_usrlibdir)/..
1178 - [[ -e lib ]] || mkdir lib
1179 -
1180 - dosym usr/include $(alt_prefix)/sys-include
1181 - return 0
1182 - fi
1183 -
1184 - # Files for Debian-style locale updating
1185 - dodir /usr/share/i18n
1186 - sed \
1187 - -e "/^#/d" \
1188 - -e "/SUPPORTED-LOCALES=/d" \
1189 - -e "s: \\\\::g" -e "s:/: :g" \
1190 - "${S}"/localedata/SUPPORTED > "${ED}"/usr/share/i18n/SUPPORTED \
1191 - || die "generating /usr/share/i18n/SUPPORTED failed"
1192 - cd "${WORKDIR}"/extra/locale
1193 - dosbin locale-gen
1194 - doman *.[0-8]
1195 - insinto /etc
1196 - doins locale.gen
1197 -
1198 - # Make sure all the ABI's can find the locales and so we only
1199 - # have to generate one set
1200 - local a
1201 - keepdir /usr/$(get_libdir)/locale
1202 - for a in $(get_install_abis) ; do
1203 - if [[ ! -e ${ED}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then
1204 - dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale
1205 - fi
1206 - done
1207 -
1208 - cd "${S}"
1209 -
1210 - # Install misc network config files
1211 - insinto /etc
1212 - doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf
1213 - doins "${WORKDIR}"/extra/etc/*.conf
1214 -
1215 - if use nscd ; then
1216 - doinitd "$(prefixify_ro "${WORKDIR}"/extra/etc/nscd)"
1217 -
1218 - local nscd_args=(
1219 - -e "s:@PIDFILE@:$(strings "${ED}"/usr/sbin/nscd | grep nscd.pid):"
1220 - )
1221 -
1222 - sed -i "${nscd_args[@]}" "${ED}"/etc/init.d/nscd
1223 -
1224 - systemd_dounit nscd/nscd.service
1225 - systemd_newtmpfilesd nscd/nscd.tmpfiles nscd.conf
1226 - else
1227 - # Do this since extra/etc/*.conf above might have nscd.conf.
1228 - rm -f "${ED}"/etc/nscd.conf
1229 - fi
1230 -
1231 - echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc
1232 - doenvd "${T}"/00glibc
1233 -
1234 - for d in BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* ; do
1235 - [[ -s ${d} ]] && dodoc ${d}
1236 - done
1237 -
1238 - # Prevent overwriting of the /etc/localtime symlink. We'll handle the
1239 - # creation of the "factory" symlink in pkg_postinst().
1240 - rm -f "${ED}"/etc/localtime
1241 -}
1242 -
1243 -glibc_headers_install() {
1244 - local builddir=$(builddir "headers")
1245 - cd "${builddir}"
1246 - emake install_root="${D}$(alt_prefix)" install-headers
1247 -
1248 - insinto $(alt_headers)/gnu
1249 - doins "${S}"/include/gnu/stubs.h
1250 -
1251 - # Make sure we install the sys-include symlink so that when
1252 - # we build a 2nd stage cross-compiler, gcc finds the target
1253 - # system headers correctly. See gcc/doc/gccinstall.info
1254 - dosym usr/include $(alt_prefix)/sys-include
1255 -}
1256 -
1257 -src_install() {
1258 - if just_headers ; then
1259 - export ABI=default
1260 - glibc_headers_install
1261 - return
1262 - fi
1263 -
1264 - foreach_abi glibc_do_src_install
1265 - src_strip
1266 -}
1267 -
1268 -pkg_preinst() {
1269 - # nothing to do if just installing headers
1270 - just_headers && return
1271 -
1272 - # prepare /etc/ld.so.conf.d/ for files
1273 - mkdir -p "${EROOT}"/etc/ld.so.conf.d
1274 -
1275 - # Default /etc/hosts.conf:multi to on for systems with small dbs.
1276 - if [[ $(wc -l < "${EROOT}"/etc/hosts) -lt 1000 ]] ; then
1277 - sed -i '/^multi off/s:off:on:' "${ED}"/etc/host.conf
1278 - elog "Defaulting /etc/host.conf:multi to on"
1279 - fi
1280 -
1281 - [[ ${ROOT} != "/" ]] && return 0
1282 - [[ -d ${ED}/$(get_libdir) ]] || return 0
1283 - [[ -z ${BOOTSTRAP_RAP} ]] && glibc_sanity_check
1284 -}
1285 -
1286 -pkg_postinst() {
1287 - # nothing to do if just installing headers
1288 - just_headers && return
1289 -
1290 - if ! tc-is-cross-compiler && [[ -x ${EROOT}/usr/sbin/iconvconfig ]] ; then
1291 - # Generate fastloading iconv module configuration file.
1292 - "${EROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}"
1293 - fi
1294 -
1295 - if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then
1296 - # Reload init ... if in a chroot or a diff init package, ignore
1297 - # errors from this step #253697
1298 - /sbin/telinit U 2>/dev/null
1299 -
1300 - # if the host locales.gen contains no entries, we'll install everything
1301 - local locale_list="${EROOT}etc/locale.gen"
1302 - if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then
1303 - ewarn "Generating all locales; edit /etc/locale.gen to save time/space"
1304 - locale_list="${EROOT}usr/share/i18n/SUPPORTED"
1305 - fi
1306 - locale-gen -j $(makeopts_jobs) --config "${locale_list}"
1307 - fi
1308 -}