Re: [PATCH] Make m68k cross compile like every other architecture.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Rob Landley
Date: Thursday, October 18, 2007 - 11:38 pm

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.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Make m68k cross compile like every other archi ..., Geert Uytterhoeven, (Thu Oct 11, 12:25 am)
Re: [PATCH] Make m68k cross compile like every other archi ..., Geert Uytterhoeven, (Thu Oct 11, 5:46 am)
Re: [PATCH] Make m68k cross compile like every other archi ..., Geert Uytterhoeven, (Thu Oct 11, 8:12 am)
Re: [PATCH] Make m68k cross compile like every other archi ..., Geert Uytterhoeven, (Thu Oct 11, 11:51 pm)
Re: [PATCH] Make m68k cross compile like every other archi ..., Geert Uytterhoeven, (Fri Oct 12, 1:51 am)
Re: [PATCH] Make m68k cross compile like every other archi ..., Geert Uytterhoeven, (Mon Oct 15, 1:25 pm)
Re: [PATCH] Make m68k cross compile like every other archi ..., Rob Landley, (Thu Oct 18, 11:38 pm)