Re: libpq.a in a universal binary

From: Dave Page <dpage(at)postgresql(dot)org>
To: Shane Ambler <pgsql(at)007marketing(dot)com>
Cc: Ted Petrosky <tpetrosky(at)agencysacks(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: libpq.a in a universal binary
Date: 2006-12-14 16:49:22
Message-ID: 45818092.60606@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Shane Ambler wrote:
>
>>> # make distclean
>>> # CFLAGS="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch
>>> i386" LDFLAGS="-Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk -arch ppc
>>> -arch i386" ./configure --with-openssl --prefix=/usr/local
>>> # make all
>
> After reading the Apple tech doc on this
> http://developer.apple.com/technotes/tn2005/tn2137.html
> I am wondering if we can add Mac universal binary support to the TODO list.
>
> I haven't tested this yet but from what I gather adding the
> --disable-dependency-tracking option to configure will allow the option
> of setting the CFLAGS and LDFLAGS with "-arch ppc -arch i386" and
> getting the universal binary build.

The PostgreSQL build doesn't use the dependency tracking (at least not
by default) so that's not an issue. pgAdmin does on the other hand, and
the build will fail loudly if you don't disable tracking when you configure.

> Another possibility (the better option) would be to add an option to
> build universal binaries - such as --host=mac_universal or would that be
> --host=darwin_universal - to automate the CFLAGS and LDFLAGS settings.
> Adding --with-isysroot= should be added to support non-standard and
> future SDK setups as well.

In pgAdmin we figure out what to build for based on the wxWidgets
installation. In PostgreSQL's case, I would imagine we'd need to list
the architectures to include in the build per the example above however
it was automated (you might want ppc and ppc64 but not intel for example).

FWIW, from memory the PostgreSQL build fails at the point at which it
links all the SUBSYS.o's.

Regards, Dave

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2006-12-14 17:00:00 Re: Operator class group proposal
Previous Message Tom Lane 2006-12-14 16:41:15 Re: EXPLAIN ANALYZE on 8.2