From: | "Mike Frysinger (vapier)" <vapier@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in sys-process/lsof/files: lsof-4.85-cross.patch |
Date: | Wed, 22 Aug 2012 04:03:44 |
Message-Id: | 20120822040333.F33A7202D7@flycatcher.gentoo.org |
1 | vapier 12/08/22 04:03:33 |
2 | |
3 | Added: lsof-4.85-cross.patch |
4 | Log: |
5 | Fix cross-compiling by avoiding executing compiled configure tests #432120 by Dennis Schridde. |
6 | |
7 | (Portage version: 2.2.0_alpha120/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.1 sys-process/lsof/files/lsof-4.85-cross.patch |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/lsof/files/lsof-4.85-cross.patch?rev=1.1&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-process/lsof/files/lsof-4.85-cross.patch?rev=1.1&content-type=text/plain |
14 | |
15 | Index: lsof-4.85-cross.patch |
16 | =================================================================== |
17 | let the preprocessor work its magic rather than executing the code |
18 | |
19 | https://bugs.gentoo.org/432120 |
20 | |
21 | --- a/Configure |
22 | +++ b/Configure |
23 | @@ -2730,20 +2730,17 @@ LOCKF_OWNER4 |
24 | rm -f ${LSOF_TMPC}.* |
25 | cat > $LSOF_TMPC.c << .LSOF_END_HERE_DOC1 |
26 | #include <features.h> |
27 | -main() { |
28 | +#undef XXX |
29 | #if defined(__GLIBC__) && defined(__GLIBC_MINOR__) |
30 | -printf("-DGLIBCV=%d\n",__GLIBC__*100+__GLIBC_MINOR__); |
31 | +XXX: __GLIBC__ * 100 + __GLIBC_MINOR__ |
32 | #elif defined(__GLIBC__) |
33 | -printf("-DGLIBCV=%d00\n",__GLIBC__); |
34 | -#else |
35 | -printf("\n"); |
36 | +XXX: __GLIBC__ * 100 |
37 | #endif |
38 | -return(0); } |
39 | .LSOF_END_HERE_DOC1 |
40 | - $LINUX_CONF_CC ${LSOF_TMPC}.c -I$LSOF_INCLUDE -o ${LSOF_TMPC}.x > /dev/null 2>&1 |
41 | + $LINUX_CONF_CC ${LSOF_TMPC}.c -E -I$LSOF_INCLUDE 2>/dev/null | sed -n '/^XXX:/s|.*:||p' > ${LSOF_TMPC}.x |
42 | - if test -x ${LSOF_TMPC}.x # { |
43 | + if test -s ${LSOF_TMPC}.x # { |
44 | then |
45 | - LINUX_CLIB=`${LSOF_TMPC}.x` |
46 | + LINUX_CLIB="-DGLIBCV=$(( `cat ${LSOF_TMPC}.x` ))" |
47 | LSOF_TMP=$? |
48 | else |
49 | LINUX_CLIB="" |