This is second approach to linux cross-compiling, which should allow building full perl and entensions for target platform. Cross-compiling for linux uses similar approach and share same files as cross-compiling for WINCE.
We refer to HOST as the platform where the build is performed, and to TARGET as where final executables will run.
output files from GCC cross-compiler are produced in the same directory where C files are.
All TARGET binaries have different extensions so to distinguish HOST and TARGET binaries.
object files for
arm cross-compilation will have extension
executable files will have
After typical cross-compilation the following files will be built, among others:
sv.c sv.o sv.armo libperl.arma
(this approach may be reconsidered, however.)
miniperl is built. This executable is intended to run on HOST, and it will facilitate the remaining build process; all binaries built after it are foreign (TARGET) and should not run locally (HOST).
Unlike HOST build, miniperl will not have
Config.pm of HOST within reach; it rather will use the
Config.pm from the cross-compilation directories. In fact, if the build process does have Config.pm within reach, this is only an indication of a mistake somewhere in the middle.
# following command is okay: ./miniperl -Ilib -MCross -MConfig -e 1 # following command should cluck, and it is bad if it does not: ./miniperl -Ilib -MConfig -e 1
miniperl is built,
configpm is invoked to create right
Config.pm in right place and its corresponding Cross.pm.
Cross.pm is dead simple: for given cross-architecture places in @INC a path where perl modules are, and right
Config.pm in that place.
miniperl -Ilib -MConfig -we 1 should report an error, because it can not find
Config.pm. If it does not give an error -- wrong
Config.pm is substituted, and resulting binaries will be a mess.
miniperl -MCross -MConfig -we 1 should run okay, and it will provide right
Config.pm for further compilations.
During extensions build phase, the script
./ext/util/make_ext_cross is invoked.
All invokes of
Makefile.PL are provided with
-MCross so to enable cross- compile.
For compiling, you need following: