[OT] making software easily cross-compilable

Robert P. J. Day rpjday@mindspring.com
Fri Apr 28 16:23:00 GMT 2006


On Fri, 28 Apr 2006, Dave Korn wrote:

> On 28 April 2006 12:08, Robert P. J. Day wrote:

> >   even more generally, the build process might need access to
> > *both* the cross-compile tools and the native tools (like the
> > linux kernel does), so you might see:
> >
> >   CC := ${CROSS_COMPILE}cc
> >   LD := ${CROSS_COMPILE}ld
> >
> > and another set for the native tools:
> >
> >   HOSTCC = gcc
> >   HOSTLD = ld
> >
> > etc.
>
>   In GNU terms, these would be CC/LD and
> CC_FOR_TARGET/LD_FOR_TARGET.

really?  i already knew that was another approach but it seems far
more cumbersome.  it seems so much more straightforward to use the
*generic* variables (CC, LD, ...) for *whatever* target you're
building for, and have to *override* with HOSTCC, HOSTLD just in case
you need to some native building.

doing it that way would certainly allow existing makefiles to be
quickly cross-compilable.  i certainly wouldn't want to have to write
new makefiles loaded with "_FOR_TARGET" suffixes everywhere.  barf.

rday

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list