From: | Doug Coleman <doug(dot)coleman(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: macports and brew postgresql --universal builds |
Date: | 2012-08-10 23:12:08 |
Message-ID: | CAEb+CXV-0ZEEd5gUcY59uAYZXtF6HL3VRTU3irgNJHJzp7RXbg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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.
Doug
On Fri, Aug 10, 2012 at 3:44 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Doug Coleman <doug(dot)coleman(at)gmail(dot)com> writes:
>> The MacPorts Project (http://www.macports.org/) supports building
>> universal binaries (32/64bit binaries in one file) for most projects.
>> For PostgreSQL, they apply two patches after the configure script to
>> correct some of the typedefs. Otherwise, the build fails in compiling
>> a switch statement with duplicate cases.
>
>> The HomeBrew Project (http://mxcl.github.com/homebrew/) is a worthy
>> successor to MacPorts, but they don't yet support a --universal
>> argument for building PostgreSQL. There is currently a pull request on
>> github to add universal support, but it's based on the patches from
>> the MacPorts project.
>
> The files you link to don't make much sense to me (they do not look
> like patch diffs) but they seem to suggest hard-wiring configure results
> into the source code, which does not sound like an acceptable solution
> from our standpoint.
>
> The approach we've suggested to people in the past is running configure
> for each architecture and then building against that copy of
> pg_config.h, or more likely combining the .h files with arch-specific
> #ifdefs. You can find more info in our list archives --- the most
> relevant thread I could find easily starts here:
> http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php
>
> regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-08-10 23:15:00 | Re: bug of pg_trgm? |
Previous Message | Daniel Farina | 2012-08-10 22:58:31 | Re: macports and brew postgresql --universal builds |