Israel Brewster <israel@frontierflying.com> writes:
> Well, I'm not trying to use the server or client programs from this
> build - I just want the universal libraries for my programs. My point
> in this last section, however, doesn't necessarily extend as far as
> actual function, but rather is just with the build. MySQL and SQLite
> build for multiple architectures quite happily, Postgres doesn't build
> at all except for single architectures (the way I am trying at least).
Well, it's been done. Searching the PG archives for prior discussions
I find
http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php
which describes success with multiple -arch flags in CFLAGS plus
hand creation of relevant .h files. The first few steps in the
older recipe here
http://archives.postgresql.org/pgsql-general/2008-02/msg00200.php
show a reasonably plausible way to mechanically generate the required
.h files, although I wonder whether it's right in detail --- over here
http://archives.postgresql.org/pgsql-hackers/2008-07/msg00898.php
I had found out that you also need --host if you want to fool configure
into generating .h files for a different architecture. On the whole
I'd still recommend building the reference .h files on the actual target
arch rather than trusting cross-compile to create them correctly.
regards, tom lane