This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

crosstools: Using CC


Hi,

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 demo-x86_64.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 crosstools.sh 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.  

Thanks,
Neal

diff -upr crosstool-0.28-rc37.orig/crosstool.sh crosstool-0.28-rc37/crosstool.sh
--- crosstool-0.28-rc37.orig/crosstool.sh	2004-09-30 11:44:05.000000000 +0100
+++ crosstool-0.28-rc37/crosstool.sh	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
 
-    BUILD_CC=gcc CFLAGS="$TARGET_CFLAGS $EXTRA_TARGET_CFLAGS" CC="${TARGET}-gcc $GLIBC_EXTRA_CC_ARGS" \
+    BUILD_CC=${CC:-gcc} CFLAGS="$TARGET_CFLAGS $EXTRA_TARGET_CFLAGS" CC="${TARGET}-gcc $GLIBC_EXTRA_CC_ARGS" \
     AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \
         ${GLIBC_DIR}/configure --prefix=/usr \
 	--build=$BUILD --host=$TARGET \


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]