Re: Getting to universal binaries for Darwin - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Getting to universal binaries for Darwin
Date
Msg-id 25145.1216532179@sss.pgh.pa.us
Whole thread Raw
In response to Re: Getting to universal binaries for Darwin  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Getting to universal binaries for Darwin  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Postgres-R: primary key patches
Next
From: Bruce Momjian
Date:
Subject: Re: .psqlrc output for \pset commands