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

From Florian G. Pflug
Subject Re: Getting to universal binaries for Darwin
Date
Msg-id 48821D92.4090903@phlo.org
Whole thread Raw
In response to Getting to universal binaries for Darwin  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> 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.

Hm - configure *does* the right thing if CFLAGS is set to *just* "-arch 
i386" or "-arch ppc" (at least on intel hardware, because OSX can run 
ppc binaries there, but not vice versa), right? If this is true, we need
some way to run configure multiple times, once for each arch, but then 
still get *one* set of Makefiles that have all the archs in their CFLAGS..

> Modulo the above problems, I was able to build i386+ppc binaries that
> do in fact work on both architectures.  I haven't got any 64-bit Apple
> machines to play with, so there might be 64-bit issues I missed.
> Still, this is a huge step forward compared to what was discussed here:
> http://archives.postgresql.org/pgsql-general/2008-02/msg00200.php
I think that my MacBook should be able to build and run 64-bit binaries, 
so I can test that if you want. Do you have a script that does the 
necessary config file magic, or did you do that by hand?

regards, Florian Pflug


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Getting to universal binaries for Darwin
Next
From: Peter Eisentraut
Date:
Subject: Re: .psqlrc output for \pset commands