1 |
solar 09/03/03 21:28:06 |
2 |
|
3 |
Modified: uclibc-0.9.28.3.ebuild uclibc-0.9.28.3-r7.ebuild |
4 |
uclibc-0.9.28.3-r3.ebuild ChangeLog |
5 |
uclibc-0.9.27-r1.ebuild |
6 |
Added: uclibc-0.9.30.1.ebuild |
7 |
Log: |
8 |
- version bump |
9 |
(Portage version: 2.1.6.7/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.10 sys-libs/uclibc/uclibc-0.9.28.3.ebuild |
13 |
|
14 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3.ebuild?rev=1.10&view=markup |
15 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3.ebuild?rev=1.10&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3.ebuild?r1=1.9&r2=1.10 |
17 |
|
18 |
Index: uclibc-0.9.28.3.ebuild |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3.ebuild,v |
21 |
retrieving revision 1.9 |
22 |
retrieving revision 1.10 |
23 |
diff -u -r1.9 -r1.10 |
24 |
--- uclibc-0.9.28.3.ebuild 1 Nov 2008 07:33:09 -0000 1.9 |
25 |
+++ uclibc-0.9.28.3.ebuild 3 Mar 2009 21:28:05 -0000 1.10 |
26 |
@@ -1,6 +1,6 @@ |
27 |
-# Copyright 1999-2008 Gentoo Foundation |
28 |
+# Copyright 1999-2009 Gentoo Foundation |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3.ebuild,v 1.9 2008/11/01 07:33:09 vapier Exp $ |
31 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3.ebuild,v 1.10 2009/03/03 21:28:05 solar Exp $ |
32 |
|
33 |
#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" |
34 |
#inherit subversion |
35 |
|
36 |
|
37 |
|
38 |
1.4 sys-libs/uclibc/uclibc-0.9.28.3-r7.ebuild |
39 |
|
40 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r7.ebuild?rev=1.4&view=markup |
41 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r7.ebuild?rev=1.4&content-type=text/plain |
42 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r7.ebuild?r1=1.3&r2=1.4 |
43 |
|
44 |
Index: uclibc-0.9.28.3-r7.ebuild |
45 |
=================================================================== |
46 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r7.ebuild,v |
47 |
retrieving revision 1.3 |
48 |
retrieving revision 1.4 |
49 |
diff -u -r1.3 -r1.4 |
50 |
--- uclibc-0.9.28.3-r7.ebuild 1 Nov 2008 07:33:09 -0000 1.3 |
51 |
+++ uclibc-0.9.28.3-r7.ebuild 3 Mar 2009 21:28:05 -0000 1.4 |
52 |
@@ -1,6 +1,6 @@ |
53 |
-# Copyright 1999-2008 Gentoo Foundation |
54 |
+# Copyright 1999-2009 Gentoo Foundation |
55 |
# Distributed under the terms of the GNU General Public License v2 |
56 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r7.ebuild,v 1.3 2008/11/01 07:33:09 vapier Exp $ |
57 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r7.ebuild,v 1.4 2009/03/03 21:28:05 solar Exp $ |
58 |
|
59 |
#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" |
60 |
#inherit subversion |
61 |
|
62 |
|
63 |
|
64 |
1.5 sys-libs/uclibc/uclibc-0.9.28.3-r3.ebuild |
65 |
|
66 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r3.ebuild?rev=1.5&view=markup |
67 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r3.ebuild?rev=1.5&content-type=text/plain |
68 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r3.ebuild?r1=1.4&r2=1.5 |
69 |
|
70 |
Index: uclibc-0.9.28.3-r3.ebuild |
71 |
=================================================================== |
72 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r3.ebuild,v |
73 |
retrieving revision 1.4 |
74 |
retrieving revision 1.5 |
75 |
diff -u -r1.4 -r1.5 |
76 |
--- uclibc-0.9.28.3-r3.ebuild 1 Nov 2008 07:33:09 -0000 1.4 |
77 |
+++ uclibc-0.9.28.3-r3.ebuild 3 Mar 2009 21:28:05 -0000 1.5 |
78 |
@@ -1,6 +1,6 @@ |
79 |
-# Copyright 1999-2008 Gentoo Foundation |
80 |
+# Copyright 1999-2009 Gentoo Foundation |
81 |
# Distributed under the terms of the GNU General Public License v2 |
82 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r3.ebuild,v 1.4 2008/11/01 07:33:09 vapier Exp $ |
83 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.28.3-r3.ebuild,v 1.5 2009/03/03 21:28:05 solar Exp $ |
84 |
|
85 |
#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" |
86 |
#inherit subversion |
87 |
|
88 |
|
89 |
|
90 |
1.44 sys-libs/uclibc/ChangeLog |
91 |
|
92 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/ChangeLog?rev=1.44&view=markup |
93 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/ChangeLog?rev=1.44&content-type=text/plain |
94 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/ChangeLog?r1=1.43&r2=1.44 |
95 |
|
96 |
Index: ChangeLog |
97 |
=================================================================== |
98 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v |
99 |
retrieving revision 1.43 |
100 |
retrieving revision 1.44 |
101 |
diff -u -r1.43 -r1.44 |
102 |
--- ChangeLog 10 Jan 2009 04:32:59 -0000 1.43 |
103 |
+++ ChangeLog 3 Mar 2009 21:28:05 -0000 1.44 |
104 |
@@ -1,6 +1,11 @@ |
105 |
# ChangeLog for sys-libs/uclibc |
106 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
107 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.43 2009/01/10 04:32:59 redhatter Exp $ |
108 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.44 2009/03/03 21:28:05 solar Exp $ |
109 |
+ |
110 |
+*uclibc-0.9.30.1 (03 Mar 2009) |
111 |
+ |
112 |
+ 03 Mar 2009; <solar@g.o> +uclibc-0.9.30.1.ebuild: |
113 |
+ - version bump |
114 |
|
115 |
10 Jan 2009; Stuart Longland <redhatter@g.o> uclibc-0.9.30.ebuild: |
116 |
Added ~mips keyword. uClibc appears to work fine on both mips and mipsel |
117 |
|
118 |
|
119 |
|
120 |
1.33 sys-libs/uclibc/uclibc-0.9.27-r1.ebuild |
121 |
|
122 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild?rev=1.33&view=markup |
123 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild?rev=1.33&content-type=text/plain |
124 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild?r1=1.32&r2=1.33 |
125 |
|
126 |
Index: uclibc-0.9.27-r1.ebuild |
127 |
=================================================================== |
128 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild,v |
129 |
retrieving revision 1.32 |
130 |
retrieving revision 1.33 |
131 |
diff -u -r1.32 -r1.33 |
132 |
--- uclibc-0.9.27-r1.ebuild 1 Nov 2008 07:33:09 -0000 1.32 |
133 |
+++ uclibc-0.9.27-r1.ebuild 3 Mar 2009 21:28:05 -0000 1.33 |
134 |
@@ -1,6 +1,6 @@ |
135 |
-# Copyright 1999-2008 Gentoo Foundation |
136 |
+# Copyright 1999-2009 Gentoo Foundation |
137 |
# Distributed under the terms of the GNU General Public License v2 |
138 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild,v 1.32 2008/11/01 07:33:09 vapier Exp $ |
139 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.27-r1.ebuild,v 1.33 2009/03/03 21:28:05 solar Exp $ |
140 |
|
141 |
inherit eutils flag-o-matic toolchain-funcs |
142 |
|
143 |
|
144 |
|
145 |
|
146 |
1.1 sys-libs/uclibc/uclibc-0.9.30.1.ebuild |
147 |
|
148 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30.1.ebuild?rev=1.1&view=markup |
149 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30.1.ebuild?rev=1.1&content-type=text/plain |
150 |
|
151 |
Index: uclibc-0.9.30.1.ebuild |
152 |
=================================================================== |
153 |
# Copyright 1999-2009 Gentoo Foundation |
154 |
# Distributed under the terms of the GNU General Public License v2 |
155 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.30.1.ebuild,v 1.1 2009/03/03 21:28:05 solar Exp $ |
156 |
|
157 |
#ESVN_REPO_URI="svn://uclibc.org/trunk/uClibc" |
158 |
#inherit subversion |
159 |
inherit eutils flag-o-matic toolchain-funcs savedconfig |
160 |
|
161 |
export CBUILD=${CBUILD:-${CHOST}} |
162 |
export CTARGET=${CTARGET:-${CHOST}} |
163 |
if [[ ${CTARGET} == ${CHOST} ]] ; then |
164 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then |
165 |
export CTARGET=${CATEGORY/cross-} |
166 |
fi |
167 |
fi |
168 |
# Handle the case where we want uclibc on glibc ... |
169 |
if [[ ${CTARGET} == ${CHOST} ]] && [[ ${CHOST} != *-uclibc* ]] ; then |
170 |
export UCLIBC_AND_GLIBC="sitting in a tree" |
171 |
export CTARGET=${CHOST%%-*}-pc-linux-uclibc |
172 |
fi |
173 |
|
174 |
MY_P=uClibc-0.9.30.1 |
175 |
SVN_VER="" |
176 |
#PATCH_VER="1.0" |
177 |
DESCRIPTION="C library for developing embedded Linux systems" |
178 |
HOMEPAGE="http://www.uclibc.org/" |
179 |
SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2" |
180 |
|
181 |
[[ -z ${SVN_VER} ]] || \ |
182 |
SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-svn-update-${SVN_VER}.patch.bz2" |
183 |
[[ -z ${PATCH_VER} ]] || \ |
184 |
SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2" |
185 |
|
186 |
LICENSE="LGPL-2" |
187 |
SLOT="0" |
188 |
#KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86" |
189 |
KEYWORDS="" |
190 |
IUSE="build uclibc-compat debug hardened ssp ipv6 minimal wordexp crosscompile_opts_headers-only" |
191 |
RESTRICT="strip" |
192 |
|
193 |
RDEPEND="" |
194 |
if [[ -n $CTARGET && ${CTARGET} != ${CHOST} ]]; then |
195 |
DEPEND="" |
196 |
PROVIDE="" |
197 |
SLOT="${CTARGET}" |
198 |
else |
199 |
DEPEND="virtual/os-headers app-misc/pax-utils" |
200 |
PROVIDE="virtual/libc" |
201 |
SLOT="0" |
202 |
fi |
203 |
|
204 |
S=${WORKDIR}/${MY_P} |
205 |
|
206 |
alt_build_kprefix() { |
207 |
if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] \ |
208 |
|| [[ -n ${UCLIBC_AND_GLIBC} ]] |
209 |
then |
210 |
echo /usr/include |
211 |
else |
212 |
echo /usr/${CTARGET}/usr/include |
213 |
fi |
214 |
} |
215 |
|
216 |
just_headers() { |
217 |
use crosscompile_opts_headers-only && [[ ${CHOST} != ${CTARGET} ]] |
218 |
} |
219 |
|
220 |
uclibc_endian() { |
221 |
# XXX: this wont work for a toolchain which is bi-endian, but we |
222 |
# dont have any such thing at the moment, so not a big deal |
223 |
touch "${T}"/endian.s |
224 |
$(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o |
225 |
case $(file "${T}"/endian.o) in |
226 |
*" MSB "*) echo "big";; |
227 |
*" LSB "*) echo "little";; |
228 |
*) echo "NFC";; |
229 |
esac |
230 |
rm -f "${T}"/endian.{s,o} |
231 |
} |
232 |
|
233 |
pkg_setup() { |
234 |
just_headers && return 0 |
235 |
has_version ${CATEGORY}/uclibc || return 0 |
236 |
[[ -n ${UCLIBC_AND_GLIBC} ]] && return 0 |
237 |
[[ ${ROOT} != "/" ]] && return 0 |
238 |
[[ ${CATEGORY} == cross-* ]] && return 0 |
239 |
|
240 |
} |
241 |
|
242 |
PIE_STABLE="arm mips ppc x86" |
243 |
|
244 |
CPU_ALPHA="" |
245 |
CPU_AMD64="" |
246 |
CPU_ARM="GENERIC_ARM ARM{610,710,7TDMI,720T,920T,922T,926T,10T,1136JF_S,1176JZ{_,F_}S,_{SA110,SA1100,XSCALE,IWMMXT}}" |
247 |
CPU_IA64="" |
248 |
CPU_M68K="" |
249 |
CPU_MIPS="MIPS_ISA_{1,2,3,4,MIPS{32,64}} MIPS_{N64,O32,N32}_ABI" |
250 |
CPU_PPC="" |
251 |
CPU_SH="SH{2,3,4,5}" |
252 |
CPU_SPARC="SPARC_V{7,8,9,9B}" |
253 |
CPU_X86="GENERIC_386 {3,4,5,6}86 586MMX PENTIUM{II,III,4} K{6,7} ELAN CRUSOE WINCHIP{C6,2} CYRIXIII NEHEMIAH" |
254 |
IUSE_UCLIBC_CPU="${CPU_ARM} ${CPU_MIPS} ${CPU_PPC} ${CPU_SH} ${CPU_SPARC} ${CPU_X86}" |
255 |
|
256 |
check_cpu_opts() { |
257 |
local cpu_var="CPU_$(echo $(tc-arch) | tr [a-z] [A-Z])" |
258 |
[[ -z ${!cpu_var} ]] && return 0 |
259 |
|
260 |
if [[ -z ${UCLIBC_CPU} ]] ; then |
261 |
ewarn "You really should consider setting UCLIBC_CPU" |
262 |
ewarn "Otherwise, the build will be generic (read: slow)." |
263 |
ewarn "Available CPU options:" |
264 |
UCLIBC_CPU=$(eval echo ${!cpu_var}) |
265 |
echo ${UCLIBC_CPU} |
266 |
case ${CTARGET} in |
267 |
mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; |
268 |
sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; |
269 |
i[456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; |
270 |
*) export UCLIBC_CPU=${UCLIBC_CPU%% *};; |
271 |
esac |
272 |
else |
273 |
local cpu found=0 |
274 |
for cpu in $(eval echo ${!cpu_var}) ; do |
275 |
[[ ${UCLIBC_CPU} == "${cpu}" ]] && found=1 && break |
276 |
done |
277 |
if [[ ${found} -eq 0 ]] ; then |
278 |
ewarn "UCLIBC_CPU choice '${UCLIBC_CPU}' not supported" |
279 |
ewarn "Valid choices:" |
280 |
eval echo ${!cpu_var} |
281 |
die "pick a supported cpu type" |
282 |
fi |
283 |
fi |
284 |
} |
285 |
|
286 |
set_opt() { |
287 |
sed -i -e "/^\# $1 is not set/d" -e "/^$1=.*/d" .config |
288 |
echo "$1=$2" >> .config |
289 |
} |
290 |
|
291 |
src_unpack() { |
292 |
[[ -n ${ESVN_REPO_URI} ]] \ |
293 |
&& subversion_src_unpack \ |
294 |
|| unpack ${A} |
295 |
cd "${S}" |
296 |
|
297 |
check_cpu_opts |
298 |
|
299 |
echo |
300 |
einfo "Runtime Prefix: /" |
301 |
einfo "Devel Prefix: /usr" |
302 |
einfo "Kernel Prefix: $(alt_build_kprefix)" |
303 |
einfo "CBUILD: ${CBUILD}" |
304 |
einfo "CHOST: ${CHOST}" |
305 |
einfo "CTARGET: ${CTARGET}" |
306 |
einfo "CPU: ${UCLIBC_CPU:-default}" |
307 |
einfo "ENDIAN: $(uclibc_endian)" |
308 |
echo |
309 |
|
310 |
########## PATCHES ########## |
311 |
|
312 |
[[ -n ${SVN_VER} ]] && \ |
313 |
epatch "${WORKDIR}"/${MY_P}-cvs-update-${SVN_VER}.patch |
314 |
|
315 |
if [[ -n ${PATCH_VER} ]] ; then |
316 |
unpack ${MY_P}-patches-${PATCH_VER}.tar.bz2 |
317 |
EPATCH_SUFFIX="patch" |
318 |
epatch "${WORKDIR}"/patch |
319 |
fi |
320 |
|
321 |
########## CPU SELECTION ########## |
322 |
|
323 |
local target config_target |
324 |
case $(tc-arch) in |
325 |
alpha) target="alpha"; config_target="no cpu-specific options";; |
326 |
amd64) target="x86_64"; config_target="no cpu-specific options";; |
327 |
arm) target="arm"; config_target="GENERIC_ARM";; |
328 |
ia64) target="ia64"; config_target="no cpu-specific options";; |
329 |
m68k) target="m68k"; config_target="no cpu-specific options";; |
330 |
mips) target="mips"; config_target="MIPS_ISA_1";; |
331 |
ppc) target="powerpc"; config_target="no cpu-specific options";; |
332 |
sh) target="sh"; config_target="SH4";; |
333 |
sparc) target="sparc"; config_target="no cpu-specific options";; |
334 |
x86) target="i386"; config_target="GENERIC_386";; |
335 |
*) die "$(tc-arch) lists no defaults :/";; |
336 |
esac |
337 |
sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ |
338 |
extra/Configs/Config.${target} |
339 |
sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak |
340 |
|
341 |
########## CONFIG SETUP ########## |
342 |
|
343 |
make ARCH=${target} defconfig >/dev/null || die "could not config" |
344 |
|
345 |
for def in DO{DEBUG{,_PT},ASSERTS} SUPPORT_LD_DEBUG{,_EARLY} UCLIBC_HAS_PROFILING; do |
346 |
sed -i -e "s:${def}=y:# ${def} is not set:" .config |
347 |
done |
348 |
if use debug ; then |
349 |
set_opt SUPPORT_LD_DEBUG y |
350 |
set_opt DODEBUG y |
351 |
fi |
352 |
|
353 |
sed -i -e '/ARCH_.*_ENDIAN/d' .config |
354 |
set_opt "ARCH_WANTS_$(uclibc_endian | tr [a-z] [A-Z])_ENDIAN" y |
355 |
|
356 |
if [[ $(tc-is-softfloat) != "no" ]] ; then |
357 |
set_opt UCLIBC_HAS_FPU n |
358 |
fi |
359 |
|
360 |
if [[ ${CTARGET/eabi} != ${CTARGET} ]] ; then |
361 |
set_opt CONFIG_ARM_OABI n |
362 |
set_opt CONFIG_ARM_EABI y |
363 |
fi |
364 |
|
365 |
local moredefs="COMPAT_ATEXIT" |
366 |
local compat_sym=atexit |
367 |
|
368 |
# We need todo this for a few months. .30 is a major upgrade. |
369 |
# Don't do it from cross-compiling case though |
370 |
if ! use uclibc-compat ; then |
371 |
if [[ -z ${UCLIBC_AND_GLIBC} ]] && [[ -z ${UCLIBC_SCANNED_COMPAT} ]] && \ |
372 |
! just_headers && [[ ${CHOST} == ${CTARGET} ]] ; then |
373 |
local fnames="" |
374 |
einfo "Doing a scanelf in paths for bins containing the ${compat_sym} symbol" |
375 |
fnames=$(scanelf -pyqs${compat_sym} -F%F#s) |
376 |
if [[ -z ${fnames} ]] ; then |
377 |
einfo "This system is clean." |
378 |
einfo "To prevent the scanning of files again in the future you can export UCLIBC_SCANNED_COMPAT=1" |
379 |
moredefs="" |
380 |
else |
381 |
ewarn "You need to remerge the packages that contain the following files before you can remerge ${P} without USE=uclibc-compat enabled." |
382 |
ewarn "qfile -Cq $(echo ${fnames}) | sort | uniq" |
383 |
echo |
384 |
ewarn "Leaving on ${moredefs}" |
385 |
fi |
386 |
else |
387 |
moredefs="" |
388 |
fi |
389 |
fi |
390 |
for def in ${moredefs} MALLOC_GLIBC_COMPAT DO_C99_MATH UCLIBC_HAS_{RPC,FULL_RPC,CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC,FTW} UCLIBC_HAS_REENTRANT_RPC UCLIBC_HAS_GNU_GLOB PTHREADS_DEBUG_SUPPORT UCLIBC_HAS_TZ_FILE_READ_MANY UCLIBC_HAS_FENV UCLIBC_SUSV3_LEGACY UCLIBC_SUSV3_LEGACY_MACROS UCLIBC_HAS_PROGRAM_INVOCATION_NAME ; do |
391 |
set_opt "${def}" y |
392 |
done |
393 |
set_opt UCLIBC_HAS_CTYPE_UNSAFE n |
394 |
set_opt UCLIBC_HAS_LOCALE n |
395 |
|
396 |
use ipv6 && set_opt UCLIBC_HAS_IPV6 y |
397 |
|
398 |
use wordexp && set_opt UCLIBC_HAS_WORDEXP y |
399 |
|
400 |
# we need to do it independently of hardened to get ssp.c built into libc |
401 |
set_opt UCLIBC_HAS_SSP y |
402 |
set_opt UCLIBC_HAS_SSP_COMPAT y |
403 |
set_opt UCLIBC_HAS_ARC4RANDOM y |
404 |
set_opt PROPOLICE_BLOCK_ABRT n |
405 |
set_opt PROPOLICE_BLOCK_SEGV y |
406 |
|
407 |
# arm/mips do not emit PT_GNU_STACK, but if we enable this here |
408 |
# it will be emitted as RWE, ppc has to be checked, x86 needs it |
409 |
# this option should be used independently of hardened |
410 |
if has $(tc-arch) x86 || has $(tc-arch) ppc; then |
411 |
set_opt UCLIBC_BUILD_NOEXECSTACK y |
412 |
else |
413 |
set_opt UCLIBC_BUILD_NOEXECSTACK n |
414 |
fi |
415 |
set_opt UCLIBC_BUILD_RELRO y |
416 |
if use hardened ; then |
417 |
if has $(tc-arch) ${PIE_STABLE} ; then |
418 |
set_opt UCLIBC_BUILD_PIE y |
419 |
else |
420 |
set_opt UCLIBC_BUILD_PIE n |
421 |
fi |
422 |
set_opt UCLIBC_BUILD_NOW y |
423 |
use ssp && { |
424 |
set_opt SSP_QUICK_CANARY n |
425 |
set_opt UCLIBC_BUILD_SSP y |
426 |
} |
427 |
else |
428 |
set_opt UCLIBC_BUILD_PIE n |
429 |
set_opt SSP_QUICK_CANARY y |
430 |
set_opt UCLIBC_BUILD_SSP n |
431 |
set_opt UCLIBC_BUILD_NOW n |
432 |
fi |
433 |
|
434 |
restore_config .config |
435 |
|
436 |
# setup build and run paths |
437 |
local cross=${CTARGET}- |
438 |
type -p ${cross}ar > /dev/null || cross="" |
439 |
sed -i \ |
440 |
-e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${cross}\":" \ |
441 |
-e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \ |
442 |
-e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ |
443 |
-e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ |
444 |
-e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ |
445 |
-e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \ |
446 |
.config || die |
447 |
|
448 |
yes "" 2> /dev/null | make -s oldconfig > /dev/null || die "could not make oldconfig" |
449 |
|
450 |
cp .config myconfig |
451 |
|
452 |
emake -s clean > /dev/null || die "could not clean" |
453 |
} |
454 |
|
455 |
src_compile() { |
456 |
cp myconfig .config |
457 |
|
458 |
emake headers || die "make headers failed" |
459 |
just_headers && return 0 |
460 |
|
461 |
emake || die "make failed" |
462 |
if [[ ${CTARGET} != ${CHOST} ]] ; then |
463 |
emake -C utils hostutils || die "make hostutils failed" |
464 |
elif [[ ${CHOST} == *-uclibc* ]] ; then |
465 |
emake utils || die "make utils failed" |
466 |
fi |
467 |
} |
468 |
|
469 |
src_test() { |
470 |
[[ ${CHOST} != ${CTARGET} ]] && return 0 |
471 |
[[ ${CBUILD} != ${CHOST} ]] && return 0 |
472 |
|
473 |
# assert test fails on pax/grsec enabled kernels - normal |
474 |
# vfork test fails in sandbox (both glibc/uclibc) |
475 |
make UCLIBC_ONLY=1 check || die "test failed" |
476 |
} |
477 |
|
478 |
src_install() { |
479 |
local sysroot=${D} |
480 |
[[ ${CHOST} != ${CTARGET} ]] && sysroot="${sysroot}/usr/${CTARGET}" |
481 |
|
482 |
local target="install" |
483 |
just_headers && target="install_headers" |
484 |
emake DESTDIR="${sysroot}" ${target} || die "install failed" |
485 |
|
486 |
save_config .config |
487 |
|
488 |
# remove files coming from kernel-headers |
489 |
rm -rf "${sysroot}"/usr/include/{linux,asm*} |
490 |
|
491 |
# Make sure we install the sys-include symlink so that when |
492 |
# we build a 2nd stage cross-compiler, gcc finds the target |
493 |
# system headers correctly. See gcc/doc/gccinstall.info |
494 |
if [[ ${CTARGET} != ${CHOST} ]] ; then |
495 |
dosym usr/include /usr/${CTARGET}/sys-include |
496 |
if ! just_headers ; then |
497 |
newbin utils/ldconfig.host ${CTARGET}-ldconfig || die |
498 |
newbin utils/ldd.host ${CTARGET}-ldd || die |
499 |
fi |
500 |
return 0 |
501 |
fi |
502 |
|
503 |
if [[ ${CHOST} == *-uclibc* ]] ; then |
504 |
emake DESTDIR="${D}" install_utils || die "install-utils failed" |
505 |
dobin extra/scripts/getent |
506 |
fi |
507 |
|
508 |
dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 |
509 |
doman docs/man/*.[1-9] |
510 |
} |
511 |
|
512 |
pkg_postinst() { |
513 |
[[ ${CTARGET} != ${CHOST} ]] && return 0 |
514 |
[[ ${CHOST} != *-uclibc* ]] && return 0 |
515 |
|
516 |
if [[ ! -e ${ROOT}/etc/TZ ]] ; then |
517 |
ewarn "Please remember to set your timezone in /etc/TZ" |
518 |
[[ ! -d ${ROOT}/etc ]] && mkdir -p "${ROOT}"/etc |
519 |
echo "UTC" > "${ROOT}"/etc/TZ |
520 |
fi |
521 |
[[ ${ROOT} != "/" ]] && return 0 |
522 |
# update cache before reloading init |
523 |
/sbin/ldconfig |
524 |
# reload init ... |
525 |
[[ -x /sbin/telinit ]] && /sbin/telinit U &> /dev/null |
526 |
} |