Re: php for android

From: Date: Sun, 10 Jan 2010 11:40:00 +0000
Subject: Re: php for android
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-46615@lists.php.net to get a copy of this message
Hi, > If you remove that, there are only two parts that seem to be really ARM-specific: > 2) a patch for zend_float.h > Both of them are not clear to me, would you care to explain why are they needed? Since I'm responsible for zend_float.h: When running ./configure directly without telling it to use a cross compiler and later manually patching the build system, exactly this kind of thing becomes necessary. If the local CPU is either x86 or x86_64, which ./configure thinks is the target, checks for the presence of certain FPU instructions will indicate that they are there, thus configure sets different constants. On ARM, however, the FPU is different [2] and with the constant defined, compilation will fail. When doing this properly with a cross compiler [1], ./configure checks should be able to determine that the FPU doesn't have these kind of instructions (and doesn't need them, they are only required for x86 / x86_64 without SSE) and the constants will not be set automatically. So the patch for zend_float.h is *not* necessary for ARM when using cross-compilation correctly or when compiling it on ARM natively... Regards, Christian [1] Something like: CC=<path to CC> LD=<path to ld> ./configure --target=arm-linux ... --target=arm-linux is necessary to tell configure that its using a cross compiler. [2] In some ARMs at least it's completely software based.

« previous php.internals (#46615) next »