2007-01-09 Laszlo (Laca) Peter <[email protected]>
authorlaca
Tue, 09 Jan 2007 19:49:14 +0000
changeset 8944 a63e00e81443
parent 8943 e888e99f531c
child 8945 50c5b53f68a7
2007-01-09 Laszlo (Laca) Peter <[email protected]> * patches/Python-02-pycc.diff: check if CC/CXX is set to this script to avoid an infinite loop. Use the PYCC_CC/PYCC_CXX as an alternative to CC/CXX.
ChangeLog
patches/Python-02-pycc.diff
--- a/ChangeLog	Tue Jan 09 17:42:22 2007 +0000
+++ b/ChangeLog	Tue Jan 09 19:49:14 2007 +0000
@@ -1,3 +1,9 @@
+2007-01-09  Laszlo (Laca) Peter  <[email protected]>
+
+	* patches/Python-02-pycc.diff: check if CC/CXX is set to this
+	  script to avoid an infinite loop.  Use the PYCC_CC/PYCC_CXX
+	  as an alternative to CC/CXX.
+
 2007-01-09  Damien Carbery <[email protected]>
 
 	* patches/control-center-04-add-wallpaper-dialog.diff,
--- a/patches/Python-02-pycc.diff	Tue Jan 09 17:42:22 2007 +0000
+++ b/patches/Python-02-pycc.diff	Tue Jan 09 19:49:14 2007 +0000
@@ -1,6 +1,6 @@
---- /dev/null	2006-08-24 06:34:26.000000000 -0700
-+++ Python-2.4.2-new/pycc	2006-08-24 06:37:41.077704000 -0700
-@@ -0,0 +1,156 @@
+--- /dev/null	2007-01-09 14:33:27.000000000 -0500
++++ Python-2.4.4-new/pycc	2007-01-09 14:34:30.248866916 -0500
+@@ -0,0 +1,172 @@
 +#!/bin/ksh
 +#
 +# Script for running the C/C++ compiler when building python modules
@@ -41,12 +41,19 @@
 +# name of the env variable for setting the compiler path
 +CVAR='CC'
 +
++if [ "x$PYCC_CC" != x ]; then
++    CC="$PYCC_CC"
++fi
++
 +if [ "x$MYNAME" = xpyCC ]; then
 +    CCEXE='CC'
 +    GCCEXE='g++'
 +    CLANG='C++'
 +    CC="$CXX"
 +    CVAR='CXX'
++    if [ "x$PYCC_CXX" != x ]; then
++        CC="$PYCC_CXX"
++    fi
 +fi
 +
 +SAVED_IFS="$IFS"
@@ -54,6 +61,15 @@
 +
 +# check if the CC env variable is set
 +if [ "x$CC" != x ]; then
++    # verify that it doesn't point to this script
++    if /usr/bin/cmp -s "$CC" $0; then
++        echo "WARNING: "$CVAR" is set to this script; ignoring this value to avoid an infinite loop"
++	CC=
++    fi
++fi
++
++# check again if the CC env variable is set
++if [ "x$CC" != x ]; then
 +    case "$CC" in
 +	/* )
 +	    # $CC is an absolute path name