Re: Universal libpq.a ?
От | Tom Lane |
---|---|
Тема | Re: Universal libpq.a ? |
Дата | |
Msg-id | 11303.1202174681@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Universal libpq.a ? ("Dave Page" <dpage@postgresql.org>) |
Ответы |
Re: Universal libpq.a ?
Re: Universal libpq.a ? |
Список | pgsql-general |
"Dave Page" <dpage@postgresql.org> writes: > On Feb 4, 2008 6:25 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: >> "Dave Page" <dpage@postgresql.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 ... regards, tom lane
В списке pgsql-general по дате отправления: