Saturday, July 19, 2008

Re: [HACKERS] Getting to universal binaries for Darwin

Peter Eisentraut <peter_e@gmx.net> writes:
> I'd imagine a related problem are the run tests in configure. They will
> produce results for the platform that you run configure on. More properly,
> you should run configure in cross-compilation mode (twice, and then merge the
> output, as previously described), but I am not sure how that will turn out
> when configure attempts to determine alignment and endianness with
> compilation-only tests.

For the record, I got plausible-looking configure output from tests like

CFLAGS="-arch ppc64" ./configure --host=powerpc64-apple-darwin9.4.0

Whether it'd actually work I dunno, but it looked plausible. Two notes:

* You have to use both parts of the recipe: without --host, configure
doesn't think it's cross-compiling, and without CFLAGS, gcc doesn't ;-)

* This disables AC_TRY_RUN tests, of course. The only adverse
consequence I noticed was failure to recognize that
-Wl,-dead_strip_dylibs is applicable, which is marginally annoying but
hardly fatal.

On the whole I still wouldn't trust cross-compiled configure results.
Better to get your prototype pg_config.h from the real deal.

regards, tom lane

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

No comments: