Vladimir Bychkovsky wrote:
> > There is prior discussion of this problem in the archives, but
> > AFAIR we didn't yet find a solution that people liked.
>
> I'd appreciate it if you could send me a pointer to that discussion.
> My search was fruitless.
The usual approach to this situation (to the extent that cross
compilation is usual) is to set up two different compilers, CC for
cross compiling and CC_FOR_BUILD for native compilation. Then the
makefiles have to be adjusted to use the right one as the case may be.
Earlier, an argument against that arrangement was made on the grounds
that we can't know whether CC and CC_FOR_BUILD are similar enough to
support the same set of flags, but I say that this is a reasonable
assumption to make.
It could be instructive to look at some other packages where some setup
like this was necessary. A long time ago, Kaffe was one such instance
but I don't know what they do today.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/