1 |
commit: c32b58a8b456af4da6b766fd26bc0d54e3b7cb05 |
2 |
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 25 16:08:54 2016 +0000 |
4 |
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 25 16:13:49 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c32b58a8 |
7 |
|
8 |
dev-libs/klibc: Drop old |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
dev-libs/klibc/Manifest | 3 - |
13 |
dev-libs/klibc/klibc-2.0.2-r1.ebuild | 295 -------------------------------- |
14 |
dev-libs/klibc/klibc-2.0.2.ebuild | 286 ------------------------------- |
15 |
dev-libs/klibc/klibc-2.0.3-r1.ebuild | 316 ----------------------------------- |
16 |
dev-libs/klibc/klibc-2.0.3.ebuild | 304 --------------------------------- |
17 |
5 files changed, 1204 deletions(-) |
18 |
|
19 |
diff --git a/dev-libs/klibc/Manifest b/dev-libs/klibc/Manifest |
20 |
index df9bca8..4d5cec7 100644 |
21 |
--- a/dev-libs/klibc/Manifest |
22 |
+++ b/dev-libs/klibc/Manifest |
23 |
@@ -1,8 +1,5 @@ |
24 |
DIST klibc-1.5.25.tar.bz2 510064 SHA256 0b910ec0b2a97d4c775ed06e44ad7bca7be150efdf2a77a19253a573e16367d3 SHA512 e550afb319cd995fb9c7fb086bc8ede550e5e4a48856ff5856e2296f691ba643c9fcc314c5e973f4d5b4f33b543ef4bc10d29b389f83e5418ec860a80e7cac45 WHIRLPOOL d986dcdcc95e2c7846d2eda9338519d5d84f50e94f82f1eee0234a17504ae10abaa75b6c89e9cf4c228690c0cc489d4323d98e5e62cde10cf7a04581026309f3 |
25 |
-DIST klibc-2.0.2.tar.xz 466696 SHA256 1e9d4ba6fe2aeea0bd27d14a9a674c29fb7cf766ff021e9c5f99256cb409474e SHA512 14c862ac58da37db98b40cc03a216643a4d2c424ea1b988f6ea274c999515c6661f711adcf5aac8ed10c7668e05004b8844b0a862c2f32fa28c240dd37003722 WHIRLPOOL 6fea496b32e08e8fd0c54b60997da70db2d6216a8f4a2c6d56ce83485f41c82cce291344ecffac0a38cfa88308033fe768e9b50d2102d803f7b8ff18412100a0 |
26 |
-DIST klibc-2.0.3.tar.xz 468920 SHA256 02035f2b230020de569d40605485121e0fe481ed33a93bdb8bf8c6ee2695fffa SHA512 47a27496d8fa7c57279f9215367369dc9bae496f04b023a2e506813efca7db5de766ddcdb227804123a2fff7f6691dbf01cfaaed3396ce149e6b091f356fa233 WHIRLPOOL bba62fc57372053fdf78dac234f5210ce196723a27499da0fbcf4de05d06eee3ad1963ee5919680c3dcea3941c597a035e7110ad87545585b7430abb6d0d4c6b |
27 |
DIST klibc-2.0.4.tar.xz 469348 SHA256 7f9a0850586def7cf4faeeb75e5d0f66e613674c524f6e77b0f4d93a26c801cb SHA512 7a01d1744b49f3de64111fefc522b1d63f054199acf671254bc046d6f1d0b6ca68e050c99025bf8303751c2466a5e034677555649ae5909c40997858d393db8d WHIRLPOOL f5dc71b48f118155df512d8ac839b66d361b22ff4e040e49a562722d82f18ac83a8c682bf0b4c59a9b108473f74bebc673d38456cf0ab5b1051071ca3fa9b78e |
28 |
DIST klibc_2.0.2-1.debian.tar.gz 21305 SHA256 93f4b9be5a3c725a38b7ac137850311e3cf8d8094874006c7dce793d2b71e469 SHA512 9cbcc39396a49bc37ace79eaefad6e704ddc9f30aba1b39f40dd2888dad06eeeb7b9c1a387cee60a95cf5641f50bd7f225cf8209547c75a8bae8af4285152d91 WHIRLPOOL a42e148550a27426e8f38b54cb4f3b1f355759d573ab27c0ecadb0c68d0afd54a5950471628ec4e2e27ac9c8b9d841940d6b0f2c0a873d4feab7af37e7989a52 |
29 |
DIST linux-2.6.39.tar.bz2 76096559 SHA256 584d17f2a3ee18a9501d7ff36907639e538cfdba4529978b8550c461d45c61f6 SHA512 06cb5aba7c53c68d43afcebbbb9507d8b398b3e994d8a237c66a49374ca569237f074adaa3fccba7f908eab4f51f99bae40656793eab5c2f5ce03cd3a65fa02c WHIRLPOOL 2f2c833ab1d8ddbe3e0b862b71a38d47fd3fc5688ea81cdd818369b09e72fa50481bf84533ddcea992af1130b2ceec10b6ff5eaff393a14ee70639293a555912 |
30 |
DIST linux-3.12.tar.xz 76384600 SHA256 2e120ec7fde19fa51dc6b6cc11c81860a0775defcad5a5bf910ed9a50e845a02 SHA512 4ba5797e0772726d05c9f2eee66dc6dc2a5033c749ef44764c805a83da739ed5d0c6443b76785e38fe1ef74cc7ade787e48144faed0cfcb6f124f05248c700ff WHIRLPOOL a40195f6b53ba3440cf90a44495f6a59670f750851d1518e2bdfe3b949f0e898d1df5d37e271c31c555087026ddb6cc2c9109b22b9639e3222735e6f650a1417 |
31 |
-DIST linux-3.2.tar.xz 65065516 SHA256 dd96ed02b53fb5d57762e4b1f573460909de472ca588f81ec6660e4a172e7ba7 SHA512 77e9a52d78d6c8e951df1e166023eebe5defc5ef3c45d3ac84b613137b3c2e55cee5693d828ebd06c5034bd89ea2a5f862f55824f2b7839c9ad7212c81e3ecb0 WHIRLPOOL 7cc68baac4441740e2171fbbc4195ee6c0351de099aadaee8cb3487f6d1f8b7e1d3144ee54ba38dbd24d6be431a1ea3b921ffce82ff84df21a98da7bc61c1d17 |
32 |
|
33 |
diff --git a/dev-libs/klibc/klibc-2.0.2-r1.ebuild b/dev-libs/klibc/klibc-2.0.2-r1.ebuild |
34 |
deleted file mode 100644 |
35 |
index 4ffba27..00000000 |
36 |
--- a/dev-libs/klibc/klibc-2.0.2-r1.ebuild |
37 |
+++ /dev/null |
38 |
@@ -1,295 +0,0 @@ |
39 |
-# Copyright 1999-2014 Gentoo Foundation |
40 |
-# Distributed under the terms of the GNU General Public License v2 |
41 |
-# $Id$ |
42 |
- |
43 |
-# Robin H. Johnson <robbat2@g.o>, 12 Nov 2007: |
44 |
-# This still needs major work. |
45 |
-# But it is significently better than the previous version. |
46 |
-# In that it will now build on biarch systems, such as ppc64-32ul. |
47 |
- |
48 |
-# NOTES: |
49 |
-# ====== |
50 |
-# We need to bring in the kernel sources seperately |
51 |
-# Because they have to be configured in a way that differs from the copy in |
52 |
-# /usr/src/. The sys-kernel/linux-headers are too stripped down to use |
53 |
-# unfortunately. |
54 |
-# This will be able to go away once the klibc author updates his code |
55 |
-# to build again the headers provided by the kernel's 'headers_install' target. |
56 |
- |
57 |
-EAPI=5 |
58 |
-K_TARBALL_SUFFIX="xz" |
59 |
- |
60 |
-inherit eutils multilib toolchain-funcs flag-o-matic |
61 |
- |
62 |
-DESCRIPTION="A minimal libc subset for use with initramfs" |
63 |
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc" |
64 |
-KV_MAJOR="3" KV_MINOR="x" KV_SUB="2" |
65 |
-PKV_EXTRA="" |
66 |
-if [[ ${PKV_EXTRA} ]]; then |
67 |
- if [[ ${KV_MAJOR} == 2 ]]; then |
68 |
- PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}" |
69 |
- else |
70 |
- PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}" |
71 |
- fi |
72 |
- PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}" |
73 |
-fi |
74 |
-if [[ ${KV_MAJOR} == 2 ]]; then |
75 |
- OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}" |
76 |
-else |
77 |
- OKV="${KV_MAJOR}.${KV_SUB}" |
78 |
-fi |
79 |
-KERNEL_URI=" |
80 |
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX} |
81 |
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}" |
82 |
-SRC_URI=" |
83 |
- mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX} |
84 |
- ${PATCH_URI} |
85 |
- ${KERNEL_URI}" |
86 |
- |
87 |
-LICENSE="|| ( GPL-2 LGPL-2 )" |
88 |
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86" |
89 |
-SLOT="0" |
90 |
-IUSE="debug test custom-cflags" |
91 |
- |
92 |
-DEPEND="dev-lang/perl" |
93 |
-RDEPEND="${DEPEND}" |
94 |
- |
95 |
-KS="${WORKDIR}/linux-${OKV}" |
96 |
- |
97 |
-# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot |
98 |
-QA_EXECSTACK="*" |
99 |
-# Do not strip |
100 |
-RESTRICT="strip" |
101 |
- |
102 |
-kernel_asm_arch() { |
103 |
- a="${1:${ARCH}}" |
104 |
- case ${a} in |
105 |
- # Merged arches |
106 |
- x86) echo i386 ;; # for build on x86 userspace & 64bit kernel |
107 |
- amd64) echo x86 ;; |
108 |
- ppc*) echo powerpc ;; |
109 |
- # Non-merged |
110 |
- alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;; |
111 |
- *) die "TODO: Update the code for your asm-ARCH symlink" ;; |
112 |
- esac |
113 |
-} |
114 |
- |
115 |
-# For a given Gentoo ARCH, |
116 |
-# specify the kernel defconfig most relevant |
117 |
-kernel_defconfig() { |
118 |
- a="${1:${ARCH}}" |
119 |
- # most, but not all arches have a sanely named defconfig |
120 |
- case ${a} in |
121 |
- ppc64) echo ppc64_defconfig ;; |
122 |
- ppc) echo pmac32_defconfig ;; |
123 |
- sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;; |
124 |
- *) echo defconfig ;; |
125 |
- esac |
126 |
-} |
127 |
- |
128 |
-src_unpack() { |
129 |
- unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX} |
130 |
-} |
131 |
- |
132 |
-src_prepare() { |
133 |
- [[ ${PKV} ]] && EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX} |
134 |
- cd "${S}" |
135 |
- |
136 |
- # Symlink /usr/src/linux to ${S}/linux |
137 |
- ln -snf "${KS}" linux |
138 |
- #ln -snf "/usr" linux |
139 |
- |
140 |
- # Build interp.o with EXTRA_KLIBCAFLAGS (.S source) |
141 |
- epatch "${FILESDIR}"/${PN}-1.4.11-interp-flags.patch |
142 |
- |
143 |
- # Fix usage of -s, bug #201006 |
144 |
- epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch |
145 |
-} |
146 |
- |
147 |
-# klibc has it's own ideas of arches |
148 |
-# They reflect userspace strictly. |
149 |
-# This functions maps from a Gentoo ARCH, to an arch that klibc expects |
150 |
-# Look at klibc-${S}/usr/klibc/arch for a list of these arches |
151 |
-klibc_arch() { |
152 |
- a="${1:${ARCH}}" |
153 |
- case ${a} in |
154 |
- amd64) echo x86_64;; |
155 |
- mips) die 'TODO: Use the $ABI' ;; |
156 |
- x86) echo i386;; |
157 |
- *) echo ${a} ;; |
158 |
- esac |
159 |
-} |
160 |
- |
161 |
-src_compile() { |
162 |
- local myargs="all" |
163 |
- local myARCH="${ARCH}" myABI="${ABI}" |
164 |
- # TODO: For cross-compiling |
165 |
- # You should set ARCH and ABI here |
166 |
- CC="$(tc-getCC)" |
167 |
- LD="$(tc-getLD)" |
168 |
- HOSTCC="$(tc-getBUILD_CC)" |
169 |
- HOSTLD="$(tc-getBUILD_LD)" |
170 |
- KLIBCARCH="$(klibc_arch ${ARCH})" |
171 |
- KLIBCASMARCH="$(kernel_asm_arch ${ARCH})" |
172 |
- libdir="$(get_libdir)" |
173 |
- # This should be the defconfig corresponding to your userspace! |
174 |
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example. |
175 |
- defconfig=$(kernel_defconfig ${ARCH}) |
176 |
- unset ABI ARCH # Unset these, because they interfere |
177 |
- unset KBUILD_OUTPUT # we are using a private copy |
178 |
- |
179 |
- cd "${KS}" |
180 |
- emake ${defconfig} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig" |
181 |
- if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \ |
182 |
- [[ "${CHOST/eabi}" != "${CHOST}" ]]; then |
183 |
- # The delete and insert are seperate statements |
184 |
- # so that they are reliably used. |
185 |
- sed -i \ |
186 |
- -e '/CONFIG_AEABI/d' \ |
187 |
- -e '1iCONFIG_AEABI=y' \ |
188 |
- -e '/CONFIG_OABI_COMPAT/d' \ |
189 |
- -e '1iCONFIG_OABI_COMPAT=y' \ |
190 |
- "${KS}"/.config \ |
191 |
- "${S}"/defconfig |
192 |
- fi |
193 |
- emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage" |
194 |
- |
195 |
- cd "${S}" |
196 |
- |
197 |
- use debug && myargs="${myargs} V=1" |
198 |
- use test && myargs="${myargs} test" |
199 |
- append-ldflags -z noexecstack |
200 |
- |
201 |
- emake \ |
202 |
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ |
203 |
- EXTRA_KLIBCLDFLAGS="-z noexecstack" \ |
204 |
- HOSTLDFLAGS="-z noexecstack" \ |
205 |
- HOSTCC="${HOSTCC}" CC="${CC}" \ |
206 |
- HOSTLD="${HOSTLD}" LD="${LD}" \ |
207 |
- INSTALLDIR="/usr/${libdir}/klibc" \ |
208 |
- KLIBCARCH=${KLIBCARCH} \ |
209 |
- KLIBCASMARCH=${KLIBCASMARCH} \ |
210 |
- SHLIBDIR="/${libdir}" \ |
211 |
- libdir="/usr/${libdir}" \ |
212 |
- mandir="/usr/share/man" \ |
213 |
- T="${T}" \ |
214 |
- $(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \ |
215 |
- $(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \ |
216 |
- ${myargs} || die "Compile failed!" |
217 |
- |
218 |
- #SHLIBDIR="/${libdir}" \ |
219 |
- |
220 |
- ARCH="${myARCH}" ABI="${myABI}" |
221 |
-} |
222 |
- |
223 |
-src_install() { |
224 |
- local myargs |
225 |
- local myARCH="${ARCH}" myABI="${ABI}" |
226 |
- # TODO: For cross-compiling |
227 |
- # You should set ARCH and ABI here |
228 |
- CC="$(tc-getCC)" |
229 |
- HOSTCC="$(tc-getBUILD_CC)" |
230 |
- KLIBCARCH="$(klibc_arch ${ARCH})" |
231 |
- KLIBCASMARCH="$(kernel_asm_arch ${ARCH})" |
232 |
- libdir="$(get_libdir)" |
233 |
- # This should be the defconfig corresponding to your userspace! |
234 |
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example. |
235 |
- defconfig=$(kernel_defconfig ${ARCH}) |
236 |
- |
237 |
- use debug && myargs="${myargs} V=1" |
238 |
- |
239 |
- local klibc_prefix |
240 |
- if tc-is-cross-compiler ; then |
241 |
- klibc_prefix=$("${S}/klcc/${KLIBCARCH}-klcc" -print-klibc-prefix) |
242 |
- else |
243 |
- klibc_prefix=$("${S}/klcc/klcc" -print-klibc-prefix) |
244 |
- fi |
245 |
- |
246 |
- unset ABI ARCH # Unset these, because they interfere |
247 |
- unset KBUILD_OUTPUT # we are using a private copy |
248 |
- |
249 |
- emake \ |
250 |
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ |
251 |
- EXTRA_KLIBCLDFLAGS="-z noexecstack" \ |
252 |
- HOSTLDFLAGS="-z noexecstack" \ |
253 |
- HOSTCC="${HOSTCC}" CC="${CC}" \ |
254 |
- HOSTLD="${HOSTLD}" LD="${LD}" \ |
255 |
- INSTALLDIR="/usr/${libdir}/klibc" \ |
256 |
- INSTALLROOT="${D}" \ |
257 |
- KLIBCARCH=${KLIBCARCH} \ |
258 |
- KLIBCASMARCH=${KLIBCASMARCH} \ |
259 |
- SHLIBDIR="/${libdir}" \ |
260 |
- libdir="/usr/${libdir}" \ |
261 |
- mandir="/usr/share/man" \ |
262 |
- T="${T}" \ |
263 |
- $(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \ |
264 |
- $(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \ |
265 |
- ${myargs} \ |
266 |
- install || die "Install failed!" |
267 |
- |
268 |
- #SHLIBDIR="/${libdir}" \ |
269 |
- |
270 |
- # klibc doesn't support prelinking, so we need to mask it |
271 |
- cat > "${T}/70klibc" <<-EOF |
272 |
- PRELINK_PATH_MASK="/usr/${libdir}/klibc" |
273 |
- EOF |
274 |
- |
275 |
- doenvd "${T}"/70klibc |
276 |
- |
277 |
- # Fix the permissions (bug #178053) on /usr/${libdir}/klibc/include |
278 |
- # Actually I have no idea, why the includes have those weird-ass permissions |
279 |
- # on a particular system, might be due to inherited permissions from parent |
280 |
- # directory |
281 |
- find "${D}"/usr/${libdir}/klibc/include | xargs chmod o+rX |
282 |
- find "${D}"/usr/${libdir}/klibc/include -type f \ |
283 |
- \( -name '.install' -o -name '..install.cmd' \) -delete || die |
284 |
- |
285 |
- # Hardlinks becoming copies |
286 |
- for x in gunzip zcat ; do |
287 |
- rm -f "${D}/${klibc_prefix}/bin/${x}" |
288 |
- dosym gzip "${klibc_prefix}/bin/${x}" |
289 |
- done |
290 |
- |
291 |
- # Restore now, so we can use the tc- functions |
292 |
- ARCH="${myARCH}" ABI="${myABI}" |
293 |
- if ! tc-is-cross-compiler ; then |
294 |
- cd "${S}" |
295 |
- insinto /usr/share/aclocal |
296 |
- doins contrib/klibc.m4 |
297 |
- |
298 |
- dodoc README usr/klibc/CAVEATS |
299 |
- docinto gzip; dodoc usr/gzip/README |
300 |
- fi |
301 |
- |
302 |
- # Fix up the symlink |
303 |
- # Mainly for merged arches |
304 |
- linkname="${D}/usr/${libdir}/klibc/include/asm" |
305 |
- if [ -L "${linkname}" ] && [ ! -e "${linkname}" ] ; then |
306 |
- ln -snf asm-${KLIBCASMARCH} "${linkname}" |
307 |
- fi |
308 |
-} |
309 |
- |
310 |
-src_test() { |
311 |
- if ! tc-is-cross-compiler ; then |
312 |
- cd "${S}"/usr/klibc/tests |
313 |
- ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')" |
314 |
- BROKEN_TESTS="fcntl fnmatch testrand48" |
315 |
- failed=0 |
316 |
- for t in $ALL_TESTS ; do |
317 |
- if has $t $BROKEN_TESTS ; then |
318 |
- echo "=== $t SKIP" |
319 |
- else |
320 |
- echo -n "=== $t " |
321 |
- ./$t </dev/null >/dev/null |
322 |
- rc=$? |
323 |
- if [ $rc -eq 0 ]; then |
324 |
- echo PASS |
325 |
- else |
326 |
- echo FAIL |
327 |
- failed=1 |
328 |
- fi |
329 |
- fi |
330 |
- done |
331 |
- [ $failed -ne 0 ] && die "Some tests failed." |
332 |
- fi |
333 |
-} |
334 |
|
335 |
diff --git a/dev-libs/klibc/klibc-2.0.2.ebuild b/dev-libs/klibc/klibc-2.0.2.ebuild |
336 |
deleted file mode 100644 |
337 |
index f301d43..00000000 |
338 |
--- a/dev-libs/klibc/klibc-2.0.2.ebuild |
339 |
+++ /dev/null |
340 |
@@ -1,286 +0,0 @@ |
341 |
-# Copyright 1999-2014 Gentoo Foundation |
342 |
-# Distributed under the terms of the GNU General Public License v2 |
343 |
-# $Id$ |
344 |
- |
345 |
-# Robin H. Johnson <robbat2@g.o>, 12 Nov 2007: |
346 |
-# This still needs major work. |
347 |
-# But it is significently better than the previous version. |
348 |
-# In that it will now build on biarch systems, such as ppc64-32ul. |
349 |
- |
350 |
-# NOTES: |
351 |
-# ====== |
352 |
-# We need to bring in the kernel sources seperately |
353 |
-# Because they have to be configured in a way that differs from the copy in |
354 |
-# /usr/src/. The sys-kernel/linux-headers are too stripped down to use |
355 |
-# unfortunately. |
356 |
-# This will be able to go away once the klibc author updates his code |
357 |
-# to build again the headers provided by the kernel's 'headers_install' target. |
358 |
- |
359 |
-EAPI=5 |
360 |
-K_TARBALL_SUFFIX="xz" |
361 |
- |
362 |
-inherit eutils multilib toolchain-funcs |
363 |
- |
364 |
-DESCRIPTION="A minimal libc subset for use with initramfs" |
365 |
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc" |
366 |
-KV_MAJOR="3" KV_MINOR="x" KV_SUB="2" |
367 |
-PKV_EXTRA="" |
368 |
-if [[ ${PKV_EXTRA} ]]; then |
369 |
- if [[ ${KV_MAJOR} == 2 ]]; then |
370 |
- PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}" |
371 |
- else |
372 |
- PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}" |
373 |
- fi |
374 |
- PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}" |
375 |
-fi |
376 |
-if [[ ${KV_MAJOR} == 2 ]]; then |
377 |
- OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}" |
378 |
-else |
379 |
- OKV="${KV_MAJOR}.${KV_SUB}" |
380 |
-fi |
381 |
-KERNEL_URI=" |
382 |
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX} |
383 |
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}" |
384 |
-SRC_URI=" |
385 |
- mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX} |
386 |
- ${PATCH_URI} |
387 |
- ${KERNEL_URI}" |
388 |
- |
389 |
-LICENSE="|| ( GPL-2 LGPL-2 )" |
390 |
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86" |
391 |
-SLOT="0" |
392 |
-IUSE="debug test" |
393 |
- |
394 |
-DEPEND="dev-lang/perl" |
395 |
-RDEPEND="${DEPEND}" |
396 |
- |
397 |
-KS="${WORKDIR}/linux-${OKV}" |
398 |
- |
399 |
-# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot |
400 |
-QA_EXECSTACK="*" |
401 |
-# Do not strip |
402 |
-RESTRICT="strip" |
403 |
- |
404 |
-kernel_asm_arch() { |
405 |
- a="${1:${ARCH}}" |
406 |
- case ${a} in |
407 |
- # Merged arches |
408 |
- x86) echo i386 ;; # for build on x86 userspace & 64bit kernel |
409 |
- amd64) echo x86 ;; |
410 |
- ppc*) echo powerpc ;; |
411 |
- # Non-merged |
412 |
- alpha|arm|ia64|m68k|mips|sh|sparc*) echo ${1} ;; |
413 |
- *) die "TODO: Update the code for your asm-ARCH symlink" ;; |
414 |
- esac |
415 |
-} |
416 |
- |
417 |
-# For a given Gentoo ARCH, |
418 |
-# specify the kernel defconfig most relevant |
419 |
-kernel_defconfig() { |
420 |
- a="${1:${ARCH}}" |
421 |
- # most, but not all arches have a sanely named defconfig |
422 |
- case ${a} in |
423 |
- ppc64) echo ppc64_defconfig ;; |
424 |
- ppc) echo pmac32_defconfig ;; |
425 |
- sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;; |
426 |
- *) echo defconfig ;; |
427 |
- esac |
428 |
-} |
429 |
- |
430 |
-src_unpack() { |
431 |
- unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX} |
432 |
-} |
433 |
- |
434 |
-src_prepare() { |
435 |
- [[ ${PKV} ]] && EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX} |
436 |
- cd "${S}" |
437 |
- |
438 |
- # Symlink /usr/src/linux to ${S}/linux |
439 |
- ln -snf "${KS}" linux |
440 |
- #ln -snf "/usr" linux |
441 |
- |
442 |
- # Build interp.o with EXTRA_KLIBCAFLAGS (.S source) |
443 |
- epatch "${FILESDIR}"/${PN}-1.4.11-interp-flags.patch |
444 |
- |
445 |
- # Fix usage of -s, bug #201006 |
446 |
- epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch |
447 |
-} |
448 |
- |
449 |
-# klibc has it's own ideas of arches |
450 |
-# They reflect userspace strictly. |
451 |
-# This functions maps from a Gentoo ARCH, to an arch that klibc expects |
452 |
-# Look at klibc-${S}/usr/klibc/arch for a list of these arches |
453 |
-klibc_arch() { |
454 |
- a="${1:${ARCH}}" |
455 |
- case ${a} in |
456 |
- amd64) echo x86_64;; |
457 |
- mips) die 'TODO: Use the $ABI' ;; |
458 |
- x86) echo i386;; |
459 |
- *) echo ${a} ;; |
460 |
- esac |
461 |
-} |
462 |
- |
463 |
-src_compile() { |
464 |
- local myargs="all" |
465 |
- local myARCH="${ARCH}" myABI="${ABI}" |
466 |
- # TODO: For cross-compiling |
467 |
- # You should set ARCH and ABI here |
468 |
- CC="$(tc-getCC)" |
469 |
- LD="$(tc-getLD)" |
470 |
- HOSTCC="$(tc-getBUILD_CC)" |
471 |
- HOSTLD="$(tc-getBUILD_LD)" |
472 |
- KLIBCARCH="$(klibc_arch ${ARCH})" |
473 |
- KLIBCASMARCH="$(kernel_asm_arch ${ARCH})" |
474 |
- libdir="$(get_libdir)" |
475 |
- # This should be the defconfig corresponding to your userspace! |
476 |
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example. |
477 |
- defconfig=$(kernel_defconfig ${ARCH}) |
478 |
- unset ABI ARCH # Unset these, because they interfere |
479 |
- unset KBUILD_OUTPUT # we are using a private copy |
480 |
- |
481 |
- cd "${KS}" |
482 |
- emake ${defconfig} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig" |
483 |
- if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \ |
484 |
- [[ "${CHOST/eabi}" != "${CHOST}" ]]; then |
485 |
- # The delete and insert are seperate statements |
486 |
- # so that they are reliably used. |
487 |
- sed -i \ |
488 |
- -e '/CONFIG_AEABI/d' \ |
489 |
- -e '1iCONFIG_AEABI=y' \ |
490 |
- -e '/CONFIG_OABI_COMPAT/d' \ |
491 |
- -e '1iCONFIG_OABI_COMPAT=y' \ |
492 |
- "${KS}"/.config \ |
493 |
- "${S}"/defconfig |
494 |
- fi |
495 |
- emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage" |
496 |
- |
497 |
- cd "${S}" |
498 |
- |
499 |
- use debug && myargs="${myargs} V=1" |
500 |
- use test && myargs="${myargs} test" |
501 |
- |
502 |
- emake \ |
503 |
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ |
504 |
- EXTRA_KLIBCLDFLAGS="-z noexecstack" \ |
505 |
- HOSTCC="${HOSTCC}" CC="${CC}" \ |
506 |
- HOSTLD="${HOSTLD}" LD="${LD}" \ |
507 |
- INSTALLDIR="/usr/${libdir}/klibc" \ |
508 |
- KLIBCARCH=${KLIBCARCH} \ |
509 |
- KLIBCASMARCH=${KLIBCASMARCH} \ |
510 |
- SHLIBDIR="/${libdir}" \ |
511 |
- libdir="/usr/${libdir}" \ |
512 |
- mandir="/usr/share/man" \ |
513 |
- T="${T}" \ |
514 |
- ${myargs} || die "Compile failed!" |
515 |
- |
516 |
- #SHLIBDIR="/${libdir}" \ |
517 |
- |
518 |
- ARCH="${myARCH}" ABI="${myABI}" |
519 |
-} |
520 |
- |
521 |
-src_install() { |
522 |
- local myargs |
523 |
- local myARCH="${ARCH}" myABI="${ABI}" |
524 |
- # TODO: For cross-compiling |
525 |
- # You should set ARCH and ABI here |
526 |
- CC="$(tc-getCC)" |
527 |
- HOSTCC="$(tc-getBUILD_CC)" |
528 |
- KLIBCARCH="$(klibc_arch ${ARCH})" |
529 |
- KLIBCASMARCH="$(kernel_asm_arch ${ARCH})" |
530 |
- libdir="$(get_libdir)" |
531 |
- # This should be the defconfig corresponding to your userspace! |
532 |
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example. |
533 |
- defconfig=$(kernel_defconfig ${ARCH}) |
534 |
- |
535 |
- use debug && myargs="${myargs} V=1" |
536 |
- |
537 |
- local klibc_prefix |
538 |
- if tc-is-cross-compiler ; then |
539 |
- klibc_prefix=$("${S}/klcc/${KLIBCARCH}-klcc" -print-klibc-prefix) |
540 |
- else |
541 |
- klibc_prefix=$("${S}/klcc/klcc" -print-klibc-prefix) |
542 |
- fi |
543 |
- |
544 |
- unset ABI ARCH # Unset these, because they interfere |
545 |
- unset KBUILD_OUTPUT # we are using a private copy |
546 |
- |
547 |
- emake \ |
548 |
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ |
549 |
- EXTRA_KLIBCLDFLAGS="-z noexecstack" \ |
550 |
- HOSTCC="${HOSTCC}" CC="${CC}" \ |
551 |
- INSTALLDIR="/usr/${libdir}/klibc" \ |
552 |
- INSTALLROOT="${D}" \ |
553 |
- KLIBCARCH=${KLIBCARCH} \ |
554 |
- KLIBCASMARCH=${KLIBCASMARCH} \ |
555 |
- SHLIBDIR="/${libdir}" \ |
556 |
- libdir="/usr/${libdir}" \ |
557 |
- mandir="/usr/share/man" \ |
558 |
- ${myargs} \ |
559 |
- install || die "Install failed!" |
560 |
- |
561 |
- #SHLIBDIR="/${libdir}" \ |
562 |
- |
563 |
- # klibc doesn't support prelinking, so we need to mask it |
564 |
- cat > "${T}/70klibc" <<-EOF |
565 |
- PRELINK_PATH_MASK="/usr/${libdir}/klibc" |
566 |
- EOF |
567 |
- |
568 |
- doenvd "${T}"/70klibc |
569 |
- |
570 |
- # Fix the permissions (bug #178053) on /usr/${libdir}/klibc/include |
571 |
- # Actually I have no idea, why the includes have those weird-ass permissions |
572 |
- # on a particular system, might be due to inherited permissions from parent |
573 |
- # directory |
574 |
- find "${D}"/usr/${libdir}/klibc/include | xargs chmod o+rX |
575 |
- find "${D}"/usr/${libdir}/klibc/include -type f \ |
576 |
- \( -name '.install' -o -name '..install.cmd' \) -delete || die |
577 |
- |
578 |
- # Hardlinks becoming copies |
579 |
- for x in gunzip zcat ; do |
580 |
- rm -f "${D}/${klibc_prefix}/bin/${x}" |
581 |
- dosym gzip "${klibc_prefix}/bin/${x}" |
582 |
- done |
583 |
- |
584 |
- # Restore now, so we can use the tc- functions |
585 |
- ARCH="${myARCH}" ABI="${myABI}" |
586 |
- if ! tc-is-cross-compiler ; then |
587 |
- cd "${S}" |
588 |
- insinto /usr/share/aclocal |
589 |
- doins contrib/klibc.m4 |
590 |
- |
591 |
- dodoc README usr/klibc/CAVEATS |
592 |
- docinto gzip; dodoc usr/gzip/README |
593 |
- fi |
594 |
- |
595 |
- # Fix up the symlink |
596 |
- # Mainly for merged arches |
597 |
- linkname="${D}/usr/${libdir}/klibc/include/asm" |
598 |
- if [ -L "${linkname}" ] && [ ! -e "${linkname}" ] ; then |
599 |
- ln -snf asm-${KLIBCASMARCH} "${linkname}" |
600 |
- fi |
601 |
-} |
602 |
- |
603 |
-src_test() { |
604 |
- if ! tc-is-cross-compiler ; then |
605 |
- cd "${S}"/usr/klibc/tests |
606 |
- ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')" |
607 |
- BROKEN_TESTS="fcntl fnmatch testrand48" |
608 |
- failed=0 |
609 |
- for t in $ALL_TESTS ; do |
610 |
- if has $t $BROKEN_TESTS ; then |
611 |
- echo "=== $t SKIP" |
612 |
- else |
613 |
- echo -n "=== $t " |
614 |
- ./$t </dev/null >/dev/null |
615 |
- rc=$? |
616 |
- if [ $rc -eq 0 ]; then |
617 |
- echo PASS |
618 |
- else |
619 |
- echo FAIL |
620 |
- failed=1 |
621 |
- fi |
622 |
- fi |
623 |
- done |
624 |
- [ $failed -ne 0 ] && die "Some tests failed." |
625 |
- fi |
626 |
-} |
627 |
|
628 |
diff --git a/dev-libs/klibc/klibc-2.0.3-r1.ebuild b/dev-libs/klibc/klibc-2.0.3-r1.ebuild |
629 |
deleted file mode 100644 |
630 |
index 319325d..00000000 |
631 |
--- a/dev-libs/klibc/klibc-2.0.3-r1.ebuild |
632 |
+++ /dev/null |
633 |
@@ -1,316 +0,0 @@ |
634 |
-# Copyright 1999-2014 Gentoo Foundation |
635 |
-# Distributed under the terms of the GNU General Public License v2 |
636 |
-# $Id$ |
637 |
- |
638 |
-# Robin H. Johnson <robbat2@g.o>, 12 Nov 2007: |
639 |
-# This still needs major work. |
640 |
-# But it is significently better than the previous version. |
641 |
-# In that it will now build on biarch systems, such as ppc64-32ul. |
642 |
- |
643 |
-# NOTES: |
644 |
-# ====== |
645 |
-# We need to bring in the kernel sources seperately |
646 |
-# Because they have to be configured in a way that differs from the copy in |
647 |
-# /usr/src/. The sys-kernel/linux-headers are too stripped down to use |
648 |
-# unfortunately. |
649 |
-# This will be able to go away once the klibc author updates his code |
650 |
-# to build again the headers provided by the kernel's 'headers_install' target. |
651 |
- |
652 |
-EAPI=5 |
653 |
-K_TARBALL_SUFFIX="xz" |
654 |
- |
655 |
-inherit eutils multilib toolchain-funcs flag-o-matic |
656 |
- |
657 |
-DESCRIPTION="A minimal libc subset for use with initramfs" |
658 |
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc/ https://www.kernel.org/pub/linux/libs/klibc/" |
659 |
-KV_MAJOR="3" KV_MINOR="x" KV_SUB="12" |
660 |
-PKV_EXTRA="" |
661 |
-if [[ ${PKV_EXTRA} ]]; then |
662 |
- if [[ ${KV_MAJOR} == 2 ]]; then |
663 |
- PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}" |
664 |
- else |
665 |
- PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}" |
666 |
- fi |
667 |
- PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}" |
668 |
-fi |
669 |
-if [[ ${KV_MAJOR} == 2 ]]; then |
670 |
- OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}" |
671 |
-else |
672 |
- OKV="${KV_MAJOR}.${KV_SUB}" |
673 |
-fi |
674 |
-KERNEL_URI=" |
675 |
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX} |
676 |
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}" |
677 |
-DEBIAN_PV=2.0.2 |
678 |
-DEBIAN_PR=1 |
679 |
-DEBIAN_A="${PN}_${DEBIAN_PV}-${DEBIAN_PR}.debian.tar.gz" |
680 |
-SRC_URI=" |
681 |
- mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX} |
682 |
- mirror://debian/pool/main/k/klibc/${DEBIAN_A} |
683 |
- ${PATCH_URI} |
684 |
- ${KERNEL_URI}" |
685 |
- |
686 |
-LICENSE="|| ( GPL-2 LGPL-2 )" |
687 |
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86" |
688 |
-SLOT="0" |
689 |
-IUSE="debug test custom-cflags" |
690 |
- |
691 |
-DEPEND="dev-lang/perl" |
692 |
-RDEPEND="${DEPEND}" |
693 |
- |
694 |
-KS="${WORKDIR}/linux-${OKV}" |
695 |
- |
696 |
-# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot |
697 |
-QA_EXECSTACK="*" |
698 |
-# Do not strip |
699 |
-RESTRICT="strip" |
700 |
- |
701 |
-kernel_asm_arch() { |
702 |
- a="${1:${ARCH}}" |
703 |
- case ${a} in |
704 |
- # Merged arches |
705 |
- x86) echo i386 ;; # for build on x86 userspace & 64bit kernel |
706 |
- amd64) echo x86 ;; |
707 |
- ppc*) echo powerpc ;; |
708 |
- # Non-merged |
709 |
- alpha|arm|arm64|ia64|m68k|mips|sh|sparc*) echo ${1} ;; |
710 |
- *) die "TODO: Update the code for your asm-ARCH symlink" ;; |
711 |
- esac |
712 |
-} |
713 |
- |
714 |
-# For a given Gentoo ARCH, |
715 |
-# specify the kernel defconfig most relevant |
716 |
-kernel_defconfig() { |
717 |
- a="${1:${ARCH}}" |
718 |
- # most, but not all arches have a sanely named defconfig |
719 |
- case ${a} in |
720 |
- ppc64) echo ppc64_defconfig ;; |
721 |
- ppc) echo pmac32_defconfig ;; |
722 |
- sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;; |
723 |
- *) echo defconfig ;; |
724 |
- esac |
725 |
-} |
726 |
- |
727 |
-src_unpack() { |
728 |
- unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX} ${DEBIAN_A} |
729 |
-} |
730 |
- |
731 |
-src_prepare() { |
732 |
- [[ ${PKV} ]] && EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX} |
733 |
- cd "${S}" |
734 |
- |
735 |
- # Symlink /usr/src/linux to ${S}/linux |
736 |
- ln -snf "${KS}" linux |
737 |
- #ln -snf "/usr" linux |
738 |
- |
739 |
- # Build interp.o with EXTRA_KLIBCAFLAGS (.S source) |
740 |
- epatch "${FILESDIR}"/${PN}-1.4.11-interp-flags.patch |
741 |
- |
742 |
- # Fix usage of -s, bug #201006 |
743 |
- epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch |
744 |
- |
745 |
- # The inline definition from sys/stat.h does not seem to get used |
746 |
- # So just copy it to make this compile for now |
747 |
- epatch "${FILESDIR}"/klibc-2.0.2-mkfifo.patch |
748 |
- |
749 |
- # Newer kernels have some headers in the uapi dir |
750 |
- epatch "${FILESDIR}"/klibc-2.0.3-kernel-uapi.patch |
751 |
- |
752 |
- # Borrow the debian fixes too |
753 |
- for p in $(<"${S}"/debian/patches/series) ; do |
754 |
- epatch "${S}/debian/patches/${p}" |
755 |
- done |
756 |
-} |
757 |
- |
758 |
-# klibc has it's own ideas of arches |
759 |
-# They reflect userspace strictly. |
760 |
-# This functions maps from a Gentoo ARCH, to an arch that klibc expects |
761 |
-# Look at klibc-${S}/usr/klibc/arch for a list of these arches |
762 |
-klibc_arch() { |
763 |
- a="${1:${ARCH}}" |
764 |
- case ${a} in |
765 |
- amd64) echo x86_64;; |
766 |
- mips) die 'TODO: Use the $ABI' ;; |
767 |
- x86) echo i386;; |
768 |
- *) echo ${a} ;; |
769 |
- esac |
770 |
-} |
771 |
- |
772 |
-src_compile() { |
773 |
- local myargs="all" |
774 |
- local myARCH="${ARCH}" myABI="${ABI}" |
775 |
- # TODO: For cross-compiling |
776 |
- # You should set ARCH and ABI here |
777 |
- CC="$(tc-getCC)" |
778 |
- LD="$(tc-getLD)" |
779 |
- HOSTCC="$(tc-getBUILD_CC)" |
780 |
- HOSTLD="$(tc-getBUILD_LD)" |
781 |
- KLIBCARCH="$(klibc_arch ${ARCH})" |
782 |
- KLIBCASMARCH="$(kernel_asm_arch ${ARCH})" |
783 |
- libdir="$(get_libdir)" |
784 |
- # This should be the defconfig corresponding to your userspace! |
785 |
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example. |
786 |
- defconfig=$(kernel_defconfig ${ARCH}) |
787 |
- unset ABI ARCH # Unset these, because they interfere |
788 |
- unset KBUILD_OUTPUT # we are using a private copy |
789 |
- |
790 |
- cd "${KS}" |
791 |
- emake ${defconfig} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig" |
792 |
- if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \ |
793 |
- [[ "${CHOST/eabi}" != "${CHOST}" ]]; then |
794 |
- # The delete and insert are seperate statements |
795 |
- # so that they are reliably used. |
796 |
- sed -i \ |
797 |
- -e '/CONFIG_AEABI/d' \ |
798 |
- -e '1iCONFIG_AEABI=y' \ |
799 |
- -e '/CONFIG_OABI_COMPAT/d' \ |
800 |
- -e '1iCONFIG_OABI_COMPAT=y' \ |
801 |
- "${KS}"/.config \ |
802 |
- "${S}"/defconfig |
803 |
- fi |
804 |
- emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage" |
805 |
- |
806 |
- cd "${S}" |
807 |
- |
808 |
- use debug && myargs="${myargs} V=1" |
809 |
- use test && myargs="${myargs} test" |
810 |
- append-ldflags -z noexecstack |
811 |
- append-flags -nostdlib |
812 |
- |
813 |
- emake \ |
814 |
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ |
815 |
- EXTRA_KLIBCLDFLAGS="-z noexecstack" \ |
816 |
- HOSTLDFLAGS="-z noexecstack" \ |
817 |
- KLIBCOPTFLAGS='-nostdlib' \ |
818 |
- HOSTCC="${HOSTCC}" CC="${CC}" \ |
819 |
- HOSTLD="${HOSTLD}" LD="${LD}" \ |
820 |
- INSTALLDIR="/usr/${libdir}/klibc" \ |
821 |
- KLIBCARCH=${KLIBCARCH} \ |
822 |
- KLIBCASMARCH=${KLIBCASMARCH} \ |
823 |
- SHLIBDIR="/${libdir}" \ |
824 |
- libdir="/usr/${libdir}" \ |
825 |
- mandir="/usr/share/man" \ |
826 |
- T="${T}" \ |
827 |
- $(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \ |
828 |
- $(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \ |
829 |
- $(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \ |
830 |
- ${myargs} || die "Compile failed!" |
831 |
- |
832 |
- #SHLIBDIR="/${libdir}" \ |
833 |
- |
834 |
- ARCH="${myARCH}" ABI="${myABI}" |
835 |
-} |
836 |
- |
837 |
-src_install() { |
838 |
- local myargs |
839 |
- local myARCH="${ARCH}" myABI="${ABI}" |
840 |
- # TODO: For cross-compiling |
841 |
- # You should set ARCH and ABI here |
842 |
- CC="$(tc-getCC)" |
843 |
- HOSTCC="$(tc-getBUILD_CC)" |
844 |
- KLIBCARCH="$(klibc_arch ${ARCH})" |
845 |
- KLIBCASMARCH="$(kernel_asm_arch ${ARCH})" |
846 |
- libdir="$(get_libdir)" |
847 |
- # This should be the defconfig corresponding to your userspace! |
848 |
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example. |
849 |
- defconfig=$(kernel_defconfig ${ARCH}) |
850 |
- |
851 |
- use debug && myargs="${myargs} V=1" |
852 |
- |
853 |
- local klibc_prefix |
854 |
- if tc-is-cross-compiler ; then |
855 |
- klibc_prefix=$("${S}/klcc/${KLIBCARCH}-klcc" -print-klibc-prefix) |
856 |
- else |
857 |
- klibc_prefix=$("${S}/klcc/klcc" -print-klibc-prefix) |
858 |
- fi |
859 |
- |
860 |
- unset ABI ARCH # Unset these, because they interfere |
861 |
- unset KBUILD_OUTPUT # we are using a private copy |
862 |
- |
863 |
- emake \ |
864 |
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ |
865 |
- EXTRA_KLIBCLDFLAGS="-z noexecstack" \ |
866 |
- HOSTLDFLAGS="-z noexecstack" \ |
867 |
- KLIBCOPTFLAGS='-nostdlib' \ |
868 |
- HOSTCC="${HOSTCC}" CC="${CC}" \ |
869 |
- HOSTLD="${HOSTLD}" LD="${LD}" \ |
870 |
- INSTALLDIR="/usr/${libdir}/klibc" \ |
871 |
- INSTALLROOT="${D}" \ |
872 |
- KLIBCARCH=${KLIBCARCH} \ |
873 |
- KLIBCASMARCH=${KLIBCASMARCH} \ |
874 |
- SHLIBDIR="/${libdir}" \ |
875 |
- libdir="/usr/${libdir}" \ |
876 |
- mandir="/usr/share/man" \ |
877 |
- T="${T}" \ |
878 |
- $(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \ |
879 |
- $(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \ |
880 |
- $(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \ |
881 |
- ${myargs} \ |
882 |
- install || die "Install failed!" |
883 |
- |
884 |
- #SHLIBDIR="/${libdir}" \ |
885 |
- |
886 |
- # klibc doesn't support prelinking, so we need to mask it |
887 |
- cat > "${T}/70klibc" <<-EOF |
888 |
- PRELINK_PATH_MASK="/usr/${libdir}/klibc" |
889 |
- EOF |
890 |
- |
891 |
- doenvd "${T}"/70klibc |
892 |
- |
893 |
- # Fix the permissions (bug #178053) on /usr/${libdir}/klibc/include |
894 |
- # Actually I have no idea, why the includes have those weird-ass permissions |
895 |
- # on a particular system, might be due to inherited permissions from parent |
896 |
- # directory |
897 |
- find "${D}"/usr/${libdir}/klibc/include | xargs chmod o+rX |
898 |
- find "${D}"/usr/${libdir}/klibc/include -type f \ |
899 |
- \( -name '.install' -o -name '..install.cmd' \) -delete || die |
900 |
- |
901 |
- # Hardlinks becoming copies |
902 |
- for x in gunzip zcat ; do |
903 |
- rm -f "${D}/${klibc_prefix}/bin/${x}" |
904 |
- dosym gzip "${klibc_prefix}/bin/${x}" |
905 |
- done |
906 |
- |
907 |
- # Restore now, so we can use the tc- functions |
908 |
- ARCH="${myARCH}" ABI="${myABI}" |
909 |
- if ! tc-is-cross-compiler ; then |
910 |
- cd "${S}" |
911 |
- insinto /usr/share/aclocal |
912 |
- doins contrib/klibc.m4 |
913 |
- |
914 |
- dodoc README usr/klibc/CAVEATS |
915 |
- docinto gzip; dodoc usr/gzip/README |
916 |
- fi |
917 |
- |
918 |
- # Fix up the symlink |
919 |
- # Mainly for merged arches |
920 |
- linkname="${D}/usr/${libdir}/klibc/include/asm" |
921 |
- if [ -L "${linkname}" ] && [ ! -e "${linkname}" ] ; then |
922 |
- ln -snf asm-${KLIBCASMARCH} "${linkname}" |
923 |
- fi |
924 |
-} |
925 |
- |
926 |
-src_test() { |
927 |
- if ! tc-is-cross-compiler ; then |
928 |
- cd "${S}"/usr/klibc/tests |
929 |
- ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')" |
930 |
- BROKEN_TESTS="fcntl fnmatch testrand48" |
931 |
- failed=0 |
932 |
- for t in $ALL_TESTS ; do |
933 |
- if has $t $BROKEN_TESTS ; then |
934 |
- echo "=== $t SKIP" |
935 |
- else |
936 |
- echo -n "=== $t " |
937 |
- ./$t </dev/null >/dev/null |
938 |
- rc=$? |
939 |
- if [ $rc -eq 0 ]; then |
940 |
- echo PASS |
941 |
- else |
942 |
- echo FAIL |
943 |
- failed=1 |
944 |
- fi |
945 |
- fi |
946 |
- done |
947 |
- [ $failed -ne 0 ] && die "Some tests failed." |
948 |
- fi |
949 |
-} |
950 |
|
951 |
diff --git a/dev-libs/klibc/klibc-2.0.3.ebuild b/dev-libs/klibc/klibc-2.0.3.ebuild |
952 |
deleted file mode 100644 |
953 |
index 5d2f8f7..00000000 |
954 |
--- a/dev-libs/klibc/klibc-2.0.3.ebuild |
955 |
+++ /dev/null |
956 |
@@ -1,304 +0,0 @@ |
957 |
-# Copyright 1999-2014 Gentoo Foundation |
958 |
-# Distributed under the terms of the GNU General Public License v2 |
959 |
-# $Id$ |
960 |
- |
961 |
-# Robin H. Johnson <robbat2@g.o>, 12 Nov 2007: |
962 |
-# This still needs major work. |
963 |
-# But it is significently better than the previous version. |
964 |
-# In that it will now build on biarch systems, such as ppc64-32ul. |
965 |
- |
966 |
-# NOTES: |
967 |
-# ====== |
968 |
-# We need to bring in the kernel sources seperately |
969 |
-# Because they have to be configured in a way that differs from the copy in |
970 |
-# /usr/src/. The sys-kernel/linux-headers are too stripped down to use |
971 |
-# unfortunately. |
972 |
-# This will be able to go away once the klibc author updates his code |
973 |
-# to build again the headers provided by the kernel's 'headers_install' target. |
974 |
- |
975 |
-EAPI=5 |
976 |
-K_TARBALL_SUFFIX="xz" |
977 |
- |
978 |
-inherit eutils multilib toolchain-funcs flag-o-matic |
979 |
- |
980 |
-DESCRIPTION="A minimal libc subset for use with initramfs" |
981 |
-HOMEPAGE="http://www.zytor.com/mailman/listinfo/klibc" |
982 |
-KV_MAJOR="3" KV_MINOR="x" KV_SUB="2" |
983 |
-PKV_EXTRA="" |
984 |
-if [[ ${PKV_EXTRA} ]]; then |
985 |
- if [[ ${KV_MAJOR} == 2 ]]; then |
986 |
- PKV="${KV_MAJOR}.${KV_MINOR}.$((${KV_SUB}+1))-${PKV_EXTRA}" |
987 |
- else |
988 |
- PKV="${KV_MAJOR}.$((${KV_SUB}+1))-${PKV_EXTRA}" |
989 |
- fi |
990 |
- PATCH_URI="mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/patch-${PKV}.${K_TARBALL_SUFFIX}" |
991 |
-fi |
992 |
-if [[ ${KV_MAJOR} == 2 ]]; then |
993 |
- OKV="${KV_MAJOR}.${KV_MINOR}.${KV_SUB}" |
994 |
-else |
995 |
- OKV="${KV_MAJOR}.${KV_SUB}" |
996 |
-fi |
997 |
-KERNEL_URI=" |
998 |
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/linux-${OKV}.tar.${K_TARBALL_SUFFIX} |
999 |
- mirror://kernel/linux/kernel/v${KV_MAJOR}.${KV_MINOR}/testing/linux-${OKV}.tar.${K_TARBALL_SUFFIX}" |
1000 |
-SRC_URI=" |
1001 |
- mirror://kernel/linux/libs/klibc/${PV:0:3}/${P}.tar.${K_TARBALL_SUFFIX} |
1002 |
- ${PATCH_URI} |
1003 |
- ${KERNEL_URI}" |
1004 |
- |
1005 |
-LICENSE="|| ( GPL-2 LGPL-2 )" |
1006 |
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 -mips ~ppc ~ppc64 ~sparc ~x86" |
1007 |
-SLOT="0" |
1008 |
-IUSE="debug test custom-cflags" |
1009 |
- |
1010 |
-DEPEND="dev-lang/perl" |
1011 |
-RDEPEND="${DEPEND}" |
1012 |
- |
1013 |
-KS="${WORKDIR}/linux-${OKV}" |
1014 |
- |
1015 |
-# Klibc has no PT_GNU_STACK support, so scanning for execstacks is moot |
1016 |
-QA_EXECSTACK="*" |
1017 |
-# Do not strip |
1018 |
-RESTRICT="strip" |
1019 |
- |
1020 |
-kernel_asm_arch() { |
1021 |
- a="${1:${ARCH}}" |
1022 |
- case ${a} in |
1023 |
- # Merged arches |
1024 |
- x86) echo i386 ;; # for build on x86 userspace & 64bit kernel |
1025 |
- amd64) echo x86 ;; |
1026 |
- ppc*) echo powerpc ;; |
1027 |
- # Non-merged |
1028 |
- alpha|arm|arm64|ia64|m68k|mips|sh|sparc*) echo ${1} ;; |
1029 |
- *) die "TODO: Update the code for your asm-ARCH symlink" ;; |
1030 |
- esac |
1031 |
-} |
1032 |
- |
1033 |
-# For a given Gentoo ARCH, |
1034 |
-# specify the kernel defconfig most relevant |
1035 |
-kernel_defconfig() { |
1036 |
- a="${1:${ARCH}}" |
1037 |
- # most, but not all arches have a sanely named defconfig |
1038 |
- case ${a} in |
1039 |
- ppc64) echo ppc64_defconfig ;; |
1040 |
- ppc) echo pmac32_defconfig ;; |
1041 |
- sh*) die "TODO: Your arch is not supported by the klibc ebuild. Please suggest a defconfig in a bug." ;; |
1042 |
- *) echo defconfig ;; |
1043 |
- esac |
1044 |
-} |
1045 |
- |
1046 |
-src_unpack() { |
1047 |
- unpack linux-${OKV}.tar.${K_TARBALL_SUFFIX} ${P}.tar.${K_TARBALL_SUFFIX} |
1048 |
-} |
1049 |
- |
1050 |
-src_prepare() { |
1051 |
- [[ ${PKV} ]] && EPATCH_OPTS="-d ${KS} -p1" epatch "${DISTDIR}"/patch-${PKV}.${K_TARBALL_SUFFIX} |
1052 |
- cd "${S}" |
1053 |
- |
1054 |
- # Symlink /usr/src/linux to ${S}/linux |
1055 |
- ln -snf "${KS}" linux |
1056 |
- #ln -snf "/usr" linux |
1057 |
- |
1058 |
- # Build interp.o with EXTRA_KLIBCAFLAGS (.S source) |
1059 |
- epatch "${FILESDIR}"/${PN}-1.4.11-interp-flags.patch |
1060 |
- |
1061 |
- # Fix usage of -s, bug #201006 |
1062 |
- epatch "${FILESDIR}"/klibc-1.5.7-strip-fix-dash-s.patch |
1063 |
- |
1064 |
- # The inline definition from sys/stat.h does not seem to get used |
1065 |
- # So just copy it to make this compile for now |
1066 |
- epatch "${FILESDIR}"/klibc-2.0.2-mkfifo.patch |
1067 |
-} |
1068 |
- |
1069 |
-# klibc has it's own ideas of arches |
1070 |
-# They reflect userspace strictly. |
1071 |
-# This functions maps from a Gentoo ARCH, to an arch that klibc expects |
1072 |
-# Look at klibc-${S}/usr/klibc/arch for a list of these arches |
1073 |
-klibc_arch() { |
1074 |
- a="${1:${ARCH}}" |
1075 |
- case ${a} in |
1076 |
- amd64) echo x86_64;; |
1077 |
- mips) die 'TODO: Use the $ABI' ;; |
1078 |
- x86) echo i386;; |
1079 |
- *) echo ${a} ;; |
1080 |
- esac |
1081 |
-} |
1082 |
- |
1083 |
-src_compile() { |
1084 |
- local myargs="all" |
1085 |
- local myARCH="${ARCH}" myABI="${ABI}" |
1086 |
- # TODO: For cross-compiling |
1087 |
- # You should set ARCH and ABI here |
1088 |
- CC="$(tc-getCC)" |
1089 |
- LD="$(tc-getLD)" |
1090 |
- HOSTCC="$(tc-getBUILD_CC)" |
1091 |
- HOSTLD="$(tc-getBUILD_LD)" |
1092 |
- KLIBCARCH="$(klibc_arch ${ARCH})" |
1093 |
- KLIBCASMARCH="$(kernel_asm_arch ${ARCH})" |
1094 |
- libdir="$(get_libdir)" |
1095 |
- # This should be the defconfig corresponding to your userspace! |
1096 |
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example. |
1097 |
- defconfig=$(kernel_defconfig ${ARCH}) |
1098 |
- unset ABI ARCH # Unset these, because they interfere |
1099 |
- unset KBUILD_OUTPUT # we are using a private copy |
1100 |
- |
1101 |
- cd "${KS}" |
1102 |
- emake ${defconfig} CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "No defconfig" |
1103 |
- if [[ "${KLIBCARCH/arm}" != "${KLIBCARCH}" ]] && \ |
1104 |
- [[ "${CHOST/eabi}" != "${CHOST}" ]]; then |
1105 |
- # The delete and insert are seperate statements |
1106 |
- # so that they are reliably used. |
1107 |
- sed -i \ |
1108 |
- -e '/CONFIG_AEABI/d' \ |
1109 |
- -e '1iCONFIG_AEABI=y' \ |
1110 |
- -e '/CONFIG_OABI_COMPAT/d' \ |
1111 |
- -e '1iCONFIG_OABI_COMPAT=y' \ |
1112 |
- "${KS}"/.config \ |
1113 |
- "${S}"/defconfig |
1114 |
- fi |
1115 |
- emake prepare CC="${CC}" HOSTCC="${HOSTCC}" ARCH="${KLIBCASMARCH}" || die "Failed to prepare kernel sources for header usage" |
1116 |
- |
1117 |
- cd "${S}" |
1118 |
- |
1119 |
- use debug && myargs="${myargs} V=1" |
1120 |
- use test && myargs="${myargs} test" |
1121 |
- append-ldflags -z noexecstack |
1122 |
- append-flags -nostdlib |
1123 |
- |
1124 |
- emake \ |
1125 |
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ |
1126 |
- EXTRA_KLIBCLDFLAGS="-z noexecstack" \ |
1127 |
- HOSTLDFLAGS="-z noexecstack" \ |
1128 |
- KLIBCOPTFLAGS='-nostdlib' \ |
1129 |
- HOSTCC="${HOSTCC}" CC="${CC}" \ |
1130 |
- HOSTLD="${HOSTLD}" LD="${LD}" \ |
1131 |
- INSTALLDIR="/usr/${libdir}/klibc" \ |
1132 |
- KLIBCARCH=${KLIBCARCH} \ |
1133 |
- KLIBCASMARCH=${KLIBCASMARCH} \ |
1134 |
- SHLIBDIR="/${libdir}" \ |
1135 |
- libdir="/usr/${libdir}" \ |
1136 |
- mandir="/usr/share/man" \ |
1137 |
- T="${T}" \ |
1138 |
- $(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \ |
1139 |
- $(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \ |
1140 |
- $(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \ |
1141 |
- ${myargs} || die "Compile failed!" |
1142 |
- |
1143 |
- #SHLIBDIR="/${libdir}" \ |
1144 |
- |
1145 |
- ARCH="${myARCH}" ABI="${myABI}" |
1146 |
-} |
1147 |
- |
1148 |
-src_install() { |
1149 |
- local myargs |
1150 |
- local myARCH="${ARCH}" myABI="${ABI}" |
1151 |
- # TODO: For cross-compiling |
1152 |
- # You should set ARCH and ABI here |
1153 |
- CC="$(tc-getCC)" |
1154 |
- HOSTCC="$(tc-getBUILD_CC)" |
1155 |
- KLIBCARCH="$(klibc_arch ${ARCH})" |
1156 |
- KLIBCASMARCH="$(kernel_asm_arch ${ARCH})" |
1157 |
- libdir="$(get_libdir)" |
1158 |
- # This should be the defconfig corresponding to your userspace! |
1159 |
- # NOT your kernel. PPC64-32ul would choose 'ppc' for example. |
1160 |
- defconfig=$(kernel_defconfig ${ARCH}) |
1161 |
- |
1162 |
- use debug && myargs="${myargs} V=1" |
1163 |
- |
1164 |
- local klibc_prefix |
1165 |
- if tc-is-cross-compiler ; then |
1166 |
- klibc_prefix=$("${S}/klcc/${KLIBCARCH}-klcc" -print-klibc-prefix) |
1167 |
- else |
1168 |
- klibc_prefix=$("${S}/klcc/klcc" -print-klibc-prefix) |
1169 |
- fi |
1170 |
- |
1171 |
- unset ABI ARCH # Unset these, because they interfere |
1172 |
- unset KBUILD_OUTPUT # we are using a private copy |
1173 |
- |
1174 |
- emake \ |
1175 |
- EXTRA_KLIBCAFLAGS="-Wa,--noexecstack" \ |
1176 |
- EXTRA_KLIBCLDFLAGS="-z noexecstack" \ |
1177 |
- HOSTLDFLAGS="-z noexecstack" \ |
1178 |
- KLIBCOPTFLAGS='-nostdlib' \ |
1179 |
- HOSTCC="${HOSTCC}" CC="${CC}" \ |
1180 |
- HOSTLD="${HOSTLD}" LD="${LD}" \ |
1181 |
- INSTALLDIR="/usr/${libdir}/klibc" \ |
1182 |
- INSTALLROOT="${D}" \ |
1183 |
- KLIBCARCH=${KLIBCARCH} \ |
1184 |
- KLIBCASMARCH=${KLIBCASMARCH} \ |
1185 |
- SHLIBDIR="/${libdir}" \ |
1186 |
- libdir="/usr/${libdir}" \ |
1187 |
- mandir="/usr/share/man" \ |
1188 |
- T="${T}" \ |
1189 |
- $(use custom-cflags || echo SKIP_)HOSTCFLAGS="${CFLAGS}" \ |
1190 |
- $(use custom-cflags || echo SKIP_)HOSTLDFLAGS="${LDFLAGS}" \ |
1191 |
- $(use custom-cflags || echo SKIP_)KLIBCOPTFLAGS="${CFLAGS}" \ |
1192 |
- ${myargs} \ |
1193 |
- install || die "Install failed!" |
1194 |
- |
1195 |
- #SHLIBDIR="/${libdir}" \ |
1196 |
- |
1197 |
- # klibc doesn't support prelinking, so we need to mask it |
1198 |
- cat > "${T}/70klibc" <<-EOF |
1199 |
- PRELINK_PATH_MASK="/usr/${libdir}/klibc" |
1200 |
- EOF |
1201 |
- |
1202 |
- doenvd "${T}"/70klibc |
1203 |
- |
1204 |
- # Fix the permissions (bug #178053) on /usr/${libdir}/klibc/include |
1205 |
- # Actually I have no idea, why the includes have those weird-ass permissions |
1206 |
- # on a particular system, might be due to inherited permissions from parent |
1207 |
- # directory |
1208 |
- find "${D}"/usr/${libdir}/klibc/include | xargs chmod o+rX |
1209 |
- find "${D}"/usr/${libdir}/klibc/include -type f \ |
1210 |
- \( -name '.install' -o -name '..install.cmd' \) -delete || die |
1211 |
- |
1212 |
- # Hardlinks becoming copies |
1213 |
- for x in gunzip zcat ; do |
1214 |
- rm -f "${D}/${klibc_prefix}/bin/${x}" |
1215 |
- dosym gzip "${klibc_prefix}/bin/${x}" |
1216 |
- done |
1217 |
- |
1218 |
- # Restore now, so we can use the tc- functions |
1219 |
- ARCH="${myARCH}" ABI="${myABI}" |
1220 |
- if ! tc-is-cross-compiler ; then |
1221 |
- cd "${S}" |
1222 |
- insinto /usr/share/aclocal |
1223 |
- doins contrib/klibc.m4 |
1224 |
- |
1225 |
- dodoc README usr/klibc/CAVEATS |
1226 |
- docinto gzip; dodoc usr/gzip/README |
1227 |
- fi |
1228 |
- |
1229 |
- # Fix up the symlink |
1230 |
- # Mainly for merged arches |
1231 |
- linkname="${D}/usr/${libdir}/klibc/include/asm" |
1232 |
- if [ -L "${linkname}" ] && [ ! -e "${linkname}" ] ; then |
1233 |
- ln -snf asm-${KLIBCASMARCH} "${linkname}" |
1234 |
- fi |
1235 |
-} |
1236 |
- |
1237 |
-src_test() { |
1238 |
- if ! tc-is-cross-compiler ; then |
1239 |
- cd "${S}"/usr/klibc/tests |
1240 |
- ALL_TESTS="$(ls *.c |sed 's,\.c$,,g')" |
1241 |
- BROKEN_TESTS="fcntl fnmatch testrand48" |
1242 |
- failed=0 |
1243 |
- for t in $ALL_TESTS ; do |
1244 |
- if has $t $BROKEN_TESTS ; then |
1245 |
- echo "=== $t SKIP" |
1246 |
- else |
1247 |
- echo -n "=== $t " |
1248 |
- ./$t </dev/null >/dev/null |
1249 |
- rc=$? |
1250 |
- if [ $rc -eq 0 ]; then |
1251 |
- echo PASS |
1252 |
- else |
1253 |
- echo FAIL |
1254 |
- failed=1 |
1255 |
- fi |
1256 |
- fi |
1257 |
- done |
1258 |
- [ $failed -ne 0 ] && die "Some tests failed." |
1259 |
- fi |
1260 |
-} |