1 |
blueness 15/02/01 04:09:56 |
2 |
|
3 |
Modified: uclibc-0.9.33.2-r13.ebuild ChangeLog |
4 |
Added: uclibc-0.9.33.2-r14.ebuild |
5 |
Log: |
6 |
Backport fix to allow immediate values as 6th syscall arg in i386, bug #538396 |
7 |
|
8 |
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA) |
9 |
|
10 |
Revision Changes Path |
11 |
1.2 sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild?rev=1.2&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild?rev=1.2&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild?r1=1.1&r2=1.2 |
16 |
|
17 |
Index: uclibc-0.9.33.2-r13.ebuild |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild,v |
20 |
retrieving revision 1.1 |
21 |
retrieving revision 1.2 |
22 |
diff -u -r1.1 -r1.2 |
23 |
--- uclibc-0.9.33.2-r13.ebuild 10 Jan 2015 16:26:20 -0000 1.1 |
24 |
+++ uclibc-0.9.33.2-r13.ebuild 1 Feb 2015 04:09:56 -0000 1.2 |
25 |
@@ -1,6 +1,6 @@ |
26 |
# Copyright 1999-2015 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild,v 1.1 2015/01/10 16:26:20 blueness Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r13.ebuild,v 1.2 2015/02/01 04:09:56 blueness Exp $ |
30 |
|
31 |
inherit eutils flag-o-matic multilib toolchain-funcs savedconfig |
32 |
if [[ ${PV} == "9999" ]] ; then |
33 |
@@ -23,7 +23,7 @@ |
34 |
PATCH_VER="15" |
35 |
SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2 |
36 |
${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}" |
37 |
- KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86" |
38 |
+ KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc" |
39 |
fi |
40 |
|
41 |
LICENSE="LGPL-2" |
42 |
|
43 |
|
44 |
|
45 |
1.96 sys-libs/uclibc/ChangeLog |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/uclibc/ChangeLog?rev=1.96&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/uclibc/ChangeLog?rev=1.96&content-type=text/plain |
49 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/uclibc/ChangeLog?r1=1.95&r2=1.96 |
50 |
|
51 |
Index: ChangeLog |
52 |
=================================================================== |
53 |
RCS file: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v |
54 |
retrieving revision 1.95 |
55 |
retrieving revision 1.96 |
56 |
diff -u -r1.95 -r1.96 |
57 |
--- ChangeLog 10 Jan 2015 16:26:20 -0000 1.95 |
58 |
+++ ChangeLog 1 Feb 2015 04:09:56 -0000 1.96 |
59 |
@@ -1,6 +1,12 @@ |
60 |
# ChangeLog for sys-libs/uclibc |
61 |
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 |
62 |
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.95 2015/01/10 16:26:20 blueness Exp $ |
63 |
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/ChangeLog,v 1.96 2015/02/01 04:09:56 blueness Exp $ |
64 |
+ |
65 |
+*uclibc-0.9.33.2-r14 (01 Feb 2015) |
66 |
+ |
67 |
+ 01 Feb 2015; Anthony G. Basile <blueness@g.o> |
68 |
+ +uclibc-0.9.33.2-r14.ebuild, uclibc-0.9.33.2-r13.ebuild: |
69 |
+ Backport fix to allow immediate values as 6th syscall arg in i386, bug #538396 |
70 |
|
71 |
*uclibc-0.9.33.2-r13 (10 Jan 2015) |
72 |
|
73 |
|
74 |
|
75 |
|
76 |
1.1 sys-libs/uclibc/uclibc-0.9.33.2-r14.ebuild |
77 |
|
78 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r14.ebuild?rev=1.1&view=markup |
79 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r14.ebuild?rev=1.1&content-type=text/plain |
80 |
|
81 |
Index: uclibc-0.9.33.2-r14.ebuild |
82 |
=================================================================== |
83 |
# Copyright 1999-2015 Gentoo Foundation |
84 |
# Distributed under the terms of the GNU General Public License v2 |
85 |
# $Header: /var/cvsroot/gentoo-x86/sys-libs/uclibc/uclibc-0.9.33.2-r14.ebuild,v 1.1 2015/02/01 04:09:56 blueness Exp $ |
86 |
|
87 |
inherit eutils flag-o-matic multilib toolchain-funcs savedconfig |
88 |
if [[ ${PV} == "9999" ]] ; then |
89 |
EGIT_REPO_URI="git://git.busybox.net/uClibc" |
90 |
inherit git-2 |
91 |
fi |
92 |
|
93 |
export CBUILD=${CBUILD:-${CHOST}} |
94 |
export CTARGET=${CTARGET:-${CHOST}} |
95 |
if [[ ${CTARGET} == ${CHOST} ]] ; then |
96 |
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then |
97 |
export CTARGET=${CATEGORY/cross-} |
98 |
fi |
99 |
fi |
100 |
|
101 |
MY_P=uClibc-${PV} |
102 |
DESCRIPTION="C library for developing embedded Linux systems" |
103 |
HOMEPAGE="http://www.uclibc.org/" |
104 |
if [[ ${PV} != "9999" ]] ; then |
105 |
PATCH_VER="16" |
106 |
SRC_URI="http://uclibc.org/downloads/${MY_P}.tar.bz2 |
107 |
${PATCH_VER:+mirror://gentoo/${MY_P}-patches-${PATCH_VER}.tar.bz2}" |
108 |
KEYWORDS="-* ~amd64 ~arm ~m68k ~mips ~ppc ~sh ~sparc ~x86" |
109 |
fi |
110 |
|
111 |
LICENSE="LGPL-2" |
112 |
SLOT="0" |
113 |
IUSE="debug hardened iconv ipv6 nptl rpc ssp uclibc-compat wordexp crosscompile_opts_headers-only" |
114 |
RESTRICT="strip" |
115 |
|
116 |
S=${WORKDIR}/${MY_P} |
117 |
|
118 |
is_crosscompile() { |
119 |
[[ ${CHOST} != ${CTARGET} ]] |
120 |
} |
121 |
alt_build_kprefix() { |
122 |
if [[ ${CBUILD} == ${CHOST} && ${CTARGET} == ${CHOST} ]] ; then |
123 |
echo /usr/include |
124 |
else |
125 |
echo /usr/${CTARGET}/usr/include |
126 |
fi |
127 |
} |
128 |
|
129 |
just_headers() { |
130 |
use crosscompile_opts_headers-only && is_crosscompile |
131 |
} |
132 |
|
133 |
uclibc_endian() { |
134 |
# XXX: this wont work for a toolchain which is bi-endian, but we |
135 |
# dont have any such thing at the moment, so not a big deal |
136 |
touch "${T}"/endian.s |
137 |
$(tc-getAS ${CTARGET}) "${T}"/endian.s -o "${T}"/endian.o |
138 |
case $(file "${T}"/endian.o) in |
139 |
*" MSB "*) echo "BIG";; |
140 |
*" LSB "*) echo "LITTLE";; |
141 |
*) echo "NFC";; |
142 |
esac |
143 |
rm -f "${T}"/endian.{s,o} |
144 |
} |
145 |
|
146 |
pkg_setup() { |
147 |
if [ ${CTARGET} = ${CHOST} ] ; then |
148 |
case ${CHOST} in |
149 |
*-uclinux*|*-uclibc*) ;; |
150 |
*) die "Use sys-devel/crossdev to build a uclibc toolchain" ;; |
151 |
esac |
152 |
fi |
153 |
} |
154 |
|
155 |
check_cpu_opts() { |
156 |
case ${CTARGET} in |
157 |
# Need to handle $ABI here w/mips. |
158 |
mips[1234]*) export UCLIBC_CPU="MIPS_ISA_${CTARGET:4:1}";; |
159 |
sh[2345]*) export UCLIBC_CPU="SH${CTARGET:2:1}";; |
160 |
i[3456]86*) export UCLIBC_CPU="${CTARGET:1:1}86";; |
161 |
# XXX: Should figure out how to handle sparc. |
162 |
esac |
163 |
|
164 |
if use nptl ; then |
165 |
case ${CTARGET} in |
166 |
i386*) |
167 |
die "Your target has no support for NPTL" |
168 |
;; |
169 |
esac |
170 |
fi |
171 |
} |
172 |
|
173 |
kconfig_q_opt() { |
174 |
local flag=$1; shift |
175 |
case ${flag} in |
176 |
y|n) ;; |
177 |
*) flag=$(usex ${flag} y n) ;; |
178 |
esac |
179 |
|
180 |
local var="defs_${flag}" |
181 |
eval "${var}+=( $* )" |
182 |
} |
183 |
|
184 |
get_opt() { |
185 |
( |
186 |
unset ${1} |
187 |
. ${2:-"${S}"/.config} |
188 |
echo ${!1} |
189 |
) |
190 |
} |
191 |
|
192 |
src_oldconfig() { |
193 |
yes "" 2>/dev/null | emake -s oldconfig >/dev/null |
194 |
} |
195 |
src_config() { |
196 |
restore_config .config |
197 |
if [ -f .config ]; then |
198 |
src_oldconfig |
199 |
return 0 |
200 |
else |
201 |
ewarn "Could not locate user configfile, so we will save a default one" |
202 |
fi |
203 |
|
204 |
emake ARCH=${target} defconfig >/dev/null || die |
205 |
|
206 |
local defs_{y,n} defs |
207 |
|
208 |
defs=( |
209 |
DO{DEBUG_PT,ASSERTS} |
210 |
SUPPORT_LD_DEBUG_EARLY |
211 |
UCLIBC_HAS_PROFILING |
212 |
) |
213 |
kconfig_q_opt n "${defs[@]}" |
214 |
kconfig_q_opt debug DODEBUG SUPPORT_LD_DEBUG |
215 |
|
216 |
sed -i -e '/ARCH_.*_ENDIAN/d' .config |
217 |
kconfig_q_opt y "ARCH_WANTS_$(uclibc_endian)_ENDIAN" |
218 |
|
219 |
if [[ ${CTARGET} == arm* ]] ; then |
220 |
kconfig_q_opt n CONFIG_ARM_OABI |
221 |
kconfig_q_opt y CONFIG_ARM_EABI |
222 |
fi |
223 |
|
224 |
defs=( |
225 |
MALLOC_GLIBC_COMPAT |
226 |
DO_C99_MATH |
227 |
UCLIBC_HAS_{CTYPE_CHECKED,WCHAR,HEXADECIMAL_FLOATS,GLIBC_CUSTOM_PRINTF,FOPEN_EXCLUSIVE_MODE,GLIBC_CUSTOM_STREAMS,PRINTF_M_SPEC} |
228 |
UCLIBC_HAS_FENV |
229 |
UCLIBC_HAS_{N,}FTW |
230 |
UCLIBC_HAS_GNU_GLOB |
231 |
UCLIBC_HAS_LIBUTIL |
232 |
UCLIBC_HAS_PROGRAM_INVOCATION_NAME |
233 |
UCLIBC_HAS_RESOLVER_SUPPORT |
234 |
UCLIBC_HAS_TZ_FILE_READ_MANY |
235 |
UCLIBC_HAS_UTMPX |
236 |
UCLIBC_SUPPORT_AI_ADDRCONFIG |
237 |
UCLIBC_SUSV3_LEGACY |
238 |
UCLIBC_SUSV3_LEGACY_MACROS |
239 |
UCLIBC_SUSV4_LEGACY |
240 |
UCLIBC_USE_NETLINK |
241 |
PTHREADS_DEBUG_SUPPORT |
242 |
) |
243 |
kconfig_q_opt y "${defs[@]}" |
244 |
kconfig_q_opt n UCLIBC_HAS_CTYPE_UNSAFE |
245 |
kconfig_q_opt n UCLIBC_HAS_LOCALE |
246 |
kconfig_q_opt n HAS_NO_THREADS |
247 |
kconfig_q_opt ipv6 UCLIBC_HAS_IPV6 |
248 |
kconfig_q_opt nptl UCLIBC_HAS_THREADS_NATIVE |
249 |
kconfig_q_opt !nptl LINUXTHREADS_OLD |
250 |
kconfig_q_opt rpc UCLIBC_HAS_{,{FULL,REENTRANT}_}RPC |
251 |
kconfig_q_opt wordexp UCLIBC_HAS_WORDEXP |
252 |
kconfig_q_opt uclibc-compat UCLIBC_HAS_LIB{NSL,RESOLV}_STUB COMPAT_ATEXIT |
253 |
|
254 |
# we need to do it independently of hardened to get ssp.c built into libc |
255 |
kconfig_q_opt y UCLIBC_HAS_SSP |
256 |
kconfig_q_opt n UCLIBC_HAS_SSP_COMPAT |
257 |
kconfig_q_opt y UCLIBC_HAS_ARC4RANDOM |
258 |
kconfig_q_opt n PROPOLICE_BLOCK_ABRT |
259 |
kconfig_q_opt y PROPOLICE_BLOCK_SEGV |
260 |
|
261 |
# arm/mips do not emit PT_GNU_STACK, but if we enable this here |
262 |
# it will be emitted as RWE, ppc has to be checked, x86 needs it |
263 |
# this option should be used independently of hardened |
264 |
if has $(tc-arch) x86 || has $(tc-arch) ppc ; then |
265 |
kconfig_q_opt y UCLIBC_BUILD_NOEXECSTACK |
266 |
else |
267 |
kconfig_q_opt n UCLIBC_BUILD_NOEXECSTACK |
268 |
fi |
269 |
kconfig_q_opt y UCLIBC_BUILD_RELRO |
270 |
kconfig_q_opt hardened UCLIBC_BUILD_PIE |
271 |
kconfig_q_opt hardened UCLIBC_BUILD_NOW |
272 |
kconfig_q_opt !ssp SSP_QUICK_CANARY |
273 |
kconfig_q_opt ssp UCLIBC_BUILD_SSP |
274 |
|
275 |
local def |
276 |
for def in 1 2 ; do |
277 |
# Run twice as some config opts depend on others being enabled first. |
278 |
for def in ${defs_y[@]} ; do |
279 |
sed -i -e "s:.*\<${def}\>.*set:${def}=y:g" .config |
280 |
done |
281 |
for def in ${defs_n[@]} ; do |
282 |
sed -i -e "s:${def}=y:# ${def} is not set:g" .config |
283 |
done |
284 |
src_oldconfig |
285 |
done |
286 |
|
287 |
einfo "Enabled options:" |
288 |
for def in ${defs_y[@]} ; do |
289 |
einfo " " $(grep "^${def}=y" .config || echo "could not find ${def}") |
290 |
done |
291 |
einfo "Disabled options:" |
292 |
for def in ${defs_n[@]} ; do |
293 |
einfo " " $(grep "^# ${def} is not set" .config || echo "could not find ${def}") |
294 |
done |
295 |
|
296 |
# setup build and run paths |
297 |
sed -i \ |
298 |
-e "/^CROSS_COMPILER_PREFIX/s:=.*:=\"${CTARGET}-\":" \ |
299 |
-e "/^KERNEL_HEADERS/s:=.*:=\"$(alt_build_kprefix)\":" \ |
300 |
-e "/^SHARED_LIB_LOADER_PREFIX/s:=.*:=\"/$(get_libdir)\":" \ |
301 |
-e "/^DEVEL_PREFIX/s:=.*:=\"/usr\":" \ |
302 |
-e "/^RUNTIME_PREFIX/s:=.*:=\"/\":" \ |
303 |
-e "/^UCLIBC_EXTRA_CFLAGS/s:=.*:=\"${UCLIBC_EXTRA_CFLAGS}\":" \ |
304 |
.config || die |
305 |
|
306 |
src_oldconfig |
307 |
} |
308 |
|
309 |
src_unpack() { |
310 |
if [[ ${PV} == "9999" ]] ; then |
311 |
git-2_src_unpack |
312 |
else |
313 |
unpack ${A} |
314 |
fi |
315 |
cd "${S}" |
316 |
if [[ -n ${PATCH_VER} ]] ; then |
317 |
EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch |
318 |
fi |
319 |
|
320 |
epatch_user |
321 |
|
322 |
check_cpu_opts |
323 |
|
324 |
echo |
325 |
einfo "Runtime Prefix: /" |
326 |
einfo "Devel Prefix: /usr" |
327 |
einfo "Kernel Prefix: $(alt_build_kprefix)" |
328 |
einfo "CBUILD: ${CBUILD}" |
329 |
einfo "CHOST: ${CHOST}" |
330 |
einfo "CTARGET: ${CTARGET}" |
331 |
einfo "CPU: ${UCLIBC_CPU:-default}" |
332 |
einfo "ENDIAN: $(uclibc_endian)" |
333 |
echo |
334 |
|
335 |
########## CPU SELECTION ########## |
336 |
|
337 |
local target=$(tc-arch) config_target |
338 |
case ${target} in |
339 |
amd64) target="x86_64";; |
340 |
arm) target="arm"; config_target="GENERIC_ARM";; |
341 |
avr) target="avr32";; |
342 |
mips) target="mips"; config_target="MIPS_ISA_1";; |
343 |
ppc) target="powerpc";; |
344 |
sh) target="sh"; config_target="SH4";; |
345 |
x86) target="i386"; config_target="486";; |
346 |
esac |
347 |
if [[ -n ${config_target} ]] ; then |
348 |
sed -i -e "s:default CONFIG_${config_target}:default CONFIG_${UCLIBC_CPU:-${config_target}}:" \ |
349 |
extra/Configs/Config.${target} || die |
350 |
fi |
351 |
sed -i -e "s:^HOSTCC.*=.*:HOSTCC=$(tc-getBUILD_CC):" Rules.mak |
352 |
|
353 |
src_config |
354 |
|
355 |
if use iconv ; then |
356 |
# Run after make clean, otherwise files removed |
357 |
find ./extra/locale/charmaps -name "*.pairs" > extra/locale/codesets.txt |
358 |
if [[ ! -f /etc/locale.gen ]] ; then |
359 |
# See ./extra/locale/LOCALES for examples |
360 |
die "Please create an appropriate /etc/locale.gen for locale support" |
361 |
fi |
362 |
echo -e "@euro e\n@cyrillic c\n#---\nUTF-8 yes\n8-BIT yes\n#---\n\n" > ./extra/locale/locales.txt |
363 |
cat /etc/locale.gen >> ./extra/locale/locales.txt |
364 |
fi |
365 |
} |
366 |
|
367 |
src_compile() { |
368 |
emake headers || die |
369 |
just_headers && return 0 |
370 |
|
371 |
emake || die |
372 |
if is_crosscompile ; then |
373 |
emake -C utils hostutils || die |
374 |
else |
375 |
emake utils || die |
376 |
fi |
377 |
} |
378 |
|
379 |
src_test() { |
380 |
is_crosscompile && return 0 |
381 |
|
382 |
# assert test fails on pax/grsec enabled kernels - normal |
383 |
# vfork test fails in sandbox (both glibc/uclibc) |
384 |
emake UCLIBC_ONLY=1 check || die |
385 |
} |
386 |
|
387 |
src_install() { |
388 |
local sysroot=${D} |
389 |
is_crosscompile && sysroot+="/usr/${CTARGET}" |
390 |
|
391 |
local target="install" |
392 |
just_headers && target="install_headers" |
393 |
emake DESTDIR="${sysroot}" ${target} || die |
394 |
|
395 |
save_config .config |
396 |
|
397 |
# remove files coming from kernel-headers |
398 |
rm -rf "${sysroot}"/usr/include/{linux,asm*} |
399 |
|
400 |
# Make sure we install the sys-include symlink so that when |
401 |
# we build a 2nd stage cross-compiler, gcc finds the target |
402 |
# system headers correctly. See gcc/doc/gccinstall.info |
403 |
if is_crosscompile ; then |
404 |
dosym usr/include /usr/${CTARGET}/sys-include |
405 |
if ! just_headers && [[ -n $(get_opt HAVE_SHARED) ]] ; then |
406 |
newbin utils/ldconfig.host ${CTARGET}-ldconfig || die |
407 |
newbin utils/ldd.host ${CTARGET}-ldd || die |
408 |
fi |
409 |
return 0 |
410 |
fi |
411 |
|
412 |
emake DESTDIR="${D}" install_utils || die |
413 |
dobin extra/scripts/getent |
414 |
dodoc Changelog* README TODO docs/*.txt DEDICATION.mjn3 |
415 |
} |
416 |
|
417 |
pkg_postinst() { |
418 |
is_crosscompile && return 0 |
419 |
|
420 |
if [ ! -e "${ROOT}"/etc/TZ ] ; then |
421 |
ewarn "Please remember to set your timezone in /etc/TZ" |
422 |
mkdir -p "${ROOT}"/etc |
423 |
echo "UTC" > "${ROOT}"/etc/TZ |
424 |
fi |
425 |
[ "${ROOT}" != "/" ] && return 0 |
426 |
# update cache before reloading init |
427 |
ldconfig |
428 |
# reload init ... |
429 |
/sbin/telinit U 2>/dev/null |
430 |
} |