On Thursday 18 October 2007 4:14:20 pm Sam Ravnborg wrote:
Searching for common cross compiler prefixes. Cool.
What do you do if you want to use gcc as your host compiler, but m68k-pcc or
arm-tcc as your target compiler? (I have no idea, CROSS_COMPILE=m68k- CC=pcc
HOSTCC=gcc perhaps? Where does CC get set right now, anyway... Ah, top
level Makefile:
CC = $(CROSS_COMPILE)gcc
That... should work. Odd and roundabout, but ok...
Other query:
If CROSS_COMPILE isn't set, and we iterate through all the standard prefixes
but don't find a compiler, what's the right "fall off the end" behavior? If
it falls back to using the host gcc, presumably the build will break if you
feed your host gcc target flags it doesn't understand, but there are
platforms where that sometimes doesn't seem to happen until the very end
(building x86_64 on x86 for example)... Should the build just die with
a "You are cross compiling, set CROSS_COMPILE".
I suppose there's the weird corner case where your hostcc is tcc and your
targetcc is gcc...
Rob
--
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
-