[OT] making software easily cross-compilable

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


  (not crosstool-related, but i figure this is the best place to find
the appropriate expertise.)

  every so often, i come across some software that i would like to
cross compile with my toolchain, but that software is *so* not
designed for cross-compilation.

  while much of it will, conveniently, have a Makefile to direct the
build process, in the extreme case, that Makefile will literally
hardcode references to the tools, like "gcc", "ld" and so on.  grrrrrr
....

  slightly more conveniently, the Makefile might at least do something
like

  CC = gcc
  LD = ld
  STRIP = strip

and so on, so one can override the variables with the corresponding
cross-compile values.

  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.

  what approach do people here use?  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?  is there a *standard* way
to do it?  thanks.

rday

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



More information about the crossgcc mailing list