Re: macports and brew postgresql --universal builds - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: macports and brew postgresql --universal builds
Date
Msg-id 502AC96B.9000505@gmx.net
Whole thread Raw
In response to Re: macports and brew postgresql --universal builds  (Doug Coleman <doug.coleman@gmail.com>)
List pgsql-hackers
On 8/10/12 7:12 PM, Doug Coleman wrote:
> What it looks like is the first line of each section is pattern matching.
>
> If __LP64__ is defined, then it's a 64-bit architecture, and we want
> to use the top part of the if statement. The #defines they target seem
> to be all of the ones that are different on 32bit platforms.
>
> I agree that you would want to do this in the configure script somehow.

That's not going to work.  The configure script can only test one target 
at a time.  You can probably get away with it on many simple programs, 
but when a configure script checks size and alignment of types, the 
whole concept of universal builds is at odds with the approach Autoconf 
takes.  OK, so you get away with it by patching up a few sites, but 
you're effectively overriding the configure checks with hardcoded results.

I think the only sane approach in general is to build the entire project 
twice and merge the resulting binaries together.



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: -Wformat-zero-length
Next
From: Tom Lane
Date:
Subject: Re: -Wformat-zero-length