1 You're reading ./Cross/README.new, describing Perl cross-compilation process.
2 NOTE: this file will replace ./Cross/README, after cross-compilation scheme
5 =head1 Cross-compilation for linux
7 This is second approach to linux cross-compiling, which should allow building
8 full perl and entensions for target platform. Cross-compiling for linux
9 uses similar approach and share same files as cross-compiling for WINCE.
11 We refer to HOST as the platform where the build is performed, and to
12 TARGET as where final executables will run.
18 Unlike WINCE, output files from GCC cross-compiler are produced in the same
19 directory where C files are. All TARGET binaries have different extensions
20 so to distinguish HOST and TARGET binaries. Namely, object files for C<arm>
21 cross-compilation will have extension C<.armo>, executable files will have
24 After typical cross-compilation the following files will be built, among
32 (this approach may be reconsidered, however.)
36 C<miniperl> is built. This executable is intended to run on HOST, and it
37 will facilitate the remaining build process; all binaries built after it are
38 foreign (TARGET) and should not run locally (HOST).
40 Unlike HOST build, miniperl will not have C<Config.pm> of HOST within reach;
41 it rather will use the C<Config.pm> from the cross-compilation directories.
42 In fact, if the build process does have Config.pm within reach, this is only
43 an indication of a mistake somewhere in the middle.
45 # following command is okay:
46 ./miniperl -Ilib -MCross -MConfig -e 1
47 # following command should cluck, and it is bad if it does not:
48 ./miniperl -Ilib -MConfig -e 1
50 After C<miniperl> is built, C<configpm> is invoked to create right C<Config.pm>
51 in right place and its corresponding Cross.pm.
53 File C<Cross.pm> is dead simple: for given cross-architecture places in @INC
54 a path where perl modules are, and right C<Config.pm> in that place.
56 That said, C<miniperl -Ilib -MConfig -we 1> should report an error, because
57 it can not find C<Config.pm>. If it does not give an error -- wrong C<Config.pm>
58 is substituted, and resulting binaries will be a mess.
60 C<miniperl -MCross -MConfig -we 1> should run okay, and it will provide right
61 C<Config.pm> for further compilations.
63 During extensions build phase, the script C<./ext/util/make_ext_cross> is
66 All invokes of C<Makefile.PL> are provided with C<-MCross> so to enable cross-
73 For compiling, you need following:
81 =head1 Things to be done
85 =item * better distinguishing of config.h/xconfig.h, dependancies
87 =item * object files created in ./xlib/cross-name/ ?