Re: ORBit 0.5.8 Cross-Compile problems...



dahaverk@rockwellcollins.com wrote:
> When I cross compiled ORBit1 (now ORBit2) to LynxOS/PowerPC it was very
> usefull to see how the PPC side configured things.  I did have the thought
> that it would be very usefull to have the configure tools recognize that
> you are doing a cross compile say to PPC and have it set up default "sizes"
> etc based on known PPC settings.   But, I haven't had time to work on doing
> anything like that.  Right now the "-target" definitions don't seem to do a
> very good job setting things up.
> 
> i.e.   configure  --target=ppc-*-*
>                                               ^^^^^^--- Standard triplet
> machine definition.
> 
> Anyone else have some thoughts on how to make the cross-compile less
> painfull?

For now, the standard techniques are
1. reduce or eliminate all use of AC_TRY_RUN, which simply 
can't work in all cross-development environments.   Autoconf2.5x
makes much less use of AC_TRY_RUN internally, thank goodness.
Many's the time I've tried to install a package, run into
flagrant use of AC_TRY_RUN, and gotten out my voodoo doll
to poke pins into the head of whoever wrote the configure.in
that used AC_TRY_RUN.

2. Make sure all autoconf tests in your configure.in can be overridden by
environment variables.  (That's what Dimi's patch will do for glib 2.)

3. use environment variables to override autoconf tests that 
rely on AC_TRY_RUN.  Cross-development environments can come
with environment variable settings for the standard
autoconf tests, and you can develop your own
for nonstandard tests needed by particular packages.

4. Some people with favorable envirnments have modified AC_TRY_RUN 
to actually run code on the target; that's great if you can do it.
IMHO this change ought to be incorporated into stock autoconf,
as it makes technique #3 much easier.

I don't know how wise it is to read much into the --target 
option; much of what you can get by doing so can already be
guessed by clever use of AC_TRY_COMPILE (cf. the new endian
macros in autoconf 2.5x), and the names aren't sufficiently
standardized to be universally usable.

- Dan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]