1 |
commit: 87ebf237bbdca2c6caf835514b4e9be33b2e14cf |
2 |
Author: XU Benda <heroxbd <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Sep 2 17:05:58 2013 +0000 |
4 |
Commit: Benda XU <heroxbd <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 2 17:05:58 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/heroxbd.git;a=commit;h=87ebf237 |
7 |
|
8 |
delete backup files |
9 |
|
10 |
--- |
11 |
sys-devel/binutils-config/a.out | Bin 482872 -> 0 bytes |
12 |
.../patches/binutils-config-prefix.patch~ | 212 --------------- |
13 |
sys-libs/glibc/files/eblits/common.eblit~ | 287 --------------------- |
14 |
sys-libs/glibc/files/eblits/src_compile.eblit~ | 208 --------------- |
15 |
sys-libs/glibc/files/eblits/src_install.eblit~ | 252 ------------------ |
16 |
5 files changed, 959 deletions(-) |
17 |
|
18 |
diff --git a/sys-devel/binutils-config/a.out b/sys-devel/binutils-config/a.out |
19 |
deleted file mode 100755 |
20 |
index 6f77b45..0000000 |
21 |
Binary files a/sys-devel/binutils-config/a.out and /dev/null differ |
22 |
|
23 |
diff --git a/sys-devel/binutils-config/patches/binutils-config-prefix.patch~ b/sys-devel/binutils-config/patches/binutils-config-prefix.patch~ |
24 |
deleted file mode 100644 |
25 |
index 62bab09..0000000 |
26 |
--- a/sys-devel/binutils-config/patches/binutils-config-prefix.patch~ |
27 |
+++ /dev/null |
28 |
@@ -1,212 +0,0 @@ |
29 |
-Index: binutils-config/files/binutils-config-3 |
30 |
-=================================================================== |
31 |
---- binutils-config.orig/files/binutils-config-3 2013-06-30 23:57:22.650003585 +0900 |
32 |
-+++ binutils-config/files/binutils-config-3 2013-06-30 23:59:48.426725571 +0900 |
33 |
-@@ -7,17 +7,23 @@ |
34 |
- # config-TARGET: CURRENT=version for TARGET |
35 |
- # TARGET-VER: has a TARGET and VER variable |
36 |
- |
37 |
-+EPREFIX="@GENTOO_PORTAGE_EPREFIX@" |
38 |
-+if [[ ${EPREFIX} == "@"GENTOO_PORTAGE_EPREFIX"@" ]] ; then |
39 |
-+ EPREFIX="" |
40 |
-+fi |
41 |
-+ |
42 |
- : ${ROOT:=/} |
43 |
- [[ ${ROOT} != */ ]] && ROOT="${ROOT}/" |
44 |
- [[ ${ROOT} != /* ]] && ROOT="${PWD%/}/${ROOT}" |
45 |
-+EROOT="${ROOT%/}${EPREFIX}/" |
46 |
- |
47 |
--cd / |
48 |
-+cd "${EPREFIX}" |
49 |
- |
50 |
- trap ":" INT QUIT TSTP |
51 |
- |
52 |
- argv0=${0##*/} |
53 |
--source /etc/init.d/functions.sh || { |
54 |
-- echo "${argv0}: Could not source /etc/init.d/functions.sh!" 1>&2 |
55 |
-+source "${EPREFIX}"/etc/init.d/functions.sh || { |
56 |
-+ echo "${argv0}: Could not source ${EPREFIX}/etc/init.d/functions.sh!" 1>&2 |
57 |
- exit 1 |
58 |
- } |
59 |
- esyslog() { :; } |
60 |
-@@ -123,14 +129,14 @@ |
61 |
- # Newer paths: /usr/${HOST}/${TARGET}/... |
62 |
- # Older paths: /usr/${TARGET}/... |
63 |
- # |
64 |
-- if [[ -d ${ROOT}/usr/${HOST}/${TARGET}/binutils-bin/${VER} ]] ; then |
65 |
-- BINPATH=/usr/${HOST}/${TARGET}/binutils-bin/${VER} |
66 |
-- BINPATH_LINKS=/usr/libexec/gcc/${TARGET} |
67 |
-+ if [[ -d ${EROOT}/usr/${HOST}/${TARGET}/binutils-bin/${VER} ]] ; then |
68 |
-+ BINPATH="${EPREFIX}"/usr/${HOST}/${TARGET}/binutils-bin/${VER} |
69 |
-+ BINPATH_LINKS="${EPREFIX}"/usr/libexec/gcc/${TARGET} |
70 |
- fi |
71 |
- fi |
72 |
- if [[ -z ${BINPATH} ]] ; then |
73 |
-- BINPATH=/usr/${TARGET}/binutils-bin/${VER} |
74 |
-- BINPATH_LINKS=/usr/${TARGET}/bin |
75 |
-+ BINPATH="${EPREFIX}"/usr/${TARGET}/binutils-bin/${VER} |
76 |
-+ BINPATH_LINKS="${EPREFIX}"/usr/${TARGET}/bin |
77 |
- fi |
78 |
- } |
79 |
- |
80 |
-@@ -139,17 +145,17 @@ |
81 |
- |
82 |
- setup_env || return 1 |
83 |
- |
84 |
-- cd "${ROOT}/${BINPATH}" || exit 1 |
85 |
-- mkdir -p "${ROOT}/${BINPATH_LINKS}" "${ROOT}/usr/bin" |
86 |
-+ cd "${EROOT}/${BINPATH}" || exit 1 |
87 |
-+ mkdir -p "${EROOT}/${BINPATH_LINKS}" "${EROOT}/usr/bin" |
88 |
- for x in * ; do |
89 |
-- atomic_ln "${BINPATH}/${x}" "${ROOT}/${BINPATH_LINKS}" "${x}" |
90 |
-- atomic_ln "${BINPATH_LINKS}/${x}" "${ROOT}/usr/bin/" "${TARGET}-${x}" |
91 |
-+ atomic_ln "${EROOT}/${BINPATH}/${x}" "${EROOT}/${BINPATH_LINKS}" "${x}" |
92 |
-+ atomic_ln "${EROOT}/${BINPATH_LINKS}/${x}" "${EROOT}/usr/bin/" "${TARGET}-${x}" |
93 |
- for fake in ${FAKE_TARGETS} ; do |
94 |
- [[ -f ${ENV_D}/config-${fake} ]] && continue |
95 |
-- atomic_ln "${BINPATH_LINKS}/${x}" "${ROOT}/usr/bin" "${fake}-${x}" |
96 |
-+ atomic_ln "${EPREFIX}/${BINPATH_LINKS}/${x}" "${EROOT}/usr/bin" "${fake}-${x}" |
97 |
- done |
98 |
- if [[ ${TARGET} == ${HOST} ]] ; then |
99 |
-- atomic_ln "${TARGET}-${x}" "${ROOT}/usr/bin" "${x}" |
100 |
-+ atomic_ln "${TARGET}-${x}" "${EROOT}/usr/bin" "${x}" |
101 |
- fi |
102 |
- done |
103 |
- |
104 |
-@@ -157,38 +163,39 @@ |
105 |
- # Generate library / ldscripts symlinks |
106 |
- # |
107 |
- : ${LIBPATH:=/usr/lib/binutils/${TARGET}/${VER}} |
108 |
-- cd "${ROOT}/${LIBPATH}" || exit 1 |
109 |
-+ LIBPATH=${LIBPATH#${EPREFIX}} |
110 |
-+ cd "${EROOT}/${LIBPATH}" || exit 1 |
111 |
- if [[ ${TARGET} == ${HOST} ]] ; then |
112 |
-- dstlib=${ROOT}/usr/${HOST}/lib |
113 |
-+ dstlib=${EROOT}/usr/${HOST}/lib |
114 |
- else |
115 |
-- dstlib=${ROOT}/usr/${HOST}/${TARGET}/lib |
116 |
-+ dstlib=${EROOT}/usr/${HOST}/${TARGET}/lib |
117 |
- fi |
118 |
- # When upgrading, we need to clean up ldscripts and libs |
119 |
- mkdir -p "${dstlib}" |
120 |
-- rm -rf "${ROOT}/${BINPATH_LINKS}"/ldscripts |
121 |
-- atomic_ln "${LIBPATH}/ldscripts" "${dstlib}" "ldscripts" |
122 |
-+ rm -rf "${EROOT}/${BINPATH_LINKS}"/ldscripts |
123 |
-+ atomic_ln "${EROOT}/${LIBPATH}/ldscripts" "${dstlib}" "ldscripts" |
124 |
- find -L "${dstlib}" -type l -exec rm -v {} + |
125 |
- for x in lib* ; do |
126 |
-- atomic_ln "${LIBPATH}/${x}" "${dstlib}" "${x}" |
127 |
-+ atomic_ln "${EPREFIX}/${LIBPATH}/${x}" "${dstlib}" "${x}" |
128 |
- done |
129 |
- |
130 |
- # |
131 |
- # Generate include symlinks |
132 |
- # |
133 |
- INCPATH=${LIBPATH}/include |
134 |
-- if [[ -d ${ROOT}/${INCPATH} ]] ; then |
135 |
-- cd "${ROOT}/${INCPATH}" || exit 1 |
136 |
-+ if [[ -d ${EROOT}/${INCPATH} ]] ; then |
137 |
-+ cd "${EROOT}/${INCPATH}" || exit 1 |
138 |
- if [[ ${HOST} == ${TARGET} ]] ; then |
139 |
-- mkdir -p "${ROOT}/usr/include" |
140 |
-+ mkdir -p "${EROOT}/usr/include" |
141 |
- for x in * ; do |
142 |
-- atomic_ln "${INCPATH}/${x}" "${ROOT}/usr/include" "${x}" |
143 |
-+ atomic_ln "${EPREFIX}/${INCPATH}/${x}" "${EROOT}/usr/include" "${x}" |
144 |
- done |
145 |
- else |
146 |
- # Clean out old path -- cannot use '-exec {} +' syntax here |
147 |
-- find . -type f -exec rm -f "${ROOT}/usr/${TARGET}/usr/include/{}" \; |
148 |
-- rmdir "${ROOT}/usr/${TARGET}/usr/include" >& /dev/null |
149 |
-- rmdir "${ROOT}/usr/${TARGET}/usr" >& /dev/null |
150 |
-- rmdir "${ROOT}/usr/${TARGET}" >& /dev/null |
151 |
-+ find . -type f -exec rm -f "${EROOT}/usr/${TARGET}/usr/include/{}" \; |
152 |
-+ rmdir "${EROOT}/usr/${TARGET}/usr/include" >& /dev/null |
153 |
-+ rmdir "${EROOT}/usr/${TARGET}/usr" >& /dev/null |
154 |
-+ rmdir "${EROOT}/usr/${TARGET}" >& /dev/null |
155 |
- fi |
156 |
- fi |
157 |
- |
158 |
-@@ -197,14 +204,14 @@ |
159 |
- # |
160 |
- if [[ ${TARGET} == ${HOST} ]] ; then |
161 |
- DATAPATH=/usr/share/binutils-data/${TARGET}/${VER} |
162 |
-- local e="${ROOT}"/etc/env.d/05binutils |
163 |
-+ local e="${EROOT}"/etc/env.d/05binutils |
164 |
- local ee="${e}.tmp" |
165 |
- rm -f "${ee}" |
166 |
- [[ -d ${DATAPATH}/man ]] && echo "MANPATH=${DATAPATH}/man" >> "${ee}" |
167 |
- [[ -d ${DATAPATH}/info ]] && echo "INFOPATH=${DATAPATH}/info" >> "${ee}" |
168 |
- # hmm, `ld` has this in SEARCH_DIR(), but ld.so does not ... |
169 |
-- if [[ -d ${ROOT}/etc/ld.so.conf.d ]] ; then |
170 |
-- local l="${ROOT}"/etc/ld.so.conf.d/05binutils.conf |
171 |
-+ if [[ -d ${EROOT}/etc/ld.so.conf.d ]] ; then |
172 |
-+ local l="${EROOT}"/etc/ld.so.conf.d/05binutils.conf |
173 |
- local ll="${l}.tmp" |
174 |
- echo "/usr/${TARGET}/lib" > "${ll}" |
175 |
- mv_if_diff "${ll}" "${l}" |
176 |
-@@ -254,7 +261,7 @@ |
177 |
- die "no profiles exist for '${TARGET}'" |
178 |
- fi |
179 |
- |
180 |
-- rm -f "${ENV_D}"/config-${TARGET} "${ROOT}"/etc/ld.so.conf.d/05binutils.conf |
181 |
-+ rm -f "${ENV_D}"/config-${TARGET} "${EROOT}"/etc/ld.so.conf.d/05binutils.conf |
182 |
- |
183 |
- # XXX: we still leave behind FAKE_TARGETS in /usr/bin ... |
184 |
- local x |
185 |
-@@ -264,28 +271,28 @@ |
186 |
- nm objcopy objdump ranlib readelf size strings strip |
187 |
- do |
188 |
- x=( |
189 |
-- "${ROOT}"/usr/bin/${TARGET}-${x} |
190 |
-- "${ROOT}"/usr/{${HOST}/,}${TARGET}/bin/${x} |
191 |
-- "${ROOT}"/usr/libexec/gcc/${TARGET}/${x} |
192 |
-+ "${EROOT}"/usr/bin/${TARGET}-${x} |
193 |
-+ "${EROOT}"/usr/{${HOST}/,}${TARGET}/bin/${x} |
194 |
-+ "${EROOT}"/usr/libexec/gcc/${TARGET}/${x} |
195 |
- ) |
196 |
- rm -f "${x[@]}" |
197 |
- done |
198 |
- for x in ansidecl.h bfd.h bfdlink.h dis-asm.h symcat.h ; do |
199 |
-- rm -f "${ROOT}"/usr/{${HOST}/,}${TARGET}/{usr/,}include/${x} |
200 |
-+ rm -f "${EROOT}"/usr/{${HOST}/,}${TARGET}/{usr/,}include/${x} |
201 |
- done |
202 |
- for x in bfd iberty opcodes ; do |
203 |
-- rm -f "${ROOT}"/usr/${HOST}/${TARGET}/lib/lib${x}{{-*,}.so,.a,.la} |
204 |
-+ rm -f "${EROOT}"/usr/${HOST}/${TARGET}/lib/lib${x}{{-*,}.so,.a,.la} |
205 |
- done |
206 |
- # Delete broken symlinks |
207 |
-- local destdir="${ROOT}/usr/${HOST}/${TARGET}" |
208 |
-+ local destdir="${EROOT}/usr/${HOST}/${TARGET}" |
209 |
- rm -f "${destdir}"/lib/ldscripts |
210 |
- find -L "${destdir}"/lib -type l -exec rm {} + |
211 |
- rmdir \ |
212 |
- "${destdir}"/{bin,include,lib,usr} \ |
213 |
- "${destdir}" \ |
214 |
-- "${ROOT}"/var/db/pkg/cross-${TARGET} \ |
215 |
-- "${ROOT}"/usr/{${HOST}/,}${TARGET}/bin \ |
216 |
-- "${ROOT}"/usr/libexec/gcc/${TARGET} \ |
217 |
-+ "${EROOT}"/var/db/pkg/cross-${TARGET} \ |
218 |
-+ "${EROOT}"/usr/{${HOST}/,}${TARGET}/bin \ |
219 |
-+ "${EROOT}"/usr/libexec/gcc/${TARGET} \ |
220 |
- 2>/dev/null |
221 |
- |
222 |
- rm -f "${ENV_D}"/${TARGET}-* |
223 |
-@@ -366,7 +373,7 @@ |
224 |
- esac |
225 |
- |
226 |
- setup_env || return 1 |
227 |
-- bpath="${ROOT}/${BINPATH}" |
228 |
-+ bpath="${EROOT}/${BINPATH}" |
229 |
- |
230 |
- # does this binutils even support the requested linker ? |
231 |
- if [[ ! -e ${bpath}/${ld} ]] ; then |
232 |
-@@ -384,7 +391,7 @@ |
233 |
- : ${HOST:=${CHOST:-$(portageq envvar CHOST)}} |
234 |
- } |
235 |
- |
236 |
--ENV_D="${ROOT}etc/env.d/binutils" |
237 |
-+ENV_D="${EROOT}etc/env.d/binutils" |
238 |
- |
239 |
- DEBUG="no" |
240 |
- NEED_ACTION="yes" |
241 |
|
242 |
diff --git a/sys-libs/glibc/files/eblits/common.eblit~ b/sys-libs/glibc/files/eblits/common.eblit~ |
243 |
deleted file mode 100644 |
244 |
index db4c5f3..0000000 |
245 |
--- a/sys-libs/glibc/files/eblits/common.eblit~ |
246 |
+++ /dev/null |
247 |
@@ -1,287 +0,0 @@ |
248 |
-# Copyright 1999-2007 Gentoo Foundation |
249 |
-# Distributed under the terms of the GNU General Public License v2 |
250 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.11 2010/06/16 01:43:37 zorry Exp $ |
251 |
- |
252 |
-# We need to be able to set alternative headers for |
253 |
-# compiling for non-native platform |
254 |
-# Will also become useful for testing kernel-headers without screwing up |
255 |
-# the whole system. |
256 |
-# note: intentionally undocumented. |
257 |
-alt_headers() { |
258 |
- if [[ -z ${ALT_HEADERS} ]] ; then |
259 |
- if is_crosscompile ; then |
260 |
- ALT_HEADERS="${EPREFIX}/usr/${CTARGET}/usr/include" |
261 |
- else |
262 |
- ALT_HEADERS="${EPREFIX}/usr/include" |
263 |
- fi |
264 |
- fi |
265 |
- echo "${ALT_HEADERS}" |
266 |
-} |
267 |
-alt_build_headers() { |
268 |
- if [[ -z ${ALT_BUILD_HEADERS} ]] ; then |
269 |
- ALT_BUILD_HEADERS=$(alt_headers) |
270 |
- if tc-is-cross-compiler ; then |
271 |
- ALT_BUILD_HEADERS=${ROOT}$(alt_headers) |
272 |
- if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then |
273 |
- local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') |
274 |
- ALT_BUILD_HEADERS=${header_path%/linux/version.h} |
275 |
- fi |
276 |
- fi |
277 |
- fi |
278 |
- echo "${ALT_BUILD_HEADERS}" |
279 |
-} |
280 |
- |
281 |
-alt_usrlibdir() { |
282 |
- if is_crosscompile ; then |
283 |
- echo /usr/${CTARGET}/usr/$(get_libdir) |
284 |
- else |
285 |
- echo /usr/$(get_libdir) |
286 |
- fi |
287 |
-} |
288 |
- |
289 |
-setup_flags() { |
290 |
- # Make sure host make.conf doesn't pollute us |
291 |
- if is_crosscompile || tc-is-cross-compiler ; then |
292 |
- CHOST=${CTARGET} strip-unsupported-flags |
293 |
- fi |
294 |
- |
295 |
- # Store our CFLAGS because it's changed depending on which CTARGET |
296 |
- # we are building when pulling glibc on a multilib profile |
297 |
- CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} |
298 |
- CFLAGS=${CFLAGS_BASE} |
299 |
- CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} |
300 |
- CXXFLAGS=${CXXFLAGS_BASE} |
301 |
- ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} |
302 |
- ASFLAGS=${ASFLAGS_BASE} |
303 |
- |
304 |
- # Over-zealous CFLAGS can often cause problems. What may work for one |
305 |
- # person may not work for another. To avoid a large influx of bugs |
306 |
- # relating to failed builds, we strip most CFLAGS out to ensure as few |
307 |
- # problems as possible. |
308 |
- strip-flags |
309 |
- strip-unsupported-flags |
310 |
- filter-flags -m32 -m64 -mabi=* |
311 |
- |
312 |
- unset CBUILD_OPT CTARGET_OPT |
313 |
- if has_multilib_profile ; then |
314 |
- CTARGET_OPT=$(get_abi_CTARGET) |
315 |
- [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) |
316 |
- fi |
317 |
- |
318 |
- case $(tc-arch) in |
319 |
- x86) |
320 |
- # -march needed for #185404 |
321 |
- local t=${CTARGET_OPT:-${CTARGET}} |
322 |
- t=${t%%-*} |
323 |
- if ! echo "" | $(tc-getCC) ${CFLAGS} -E -dD - | grep -qs __${t}__ ; then |
324 |
- filter-flags '-march=*' |
325 |
- export CFLAGS="-march=${t} ${CFLAGS}" |
326 |
- fi |
327 |
- ;; |
328 |
- amd64) |
329 |
- # Punt this when amd64's 2004.3 is removed |
330 |
- CFLAGS_x86="-m32" |
331 |
- |
332 |
- # -march needed for #185404 |
333 |
- local t=${CTARGET_OPT:-${CTARGET}} |
334 |
- t=${t%%-*} |
335 |
- if ! echo "" | $(tc-getCC) ${CFLAGS} ${CFLAGS_x86} -m32 -E -dD - | grep -qs __${t}__ ; then |
336 |
- filter-flags '-march=*' |
337 |
- export CFLAGS_x86="${CFLAGS_x86} -march=${t}" |
338 |
- fi |
339 |
- ;; |
340 |
- ppc) |
341 |
- append-flags "-freorder-blocks" |
342 |
- ;; |
343 |
- sparc) |
344 |
- # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. |
345 |
- filter-flags "-fcall-used-g7" |
346 |
- append-flags "-fcall-used-g6" |
347 |
- filter-flags "-mvis" |
348 |
- |
349 |
- GLIBCMAJOR=$(get_version_component_range 1 ${PV}) |
350 |
- GLIBCMINOR=$(get_version_component_range 2 ${PV}) |
351 |
- |
352 |
- # set CTARGET_OPT so glibc can use cpu-specific .S files for better performance |
353 |
- # - UltraSPARC T1 (niagara) support requires >= glibc 2.8 |
354 |
- # - UltraSPARC T2 (niagara2) support requires >= glibc 2.7 |
355 |
- |
356 |
- if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then |
357 |
- case ${ABI} in |
358 |
- sparc64) |
359 |
- filter-flags -Wa,-xarch -Wa,-A |
360 |
- |
361 |
- if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then |
362 |
- CTARGET_OPT="sparc64v2-unknown-linux-gnu" |
363 |
- append-flags "-Wa,-xarch=v9b" |
364 |
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b" |
365 |
- elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then |
366 |
- CTARGET_OPT="sparc64v-unknown-linux-gnu" |
367 |
- append-flags "-Wa,-xarch=v9b" |
368 |
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b" |
369 |
- elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then |
370 |
- CTARGET_OPT="sparc64b-unknown-linux-gnu" |
371 |
- append-flags "-Wa,-xarch=v9b" |
372 |
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b" |
373 |
- else |
374 |
- CTARGET_OPT="sparc64-unknown-linux-gnu" |
375 |
- append-flags "-Wa,-xarch=v9a" |
376 |
- export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a" |
377 |
- fi |
378 |
- ;; |
379 |
- *) |
380 |
- if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then |
381 |
- CTARGET_OPT="sparcv9v2-unknown-linux-gnu" |
382 |
- elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then |
383 |
- CTARGET_OPT="sparcv9v-unknown-linux-gnu" |
384 |
- elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then |
385 |
- CTARGET_OPT="sparcv9b-unknown-linux-gnu" |
386 |
- else |
387 |
- CTARGET_OPT="sparcv9-unknown-linux-gnu" |
388 |
- fi |
389 |
- ;; |
390 |
- esac |
391 |
- else |
392 |
- if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then |
393 |
- CTARGET_OPT="sparcv9v2-unknown-linux-gnu" |
394 |
- elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then |
395 |
- CTARGET_OPT="sparcv9v-unknown-linux-gnu" |
396 |
- elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then |
397 |
- CTARGET_OPT="sparcv9b-unknown-linux-gnu" |
398 |
- elif { is_crosscompile && want_nptl; } || is-flagq "-mcpu=ultrasparc2" || is-flagq "-mcpu=ultrasparc"; then |
399 |
- CTARGET_OPT="sparcv9-unknown-linux-gnu" |
400 |
- fi |
401 |
- fi |
402 |
- ;; |
403 |
- esac |
404 |
- |
405 |
- if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then |
406 |
- CBUILD_OPT=${CTARGET_OPT} |
407 |
- fi |
408 |
- |
409 |
- # Lock glibc at -O2 -- linuxthreads needs it and we want to be |
410 |
- # conservative here. -fno-strict-aliasing is to work around #155906 |
411 |
- filter-flags -O? |
412 |
- append-flags -O2 -fno-strict-aliasing |
413 |
- |
414 |
- # Cant build glibc itself with fortify code |
415 |
- append-cppflags -U_FORTIFY_SOURCE |
416 |
- |
417 |
- # building glibc with SSP is fraught with difficulty, especially |
418 |
- # due to __stack_chk_fail_local which would mean significant changes |
419 |
- # to the glibc build process. See bug #94325 #293721 |
420 |
- use hardened && gcc-specs-ssp && append-cflags $(test-flags-CC -fno-stack-protector) |
421 |
- |
422 |
- if use hardened && gcc-specs-pie ; then |
423 |
- # Force PIC macro definition for all compilations since they're all |
424 |
- # either -fPIC or -fPIE with the default-PIE compiler. |
425 |
- append-cppflags -DPIC |
426 |
- else |
427 |
- # Don't build -fPIE without the default-PIE compiler and the |
428 |
- # hardened-pie patch |
429 |
- filter-flags -fPIE |
430 |
- fi |
431 |
-} |
432 |
- |
433 |
-want_nptl() { |
434 |
- [[ -z ${LT_VER} ]] && return 0 |
435 |
- want_tls || return 1 |
436 |
- use nptl || return 1 |
437 |
- |
438 |
- # Only list the arches that cannot do NPTL |
439 |
- case $(tc-arch) in |
440 |
- m68k) return 1;; |
441 |
- sparc) |
442 |
- # >= v9 is needed for nptl. |
443 |
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1 |
444 |
- ;; |
445 |
- esac |
446 |
- |
447 |
- return 0 |
448 |
-} |
449 |
- |
450 |
-want_linuxthreads() { |
451 |
- [[ -z ${LT_VER} ]] && return 1 |
452 |
- ! use nptlonly && return 0 |
453 |
- want_nptl || return 0 |
454 |
- return 1 |
455 |
-} |
456 |
- |
457 |
-want_tls() { |
458 |
- # Archs that can use TLS (Thread Local Storage) |
459 |
- case $(tc-arch) in |
460 |
- sparc) |
461 |
- # 2.3.6 should have tls support on sparc64 |
462 |
- # when using newer binutils |
463 |
- case ${CTARGET/-*} in |
464 |
- sparc64*) return 1 ;; |
465 |
- *) return 0 ;; |
466 |
- esac |
467 |
- ;; |
468 |
- x86) |
469 |
- # requires i486 or better #106556 |
470 |
- [[ ${CTARGET} == i[4567]86* ]] && return 0 |
471 |
- return 1 |
472 |
- ;; |
473 |
- esac |
474 |
- |
475 |
- return 0 |
476 |
-} |
477 |
- |
478 |
-want__thread() { |
479 |
- want_tls || return 1 |
480 |
- |
481 |
- # For some reason --with-tls --with__thread is causing segfaults on sparc32. |
482 |
- [[ ${PROFILE_ARCH} == "sparc" ]] && return 1 |
483 |
- |
484 |
- [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD} |
485 |
- |
486 |
- # only test gcc -- cant test linking yet |
487 |
- tc-has-tls -c ${CTARGET} |
488 |
- WANT__THREAD=$? |
489 |
- |
490 |
- return ${WANT__THREAD} |
491 |
-} |
492 |
- |
493 |
-use_multilib() { |
494 |
- case ${CTARGET} in |
495 |
- sparc*|mips64*|x86_64*|powerpc64*|s390x*) |
496 |
- has_multilib_profile || use multilib ;; |
497 |
- *) false ;; |
498 |
- esac |
499 |
-} |
500 |
- |
501 |
-# Setup toolchain variables that would be defined in the profiles for these archs. |
502 |
-setup_env() { |
503 |
- # silly users |
504 |
- unset LD_RUN_PATH |
505 |
- |
506 |
- if is_crosscompile || tc-is-cross-compiler ; then |
507 |
- multilib_env ${CTARGET} |
508 |
- if ! use multilib ; then |
509 |
- MULTILIB_ABIS=${DEFAULT_ABI} |
510 |
- else |
511 |
- MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} |
512 |
- fi |
513 |
- |
514 |
- # If the user has CFLAGS_<CTARGET> in their make.conf, use that, |
515 |
- # and fall back on CFLAGS. |
516 |
- local VAR=CFLAGS_${CTARGET//[-.]/_} |
517 |
- CFLAGS=${!VAR-${CFLAGS}} |
518 |
- fi |
519 |
- |
520 |
- setup_flags |
521 |
- |
522 |
- export ABI=${ABI:-${DEFAULT_ABI:-default}} |
523 |
- |
524 |
- if is_crosscompile || tc-is-cross-compiler ; then |
525 |
- local VAR=CFLAGS_${ABI} |
526 |
- # We need to export CFLAGS with abi information in them because |
527 |
- # glibc's configure script checks CFLAGS for some targets (like mips) |
528 |
- export CFLAGS="${!VAR} ${CFLAGS}" |
529 |
- fi |
530 |
-} |
531 |
- |
532 |
-just_headers() { |
533 |
- is_crosscompile && use crosscompile_opts_headers-only |
534 |
-} |
535 |
|
536 |
diff --git a/sys-libs/glibc/files/eblits/src_compile.eblit~ b/sys-libs/glibc/files/eblits/src_compile.eblit~ |
537 |
deleted file mode 100644 |
538 |
index 9f2b597..0000000 |
539 |
--- a/sys-libs/glibc/files/eblits/src_compile.eblit~ |
540 |
+++ /dev/null |
541 |
@@ -1,208 +0,0 @@ |
542 |
-# Copyright 1999-2007 Gentoo Foundation |
543 |
-# Distributed under the terms of the GNU General Public License v2 |
544 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.10 2009/11/06 00:33:03 vapier Exp $ |
545 |
- |
546 |
-glibc_do_configure() { |
547 |
- local myconf |
548 |
- |
549 |
- # set addons |
550 |
- pushd "${S}" > /dev/null |
551 |
- local ADDONS=$(echo */configure | sed \ |
552 |
- -e 's:/configure::g' \ |
553 |
- -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \ |
554 |
- -e 's: \+$::' \ |
555 |
- -e 's! !,!g' \ |
556 |
- -e 's!^!,!' \ |
557 |
- -e '/^,\*$/d') |
558 |
- [[ -d ports ]] && ADDONS="${ADDONS},ports" |
559 |
- popd > /dev/null |
560 |
- |
561 |
- use nls || myconf="${myconf} --disable-nls" |
562 |
- myconf="${myconf} $(use_enable hardened stackguard-randomization)" |
563 |
- if [[ $(<"${T}"/.ssp.compat) == "yes" ]] ; then |
564 |
- myconf="${myconf} --enable-old-ssp-compat" |
565 |
- else |
566 |
- myconf="${myconf} --disable-old-ssp-compat" |
567 |
- fi |
568 |
- |
569 |
- use glibc-omitfp && myconf="${myconf} --enable-omitfp" |
570 |
- |
571 |
- [[ ${CTARGET//_/-} == *-softfloat-* ]] && myconf="${myconf} --without-fp" |
572 |
- |
573 |
- if [[ $1 == "linuxthreads" ]] ; then |
574 |
- if want_tls ; then |
575 |
- myconf="${myconf} --with-tls" |
576 |
- |
577 |
- if ! want__thread || use glibc-compat20 || [[ ${LT_KER_VER} == 2.[02].* ]] ; then |
578 |
- myconf="${myconf} --without-__thread" |
579 |
- else |
580 |
- myconf="${myconf} --with-__thread" |
581 |
- fi |
582 |
- else |
583 |
- myconf="${myconf} --without-tls --without-__thread" |
584 |
- fi |
585 |
- |
586 |
- myconf="${myconf} --disable-sanity-checks" |
587 |
- myconf="${myconf} --enable-add-ons=linuxthreads${ADDONS}" |
588 |
- myconf="${myconf} --enable-kernel=${LT_KER_VER}" |
589 |
- elif [[ $1 == "nptl" ]] ; then |
590 |
- myconf="${myconf} --enable-add-ons=nptl${ADDONS}" |
591 |
- myconf="${myconf} --enable-kernel=${NPTL_KERN_VER}" |
592 |
- else |
593 |
- die "invalid pthread option" |
594 |
- fi |
595 |
- |
596 |
- # Since SELinux support is only required for nscd, only enable it if: |
597 |
- # 1. USE selinux |
598 |
- # 2. only for the primary ABI on multilib systems |
599 |
- # 3. Not a crosscompile |
600 |
- if ! is_crosscompile && use selinux ; then |
601 |
- if use multilib || has_multilib_profile ; then |
602 |
- if is_final_abi ; then |
603 |
- myconf="${myconf} --with-selinux" |
604 |
- else |
605 |
- myconf="${myconf} --without-selinux" |
606 |
- fi |
607 |
- else |
608 |
- myconf="${myconf} --with-selinux" |
609 |
- fi |
610 |
- else |
611 |
- myconf="${myconf} --without-selinux" |
612 |
- fi |
613 |
- |
614 |
- myconf="${myconf} |
615 |
- --without-cvs |
616 |
- --enable-bind-now |
617 |
- --build=${CBUILD_OPT:-${CBUILD}} |
618 |
- --host=${CTARGET_OPT:-${CTARGET}} |
619 |
- $(use_enable profile) |
620 |
- $(use_with gd) |
621 |
- --with-headers=$(alt_build_headers) |
622 |
- --prefix=${EPREFIX}/usr |
623 |
- --libdir=${EPREFIX}/usr/$(get_libdir) |
624 |
- --mandir=${EPREFIX}/usr/share/man |
625 |
- --infodir=${EPREFIX}/usr/share/info |
626 |
- --libexecdir=${EPREFIX}/usr/$(get_libdir)/misc/glibc |
627 |
- ${EXTRA_ECONF}" |
628 |
- |
629 |
- # There is no configure option for this and we need to export it |
630 |
- # since the glibc build will re-run configure on itself |
631 |
- export libc_cv_slibdir=/$(get_libdir) |
632 |
- |
633 |
- has_version app-admin/eselect-compiler || export CC=$(tc-getCC ${CTARGET}) |
634 |
- |
635 |
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1 |
636 |
- mkdir -p "${GBUILDDIR}" |
637 |
- cd "${GBUILDDIR}" |
638 |
- einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}" |
639 |
- "${S}"/configure ${myconf} || die "failed to configure glibc" |
640 |
- |
641 |
- # since we'll be punting them for cross-compilers, and they can cause |
642 |
- # problems (ia64+static), we'll just skip building altogether |
643 |
- is_crosscompile && sed -i '1ibuild-programs = no' config.make |
644 |
-} |
645 |
- |
646 |
-toolchain-glibc_src_compile() { |
647 |
- echo |
648 |
- local v |
649 |
- for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do |
650 |
- einfo " $(printf '%15s' ${v}:) ${!v}" |
651 |
- done |
652 |
- echo |
653 |
- |
654 |
- if want_linuxthreads ; then |
655 |
- glibc_do_configure linuxthreads |
656 |
- einfo "Building GLIBC with linuxthreads..." |
657 |
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed" |
658 |
- fi |
659 |
- if want_nptl ; then |
660 |
- # ... and then do the optional nptl build |
661 |
- unset LD_ASSUME_KERNEL |
662 |
- glibc_do_configure nptl |
663 |
- einfo "Building GLIBC with NPTL..." |
664 |
- make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed" |
665 |
- fi |
666 |
-} |
667 |
- |
668 |
-toolchain-glibc_headers_compile() { |
669 |
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers |
670 |
- mkdir -p "${GBUILDDIR}" |
671 |
- cd "${GBUILDDIR}" |
672 |
- |
673 |
- # if we don't have a compiler yet, we cant really test it now ... |
674 |
- # hopefully they don't affect header geneation, so let's hope for |
675 |
- # the best here ... |
676 |
- export \ |
677 |
- libc_cv_386_tls=yes \ |
678 |
- libc_cv_asm_cfi_directives=yes \ |
679 |
- libc_cv_broken_visibility_attribute=no \ |
680 |
- libc_cv_gcc___thread=yes \ |
681 |
- libc_cv_mlong_double_128=yes \ |
682 |
- libc_cv_mlong_double_128ibm=yes \ |
683 |
- libc_cv_ppc_machine=yes \ |
684 |
- libc_cv_visibility_attribute=yes \ |
685 |
- libc_cv_z_combreloc=yes \ |
686 |
- libc_cv_z_execstack=yes \ |
687 |
- libc_cv_z_initfirst=yes \ |
688 |
- libc_cv_z_nodelete=yes \ |
689 |
- libc_cv_z_nodlopen=yes \ |
690 |
- libc_cv_z_relro=yes |
691 |
- |
692 |
- # Pick out the correct location for build headers |
693 |
- local ports="" myconf="--disable-sanity-checks --enable-hacker-mode" |
694 |
- [[ -d ${S}/ports ]] && ports=",ports" |
695 |
- myconf="${myconf} |
696 |
- --enable-add-ons=nptl${ports} |
697 |
- --without-cvs |
698 |
- --enable-bind-now |
699 |
- --build=${CBUILD_OPT:-${CBUILD}} |
700 |
- --host=${CTARGET_OPT:-${CTARGET}} |
701 |
- --with-headers=$(alt_build_headers) |
702 |
- --prefix=${EPREFIX}/usr |
703 |
- ${EXTRA_ECONF}" |
704 |
- |
705 |
- # Nothing is compiled here which would affect the headers for the target. |
706 |
- # so forcing CC/CFLAGS is sane. unless you dont have `gcc`. then i |
707 |
- # dont care :p. |
708 |
- einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}" |
709 |
- CC=gcc \ |
710 |
- CFLAGS="-O1 -pipe" \ |
711 |
- "${S}"/configure ${myconf} || die "failed to configure glibc" |
712 |
-} |
713 |
- |
714 |
-eblit-glibc-src_compile() { |
715 |
- if is_crosscompile ; then |
716 |
- export \ |
717 |
- libc_cv_c_cleanup=yes \ |
718 |
- libc_cv_forced_unwind=yes |
719 |
- fi |
720 |
- |
721 |
- if just_headers ; then |
722 |
- toolchain-glibc_headers_compile |
723 |
- return |
724 |
- fi |
725 |
- |
726 |
- setup_env |
727 |
- |
728 |
- if [[ -z ${OABI} ]] ; then |
729 |
- local abilist="" |
730 |
- if has_multilib_profile ; then |
731 |
- abilist=$(get_install_abis) |
732 |
- einfo "Building multilib glibc for ABIs: ${abilist}" |
733 |
- elif is_crosscompile || tc-is-cross-compiler ; then |
734 |
- abilist=${DEFAULT_ABI} |
735 |
- fi |
736 |
- if [[ -n ${abilist} ]] ; then |
737 |
- OABI=${ABI} |
738 |
- for ABI in ${abilist} ; do |
739 |
- export ABI |
740 |
- src_compile |
741 |
- done |
742 |
- ABI=${OABI} |
743 |
- unset OABI |
744 |
- return 0 |
745 |
- fi |
746 |
- fi |
747 |
- |
748 |
- toolchain-glibc_src_compile |
749 |
-} |
750 |
|
751 |
diff --git a/sys-libs/glibc/files/eblits/src_install.eblit~ b/sys-libs/glibc/files/eblits/src_install.eblit~ |
752 |
deleted file mode 100644 |
753 |
index 28034f4..0000000 |
754 |
--- a/sys-libs/glibc/files/eblits/src_install.eblit~ |
755 |
+++ /dev/null |
756 |
@@ -1,252 +0,0 @@ |
757 |
-# Copyright 1999-2007 Gentoo Foundation |
758 |
-# Distributed under the terms of the GNU General Public License v2 |
759 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.9 2009/12/19 23:44:54 vapier Exp $ |
760 |
- |
761 |
-toolchain-glibc_src_install() { |
762 |
- local GBUILDDIR |
763 |
- if want_linuxthreads ; then |
764 |
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads |
765 |
- else |
766 |
- GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl |
767 |
- fi |
768 |
- |
769 |
- local install_root=${ED} |
770 |
- is_crosscompile && install_root="${install_root}/usr/${CTARGET}" |
771 |
- if want_linuxthreads ; then |
772 |
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads |
773 |
- einfo "Installing GLIBC ${ABI} with linuxthreads ..." |
774 |
- else # nptlonly |
775 |
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl |
776 |
- einfo "Installing GLIBC ${ABI} with NPTL ..." |
777 |
- fi |
778 |
- make PARALLELMFLAGS="${MAKEOPTS}" \ |
779 |
- install_root="${install_root}" \ |
780 |
- install || die |
781 |
- |
782 |
- if is_crosscompile ; then |
783 |
- # punt all the junk not needed by a cross-compiler |
784 |
- cd "${D}"/usr/${CTARGET} || die |
785 |
- rm -rf ./{,usr/}{bin,etc,sbin,share} ./{,usr/}*/{gconv,misc} |
786 |
- fi |
787 |
- |
788 |
- if want_linuxthreads && want_nptl ; then |
789 |
- einfo "Installing NPTL to $(alt_libdir)/tls/..." |
790 |
- cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl |
791 |
- dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl |
792 |
- |
793 |
- local l src_lib |
794 |
- for l in libc libm librt libpthread libthread_db ; do |
795 |
- # take care of shared lib first ... |
796 |
- l=${l}.so |
797 |
- if [[ -e ${l} ]] ; then |
798 |
- src_lib=${l} |
799 |
- else |
800 |
- src_lib=$(eval echo */${l}) |
801 |
- fi |
802 |
- cp -a ${src_lib} "${D}"$(alt_libdir)/tls/${l} || die "copying nptl ${l}" |
803 |
- fperms a+rx $(alt_libdir)/tls/${l} |
804 |
- dosym ${l} $(alt_libdir)/tls/$(scanelf -qSF'%S#F' ${src_lib}) |
805 |
- |
806 |
- # then grab the linker script or the symlink ... |
807 |
- if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then |
808 |
- dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l} |
809 |
- else |
810 |
- sed \ |
811 |
- -e "s:/${l}:/tls/${l}:g" \ |
812 |
- -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \ |
813 |
- "${D}"$(alt_usrlibdir)/${l} > "${D}"$(alt_usrlibdir)/nptl/${l} |
814 |
- fi |
815 |
- |
816 |
- # then grab the static lib ... |
817 |
- src_lib=${src_lib/%.so/.a} |
818 |
- [[ ! -e ${src_lib} ]] && src_lib=${src_lib/%.a/_pic.a} |
819 |
- cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" |
820 |
- src_lib=${src_lib/%.a/_nonshared.a} |
821 |
- if [[ -e ${src_lib} ]] ; then |
822 |
- cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" |
823 |
- fi |
824 |
- done |
825 |
- |
826 |
- # use the nptl linker instead of the linuxthreads one as the linuxthreads |
827 |
- # one may lack TLS support and that can be really bad for business |
828 |
- cp -a elf/ld.so "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" |
829 |
- fi |
830 |
- |
831 |
- # We'll take care of the cache ourselves |
832 |
- rm -f "${D}"/etc/ld.so.cache |
833 |
- |
834 |
- # Some things want this, notably ash. |
835 |
- dosym libbsd-compat.a $(alt_usrlibdir)/libbsd.a |
836 |
- |
837 |
- # Handle includes for different ABIs if glibc itself doesn't do it |
838 |
- # XXX: curr glibc should finally handle all of them correctly |
839 |
- #case $(tc-arch) in |
840 |
- # amd64|mips|ppc|s390) ;; |
841 |
- # *) prep_ml_includes $(alt_headers) ;; |
842 |
- #esac |
843 |
- |
844 |
- # When cross-compiling for a non-multilib setup, make sure we have |
845 |
- # lib and a proper symlink setup |
846 |
- if is_crosscompile && ! use multilib && ! has_multilib_profile && [[ $(get_libdir) != "lib" ]] ; then |
847 |
- cd "${D}"$(alt_libdir)/.. |
848 |
- mv $(get_libdir) lib || die |
849 |
- ln -s lib $(get_libdir) || die |
850 |
- cd "${D}"$(alt_usrlibdir)/.. |
851 |
- mv $(get_libdir) lib || die |
852 |
- ln -s lib $(get_libdir) || die |
853 |
- fi |
854 |
- |
855 |
- ################################################################# |
856 |
- # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # |
857 |
- # Make sure we install some symlink hacks so that when we build |
858 |
- # a 2nd stage cross-compiler, gcc finds the target system |
859 |
- # headers correctly. See gcc/doc/gccinstall.info |
860 |
- if is_crosscompile ; then |
861 |
- dosym usr/include ${EPREFIX}/usr/${CTARGET}/sys-include |
862 |
- return 0 |
863 |
- fi |
864 |
- |
865 |
- # Everything past this point just needs to be done once ... |
866 |
- is_final_abi || return 0 |
867 |
- |
868 |
- # Make sure the non-native interp can be found on multilib systems |
869 |
- if has_multilib_profile ; then |
870 |
- case $(tc-arch) in |
871 |
- amd64) |
872 |
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR amd64) /lib |
873 |
- dosym ../$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2 |
874 |
- ;; |
875 |
- ppc64) |
876 |
- [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ppc64) /lib |
877 |
- dosym ../$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1 |
878 |
- ;; |
879 |
- esac |
880 |
- fi |
881 |
- |
882 |
- # Files for Debian-style locale updating |
883 |
- dodir /usr/share/i18n |
884 |
- sed \ |
885 |
- -e "/^#/d" \ |
886 |
- -e "/SUPPORTED-LOCALES=/d" \ |
887 |
- -e "s: \\\\::g" -e "s:/: :g" \ |
888 |
- "${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \ |
889 |
- || die "generating /usr/share/i18n/SUPPORTED failed" |
890 |
- cd "${WORKDIR}"/extra/locale |
891 |
- dosbin locale-gen || die |
892 |
- doman *.[0-8] |
893 |
- insinto /etc |
894 |
- doins locale.gen || die |
895 |
- |
896 |
- # Make sure all the ABI's can find the locales and so we only |
897 |
- # have to generate one set |
898 |
- local a |
899 |
- keepdir /usr/$(get_libdir)/locale |
900 |
- for a in $(get_install_abis) ; do |
901 |
- if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then |
902 |
- dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale |
903 |
- fi |
904 |
- done |
905 |
- |
906 |
- if ! has noinfo ${FEATURES} && [[ -n ${INFOPAGE_VER} ]] ; then |
907 |
- einfo "Installing info pages..." |
908 |
- |
909 |
- make \ |
910 |
- -C "${GBUILDDIR}" \ |
911 |
- PARALLELMFLAGS="${MAKEOPTS}" \ |
912 |
- install_root="${install_root}" \ |
913 |
- info -i || die |
914 |
- fi |
915 |
- |
916 |
- if [[ -n ${MANPAGE_VER} ]] ; then |
917 |
- einfo "Installing man pages..." |
918 |
- |
919 |
- # Install linuxthreads man pages even if nptl is enabled |
920 |
- cd "${WORKDIR}"/man |
921 |
- doman *.3thr |
922 |
- fi |
923 |
- |
924 |
- cd "${S}" |
925 |
- |
926 |
- # Install misc network config files |
927 |
- insinto /etc |
928 |
- doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf || die |
929 |
- doins "${WORKDIR}"/extra/etc/*.conf || die |
930 |
- doinitd "${WORKDIR}"/extra/etc/nscd || die |
931 |
- |
932 |
- sed -i -e "s:@PIDFILE@:$(strings "${D}"/usr/sbin/nscd | grep nscd.pid):" "${D}"/etc/init.d/nscd |
933 |
- |
934 |
- echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00glibc |
935 |
- doenvd "${T}"/00glibc || die |
936 |
- |
937 |
- dodoc BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* |
938 |
- |
939 |
- # Prevent overwriting of the /etc/localtime symlink. We'll handle the |
940 |
- # creation of the "factory" symlink in pkg_postinst(). |
941 |
- rm -f "${D}"/etc/localtime |
942 |
-} |
943 |
- |
944 |
-toolchain-glibc_headers_install() { |
945 |
- local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers |
946 |
- cd "${GBUILDDIR}" |
947 |
- make install_root="${ED}/usr/${CTARGET}" install-headers || die "install-headers failed" |
948 |
- # Copy over headers that are not part of install-headers ... these |
949 |
- # are pretty much taken verbatim from crosstool, see it for more details |
950 |
- insinto $(alt_headers)/bits |
951 |
- doins misc/syscall-list.h bits/stdio_lim.h || die "doins include bits" |
952 |
- insinto $(alt_headers)/gnu |
953 |
- doins "${S}"/include/gnu/stubs.h || die "doins include gnu" |
954 |
- # Make sure we install the sys-include symlink so that when |
955 |
- # we build a 2nd stage cross-compiler, gcc finds the target |
956 |
- # system headers correctly. See gcc/doc/gccinstall.info |
957 |
- dosym usr/include /usr/${CTARGET}/sys-include |
958 |
-} |
959 |
- |
960 |
-src_strip() { |
961 |
- # gdb is lame and requires some debugging information to remain in |
962 |
- # libpthread, so we need to strip it by hand. libthread_db makes no |
963 |
- # sense stripped as it is only used when debugging. |
964 |
- local pthread=$(hasq splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}") |
965 |
- env \ |
966 |
- -uRESTRICT \ |
967 |
- CHOST=${CTARGET} \ |
968 |
- STRIP_MASK="/*/{,tls/}${pthread}*" \ |
969 |
- prepallstrip |
970 |
- # if user has stripping enabled and does not have split debug turned on, |
971 |
- # then leave the debugging sections in libpthread. |
972 |
- if ! hasq nostrip ${FEATURES} && ! hasq splitdebug ${FEATURES} ; then |
973 |
- ${STRIP:-${CTARGET}-strip} --strip-debug "${D}"/*/libpthread-*.so |
974 |
- fi |
975 |
-} |
976 |
- |
977 |
-eblit-glibc-src_install() { |
978 |
- if just_headers ; then |
979 |
- toolchain-glibc_headers_install |
980 |
- return |
981 |
- fi |
982 |
- |
983 |
- setup_env |
984 |
- |
985 |
- if [[ -z ${OABI} ]] ; then |
986 |
- local abilist="" |
987 |
- if has_multilib_profile ; then |
988 |
- abilist=$(get_install_abis) |
989 |
- einfo "Installing multilib glibc for ABIs: ${abilist}" |
990 |
- elif is_crosscompile || tc-is-cross-compiler ; then |
991 |
- abilist=${DEFAULT_ABI} |
992 |
- fi |
993 |
- if [[ -n ${abilist} ]] ; then |
994 |
- OABI=${ABI} |
995 |
- for ABI in ${abilist} ; do |
996 |
- export ABI |
997 |
- eblit-glibc-src_install |
998 |
- done |
999 |
- ABI=${OABI} |
1000 |
- unset OABI |
1001 |
- src_strip |
1002 |
- return 0 |
1003 |
- fi |
1004 |
- fi |
1005 |
- |
1006 |
- toolchain-glibc_src_install |
1007 |
- [[ -z ${OABI} ]] && src_strip |
1008 |
-} |