This is the mail archive of the crossgcc@sourceware.org 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: [OT] making software easily cross-compilable


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


>   CC = gcc
>   LD = ld
>   STRIP = strip
> 
> and so on, so one can override the variables with the corresponding
> cross-compile values.

  That is basically a de-facto standard.

>   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.
 
>   what approach do people here use?  

  Autotools

> that is, if i don't want to get
> into major pain with autotools and so on, is there a preferred way to
> make your software easily cross-compilable?  

  Autotools

> is there a *standard* way to do it?  thanks.

  Autotools.  Sorry!  You can and should still usefully use CC/LD macro names
in your makefiles, but cross-compiliation and portabililty in general are much
broader issues than just finding the correct compiler and assembler; different
systems have different system calls, different libraries, place function
definitions in different headers or have non-compatible arguments or semantics
for the same named functions; autotools handles all this for you in addition
to toolchain selection!

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]