Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/glibc/files/eblits: common.eblit src_install.eblit
Date: Thu, 22 Dec 2011 01:10:09
Message-Id: 20111222010958.DB4322004C@flycatcher.gentoo.org
1 vapier 11/12/22 01:09:58
2
3 Modified: common.eblit src_install.eblit
4 Log:
5 Pull out the cross-compiler prefix handling into alt_prefix to simplify places that need to mess with paths under it.
6
7 (Portage version: 2.2.0_alpha81/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.25 sys-libs/glibc/files/eblits/common.eblit
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?rev=1.25&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?rev=1.25&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?r1=1.24&r2=1.25
15
16 Index: common.eblit
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v
19 retrieving revision 1.24
20 retrieving revision 1.25
21 diff -u -r1.24 -r1.25
22 --- common.eblit 17 Nov 2011 21:22:53 -0000 1.24
23 +++ common.eblit 22 Dec 2011 01:09:58 -0000 1.25
24 @@ -1,6 +1,10 @@
25 # Copyright 1999-2011 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.24 2011/11/17 21:22:53 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.25 2011/12/22 01:09:58 vapier Exp $
29 +
30 +alt_prefix() {
31 + is_crosscompile && echo /usr/${CTARGET}
32 +}
33
34 # We need to be able to set alternative headers for
35 # compiling for non-native platform
36 @@ -8,14 +12,7 @@
37 # the whole system.
38 # note: intentionally undocumented.
39 alt_headers() {
40 - if [[ -z ${ALT_HEADERS} ]] ; then
41 - if is_crosscompile ; then
42 - ALT_HEADERS="/usr/${CTARGET}/usr/include"
43 - else
44 - ALT_HEADERS="/usr/include"
45 - fi
46 - fi
47 - echo "${ALT_HEADERS}"
48 + echo ${ALT_HEADERS:=$(alt_prefix)/usr/include}
49 }
50 alt_build_headers() {
51 if [[ -z ${ALT_BUILD_HEADERS} ]] ; then
52 @@ -32,11 +29,7 @@
53 }
54
55 alt_usrlibdir() {
56 - if is_crosscompile ; then
57 - echo /usr/${CTARGET}/usr/$(get_libdir)
58 - else
59 - echo /usr/$(get_libdir)
60 - fi
61 + echo $(alt_prefix)/usr/$(get_libdir)
62 }
63
64 setup_target_flags() {
65
66
67
68 1.20 sys-libs/glibc/files/eblits/src_install.eblit
69
70 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit?rev=1.20&view=markup
71 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit?rev=1.20&content-type=text/plain
72 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit?r1=1.19&r2=1.20
73
74 Index: src_install.eblit
75 ===================================================================
76 RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v
77 retrieving revision 1.19
78 retrieving revision 1.20
79 diff -u -r1.19 -r1.20
80 --- src_install.eblit 12 Dec 2011 17:33:10 -0000 1.19
81 +++ src_install.eblit 22 Dec 2011 01:09:58 -0000 1.20
82 @@ -1,6 +1,6 @@
83 # Copyright 1999-2011 Gentoo Foundation
84 # Distributed under the terms of the GNU General Public License v2
85 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.19 2011/12/12 17:33:10 vapier Exp $
86 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.20 2011/12/22 01:09:58 vapier Exp $
87
88 toolchain-glibc_src_install() {
89 local GBUILDDIR
90 @@ -10,8 +10,7 @@
91 GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl
92 fi
93
94 - local install_root=${D}
95 - is_crosscompile && install_root="${install_root}/usr/${CTARGET}"
96 + local install_root="${D}$(alt_prefix)"
97 if want_linuxthreads ; then
98 cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads
99 einfo "Installing GLIBC ${ABI} with linuxthreads ..."
100 @@ -72,16 +71,15 @@
101
102 # Make sure the non-native interp can be found on multilib systems
103 if [[ ${SYMLINK_LIB} == "yes" ]] && has_multilib_profile ; then
104 + local abi32 ldso
105 case $(tc-arch) in
106 - amd64)
107 - [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /lib
108 - dosym ../$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2
109 - ;;
110 - ppc64)
111 - [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) /lib
112 - dosym ../$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1
113 - ;;
114 + amd64) abi32="x86" ldso="ld-linux.so.2" ;;
115 + ppc64) abi32="ppc" ldso="ld.so.1" ;;
116 esac
117 + if [[ -n ${ldso} ]] ; then
118 + [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ${DEFAULT_ABI}) $(alt_prefix)/lib
119 + dosym ../$(get_abi_LIBDIR ${abi32})/${ldso} $(alt_prefix)/lib/${ldso}
120 + fi
121 fi
122
123 #################################################################
124 @@ -99,7 +97,7 @@
125 cd "${D}"$(alt_usrlibdir)/..
126 [[ -e lib ]] || mkdir lib
127
128 - dosym usr/include /usr/${CTARGET}/sys-include
129 + dosym usr/include $(alt_prefix)/sys-include
130 return 0
131 fi