Обсуждение: Creating Universal OSX binaries

Поиск
Список
Период
Сортировка

Creating Universal OSX binaries

От
Bruce Momjian
Дата:
Do we know this trick for creating Universal (four-architecture)
binaries for OSX?
http://r0ml.net/blog/2008/06/19/universal-postgres

---------------------------------------------------------------------------

It turns out that nobody seems to know how to build a Universal version
of PostgreSQL for OSX. This turned into a problem for me when I was
trying to build a version of PHP with support for postgres — I
needed Universal (four-architecture) libraries.

The following seems to work (I’m running an Intel Leopard):

1) I have the following variables set in my .bashrc --- I build
everything Universal. If you don’t have these variables set, you
should set them now.

export CCFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64 -pipe'
export CFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64 -pipe
-no-cpp-precomp'
export CXXFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64 -pipe'
export LDFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64
-bind_at_load'

2) ./configure --with-the-options-of-your-choice

3) LD=gcc AR=libtool AROPT='-static -o' LDREL='$(LDFLAGS) -nostartfiles
-r' make -e

4) sudo make install

Step 3 was the tricky bit ;) 

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: Creating Universal OSX binaries

От
Tom Lane
Дата:
Bruce Momjian <bruce@momjian.us> writes:
> Do we know this trick for creating Universal (four-architecture)
> binaries for OSX?

This seems largely irrelevant to CVS HEAD:
http://archives.postgresql.org/pgsql-hackers/2008-07/msg00884.php

The proposed trick doesn't actually work in any case, since he
didn't deal with the pg_config.h problem.
        regards, tom lane