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

From Adriaan van Os
Subject Re: Getting to universal binaries for Darwin
Date
Msg-id 4881D175.80109@microbizz.nl
Whole thread Raw
In response to Getting to universal binaries for Darwin  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Getting to universal binaries for Darwin  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> The bad news is that if you only do that, only the arch that you
> actually build on will work.  We have configure set up to insert
> various hardware-dependent definitions into pg_config.h and
> ecpg_config.h, and if you don't have the right values visible for
> each compilation, the resulting executables will fail.
> 
> You can get around that by hacking up the generated config files
> with #ifdef __i386__ and so on to expose the correct values of
> the hardware-dependent symbols to each build.  Of course you have
> to know what the correct values are --- if you don't have a sample
> of each architecture handy to run configure against, it'd be easy
> to miss some things.  And even then it's pretty tedious.  I am
> not sure if it is possible or worth the trouble to try to automate
> this part better.

It may be less pain to simply config and build for ppc and i386 in separate build directories and 
then glue the resulting binaries together with lipo 
<http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/lipo.1.html> to make them 
"universal".

Regards,

Adriaan van Os



pgsql-hackers by date:

Previous
From: Jan Urbański
Date:
Subject: gsoc, oprrest function for text search
Next
From: Jan Urbański
Date:
Subject: Re: gsoc, oprrest function for text search