Re: php5 as universal binary (Mac OS X)
| From: | Antony Dovgal | Date: | Fri, 27 Jul 2007 10:56:34 +0000 |
| Subject: | Re: php5 as universal binary (Mac OS X) | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-31301@lists.php.net to get a copy of this message | ||
On 27.07.2007 14:47, David Wang wrote:
Isn't an universal binary just two binaries packaged together?Yes.
One has to be compiled for Intel and the other for PowerPC.GCC is able to build both on Intel.
How exactly is this currently being done in a single run on Christian's machine?It should be as easy as CFLAGS="-arch ppc -arch i386", that's it.
Is there a special build tool that runs the compilation twice or a special compiler that generates two binaries? Something tells me that you'd have to know how this tool works and this would not be an extremely easy thing to fix. On 7/27/07, Uwe Schindler <thetaphi@php.net> wrote:-- Wbr, Antony DovgalThe simpliest would be to create a patch that is included *after* the configure-generated .h file. I do not exactly now, in which PHP/Zend specific .h file the configure generated php_config.h one is included, but that would be the place to place the following macro: #if defined(MACOSX) (I do not know the exact macro for detecting osx) # undef WORDS_BIGENDIAN # define WORDS_BIGENDIAN __BIG_ENDIAN__ #endif Just an idea. Or just update to a newer autoconf version that can detect this (I know newer ones do this correctly). But this is not possible for PHP.