I have opened 
http://sourceforge.net/tracker/?func=detail&aid=3427243&group_id=17203&atid=317203
with an alternative patch for solving the system compiler change on SL under 
Xcode 4.2. The patch
uses...

diff -uNr fink-0.31.3/compiler_wrapper.in fink-0.31.3.new/compiler_wrapper.in
--- fink-0.31.3/compiler_wrapper.in     2010-01-09 18:47:01.000000000 -0500
+++ fink-0.31.3.new/compiler_wrapper.in 2011-10-22 11:43:14.000000000 -0400
@@ -11,6 +11,19 @@
 done
 IFS="$save_IFS"
 export PATH="$newpath"
+# use Apple gcc-4.2 compilers on SL
+case `uname -r` in
+10.*)
+        case $compiler in
+        cc|gcc)
+                compiler="gcc-4.2"
+                ;;
+        c++|g++)
+                compiler="g++-4.2"
+                ;;
+        esac
+        ;;
+esac
 exec $compiler -arch @ARCHITECTURE@ "$@"
 # strip path-prefix to avoid finding this wrapper again
 # @PREFIX@/bin is needed to pick up ccache-default
diff -uNr fink-0.31.3/perlmod/Fink/PkgVersion.pm 
fink-0.31.3.new/perlmod/Fink/PkgVersion.pm
--- fink-0.31.3/perlmod/Fink/PkgVersion.pm      2011-09-12 10:22:37.000000000 
-0400
+++ fink-0.31.3.new/perlmod/Fink/PkgVersion.pm  2011-10-22 11:04:44.000000000 
-0400
@@ -4953,6 +4953,19 @@
 done
 IFS="\$save_IFS"
 export PATH="\$newpath"
+# use Apple gcc-4.2 compilers on SL
+case `uname -r` in
+10.*)
+        case \$compiler in
+        cc|gcc)
+                compiler="gcc-4.2"
+                ;;
+        c++|g++)
+                compiler="g++-4.2"
+                ;;
+        esac
+        ;;
+esac
 exec \$compiler "-arch" "$arch" "\$@"
 EOF
                close GPP;

to insure under SL that cc/gcc and c++/g++ always resolve to gcc-4.2 and 
g++-4.2. This change has
to exist in both perlmod/Fink/PkgVersion.pm as well as compiler_wrapper.in 
because setup.sh uses
the later to replace the copy first installed by PkgVersion.pm during the 
bootstrap. Tested on
x86_64 10.6 fink against Xcode 4.2 with the llvm-gcc incompatible builds of 
gmp5 and gcc46.
     Once we fix this issue in fink, we also ought to start recommending Xcode 
4.0 users update
to Xcode 4.2. There are a number of Xcode 4.0 bugs fixed in 4.2 including the 
i386 ocaml build
problem.
        Jack
ps Benchmarking shows that the additional code in the compiler_wrapper only 
adds 1 msec to the
execution time and that using 'uname -r' is twice as fast as using sw_vers to 
check the OS release.


------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Fink-devel mailing list
Fink-devel@lists.sourceforge.net
List archive:
http://news.gmane.org/gmane.os.apple.fink.devel
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-devel

Reply via email to