crosstools: Using CC

Neal H. Walfield
Sun Oct 17 12:21:00 GMT 2004


I tried to use crosstools to generate a tool chain for x86_64 using
gcc-3.3 (not gcc) by running:

	CC=gcc-3.3 sh

On my Debian installation, gcc is version 2.95.  There are packages
available to use later gccs and these are installed as gcc-VERSION.

The above failed because there are two places in that
ignore CC and use gcc.  Once I corrected these, it worked fine.  I
haven't throughly read the source code to know if this is the correct
general fix, however, it does work for me.  


diff -upr crosstool-0.28-rc37.orig/ crosstool-0.28-rc37/
--- crosstool-0.28-rc37.orig/	2004-09-30 11:44:05.000000000 +0100
+++ crosstool-0.28-rc37/	2004-10-15 12:16:34.000000000 +0100
@@ -266,7 +266,7 @@ if grep -q gcc-3 ${GCC_DIR}/ChangeLog &&
 	# Override libc_cv_ppc_machine so glibc-cvs doesn't complain
 	# 'a version of binutils that supports .machine "altivec" is needed'.
 	libc_cv_ppc_machine=yes \
-        CC=gcc \
+        CC=${CC:-gcc} \
             ${GLIBC_DIR}/configure --prefix=/usr \
 	    --build=$BUILD --host=$TARGET \
             --without-cvs --disable-sanity-checks --with-headers=$HEADERDIR \
@@ -357,7 +357,7 @@ if test '!' -f Makefile; then
     # Set BUILD_CC, or you won't be able to build datafiles
     # Set --build, else glibc-2.3.2 will think you're not cross-compiling, and try to run the test programs
     AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \
         ${GLIBC_DIR}/configure --prefix=/usr \
 	--build=$BUILD --host=$TARGET \

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list