1 |
В Птн, 13/05/2011 в 21:13 +0000, Jory Pratt (anarchy) пишет: |
2 |
> plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/nspr/ChangeLog?rev=1.161&content-type=text/plain |
3 |
|
4 |
> src_configure() { |
5 |
> cd "${S}"/build |
6 |
> |
7 |
> echo > "${T}"/test.c |
8 |
> $(tc-getCC) -c "${T}"/test.c -o "${T}"/test.o |
9 |
> case $(scanelf -BF'%M' "${T}"/test.o)$(scanmacho -BF'%M' "${T}"/test.o) in |
10 |
> ELFCLASS64*|POWERPC64*|X86_64*) myconf="${myconf} --enable-64bit";; |
11 |
> ELFCLASS32*|POWERPC*|I386*|ARM*) ;; |
12 |
> *) die "Failed to detect whether your arch is 64bits or 32bits, disable distcc if you're using it, please";; |
13 |
> esac |
14 |
|
15 |
Why do you need such complex detection? Also in nss ebuild I see |
16 |
different detection: |
17 |
|
18 |
> Index: nss-3.12.10.ebuild |
19 |
[snip] |
20 |
> src_compile() { |
21 |
> strip-flags |
22 |
> |
23 |
> echo > "${T}"/test.c |
24 |
> $(tc-getCC) ${CFLAGS} -c "${T}"/test.c -o "${T}"/test.o |
25 |
> case $(file "${T}"/test.o) in |
26 |
> *64-bit*|*ppc64*|*x86_64*) export USE_64=1;; |
27 |
> *32-bit*|*ppc*|*i386*) ;; |
28 |
> *) die "Failed to detect whether your arch is 64bits or 32bits, |
29 |
disable distcc if you're using it, please";; |
30 |
> esac |
31 |
|
32 |
It looks like good idea to unify them. |
33 |
|
34 |
-- |
35 |
Peter. |