Quit easy porting, here the instructions:
-CC = gcc
+CC = /home/git/arm-2009q3/bin/arm-none-linux-gnueabi-gcc
-CPP = gcc -E
+CPP = /home/git/arm-2009q3/bin/arm-none-linux-gnueabi-gcc -E
Such kind of changes is not necessary, you can do it with CC=<path to gcc> LD=<path to ld> ./configure ...
If you remove that, there are only two parts that seem to be really ARM-specific:
- -export-dynamic -> -all-static
- a patch for zend_float.h
Both of them are not clear to me, would you care to explain why are they needed?
--
Wbr,
Antony Dovgal
http://pinba.org - realtime statistics for PHP
Hi,
If you remove that, there are only two parts that seem to be really ARM-specific:
- 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.
Quit easy porting, here the instructions:
-CC = gcc
+CC = /home/git/arm-2009q3/bin/arm-none-linux-gnueabi-gcc
-CPP = gcc -E
+CPP = /home/git/arm-2009q3/bin/arm-none-linux-gnueabi-gcc -ESuch kind of changes is not necessary, you can do it with
CC=<path to gcc> LD=<path to ld> ./configure ...
If you remove that, there are only two parts that seem to be really ARM-specific:
- -export-dynamic -> -all-static
- a patch for zend_float.h
Both of them are not clear to me, would you care to explain why are they needed?
I actually didn't need any modifications to get PHP to compile on my
ARM (mobile phone) except for turning of optimizations for
Zend/zend_parser.c and ext/date/lib/parse_date.c because I didn't have
enough memory.
regards,
Dreick
--
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
twitter: @derickr
Antony Dovgal wrote:
Quit easy porting, here the instructions:
-CC = gcc
+CC = /home/git/arm-2009q3/bin/arm-none-linux-gnueabi-gcc
-CPP = gcc -E
+CPP = /home/git/arm-2009q3/bin/arm-none-linux-gnueabi-gcc -ESuch kind of changes is not necessary, you can do it with
CC=<path to gcc> LD=<path to ld> ./configure ...
If you remove that, there are only two parts that seem to be really ARM-specific:
- -export-dynamic -> -all-static
- a patch for zend_float.h
Both of them are not clear to me, would you care to explain why are they needed?
Hello,
The static compile is due to the fact that in android there is
replacment to the standard libc called "bionic". Since and i haven't yet
managed to tell the CodeSourcery to link against bionic i linked all
staticlly.
bionic is something i need to face for allowing the php to interact with
the local apache and for allowing the php to be embeded into the android
ndk framework. I guess there some extra patching will need for it.
Moshe
so why not patching the configure.in ?
// give the possibility to add other embedded targets and be able to
manage next versions
--with-embedded-target=droid-xxxx
--with-embedded-ldflags= // toolchain ldflags
--with-embedded-cflags= // toolchain cflags
--with-embedded-cppflags= // toolchain cppflags
--with-embedded-tuningflags= // toolchain tuningflags
ecetera
why ?
redefining CC and LDFLAGS CFLAGS (11 years of experience in toolchains
creation, cross compiling... ecetera ) won't work with all
cc/ld/libtool versions and it's often a mess when cross compiling
wrong symbol catched, from a Mac no problem Apple patched gcc/ld and
their libtool to handle that AND IT TOOK A WHILE (4 years) before
beeing stable and non buggy, I am not sure about all platform (read
quite sure)
Best
Antony Dovgal wrote:
Quit easy porting, here the instructions:
-CC = gcc
+CC = /home/git/arm-2009q3/bin/arm-none-linux-gnueabi-gcc
-CPP = gcc -E
+CPP = /home/git/arm-2009q3/bin/arm-none-linux-gnueabi-gcc -ESuch kind of changes is not necessary, you can do it with
CC=<path to gcc> LD=<path to ld> ./configure ...
If you remove that, there are only two parts that seem to be really
ARM-specific:
- -export-dynamic -> -all-static
- a patch for zend_float.h
Both of them are not clear to me, would you care to explain why are they
needed?Hello,
The static compile is due to the fact that in android there is replacment to
the standard libc called "bionic". Since and i haven't yet managed to tell
the CodeSourcery to link against bionic i linked all staticlly.
bionic is something i need to face for allowing the php to interact with the
local apache and for allowing the php to be embeded into the android ndk
framework. I guess there some extra patching will need for it.Moshe