libpq.a in a universal binary

From: edwinoneel(at)acm(dot)org
To: Ted Petrosky <tpetrosky(at)agencysacks(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: libpq.a in a universal binary
Date: 2006-12-13 07:36:44
Message-ID: 17791.44428.552754.710365@gargle.gargle.HOWL
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

The short summary that I use for .a files is:

Build on PPC
Build on Intel

On either run

lipo -create lib/libpq.a ../ppc/lib/libpq.a ../intel/lib/libpq.a

Before a

file libpq.a

shows

libpq.a: current ar archive

After lipo it shows:

libpq.a: Mach-O fat file with 2 architectures
libpq.a (for architecture ppc): current ar archive
libpq.a (for architecture i386): current ar archive random library

There is a nice Apple tech note on this

http://developer.apple.com/technotes/tn2005/tn2137.html

that talks about Universal Binaries.

It's possible that you might be able to do this all in one go since
the Apple compiler can support generating both intel and ppc output in
the same fat file. But, if you can't, then the above technique works
just fine.

cheers

bruce

Ted Petrosky writes:
> I am trying to create the libpq.a as a universal binary (both ppc and
> intel macs). Does anyone have any information on this process?
>
> Thanks,
>
> Ted
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster

--
If brute force doesn't work, you're not using enough of it.

Bruce O'Neel phone: +41 22 379 21 57
INTEGRAL Science Data Centre +41 22 379 21 00 (switchb.)
Chemin d'Ecogia 16 fax: +41 22 379 21 35
CH-1290 VERSOIX e-mail: Bruce(dot)Oneel(at)obs(dot)unige(dot)ch
Switzerland WWW: http://isdc.unige.ch/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Albe Laurenz 2006-12-13 07:47:45 Re: psql commandline conninfo
Previous Message Andrew - Supernews 2006-12-13 06:47:13 Re: Better management of mergejoinable operators