extend crosstool.sh to allow gcc4 as native compiler?
Arno Schuring
aelschuring@hotmail.com
Sat Apr 2 14:01:00 GMT 2005
>
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crosstool-useCC.diff
Type: application/octet-stream
Size: 1315 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/crossgcc/attachments/20050402/3aef0dfd/attachment.obj>
-------------- next part --------------
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list