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]

Re: extend crosstool.sh to allow gcc4 as native compiler?



Well, that was quick. I figured I could set a gcc in my PATH which did nothing but exit 1 - however 2.6 kernels use HOSTCC instead of CC, which is hardcoded to using gcc. The question is whether we really want everything to circumvent the default gcc. I think this might get really ugly really fast. But nevertheless:


<    yes "" | make ARCH=$ARCH oldconfig
===
yes "" | make ARCH=$ARCH oldconfig HOSTCC=${CC:-gcc}

With this change, the kernel headers proceed just fine. Binutils built fine, glibc headers survived. Doing gcc-CORE now.



With the attached patch, I was able to use crosstool without referencing gcc.


I have (correction: crosstool has) built the following combo's (am trying a linux-2.4 right now):

sparc64-unknown-linux-gnu/gcc-3.4.3-glibc-2.3.4
x86_64-unknown-linux-gnu/gcc-3.4.3-glibc-2.3.4

crosstool@golem:~/temp/crosstool-0.30$ gcc --version
===== OUCH =====
/home/golem/crosstool/temp/bin/gcc --version
crosstool@golem:~/temp/crosstool-0.30$ echo $CC
/home/golem/crosstool/tools/bin/gcc
crosstool@golem:~/temp/crosstool-0.30$ $CC --version
gcc (GCC) 3.3.5
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


I'm not sure what good purpose the patch serves, considering that crosstool already could (did) use $CC as its compiler for the host's binaries. There is a reason why the kernel (for example) insists on using gcc instead of $CC. But for the curious, this patch allows crosstool to rely on $CC entirely. Arguably, this can do more harm than good. But heck, I just felt like playing with it. :)


Arno


np: Spock's Beard - Lay It Down

Attachment: crosstool-useCC.diff
Description: Binary data

------
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]