From: | Larry Rosenman <ler(at)lerctr(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Dave Page <dpage(at)postgresql(dot)org>, Jerry LeVan <jerry(dot)levan(at)eku(dot)edu>, pgsql general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Universal libpq.a ? |
Date: | 2008-02-05 15:03:21 |
Message-ID: | 20080205090137.H85062@thebighonker.lerctr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 4 Feb 2008, Tom Lane wrote:
> "Dave Page" <dpage(at)postgresql(dot)org> writes:
>> On Feb 4, 2008 6:25 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> "Dave Page" <dpage(at)postgresql(dot)org> writes:
>>>> The Mac build of EDB Postgres is universal throughout,
>>>
>>> Yeah? How painful is it? We've had more than one request to enable
>>> universal builds.
>
>> There was fair bit of pain getting it to work, but the resulting
>> script isn't overly complex. Note this is based on work by the guys at
>> entropy.ch. Ignore the target directory fudging...
>
> Hmm. The multiple versions of pg_config.h don't bother me --- the RPM
> distributions have to do something very similar to support multilib
> Linux platforms. This bit seems pretty brute-force though:
>
>> # Fixup the makefiles
>> echo "Post-processing Makefiles for Universal Binary build"
>> find . -name Makefile -print -exec perl -p -i.backup -e 's/\Q$(LD)
>> $(LDREL) $(LDOUT)\E (\S+) (.+)/\$(LD) -arch ppc \$(LDREL) \$(LDOUT)
>> $1.ppc $2; \$(LD) -arch i386 \$(LDREL) \$(LDOUT) $1.i386 $2; lipo
>> -create -output $1 $1.ppc $1.i386/' {} \; || _die "Failed to
>> post-process the Postgres Makefiles for Universal build"
>
> I thought I'd read that you could solve this problem by using the gcc
> frontend to invoke loading, ie something involving making $(LD) call gcc
> with some options. I'd be willing to tweak the LDxxx macros a bit if
> needed to enable a solution like that, but changing the Makefiles at
> build time is clearly right out ...
When I was playing with this last week, the problem is that the gcc front end
when passing -Wl,-r still includes other things to make the relocatable SUBSYS.o's.
So, when we try to link, we get duplicate symbols.
I gave up, and just built it twice, and then lipo'd the 2 bin and lib directory
files together as a quick hack.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 512-248-2683 E-Mail: ler(at)lerctr(dot)org
US Mail: 430 Valona Loop, Round Rock, TX 78681-3893
From | Date | Subject | |
---|---|---|---|
Next Message | Larry Rosenman | 2008-02-05 15:07:04 | Re: Universal libpq.a ? |
Previous Message | dawmette | 2008-02-05 14:56:29 | Is my db dead ? |