Commit | Line | Data |
---|---|---|
136febd5 JH |
1 | Building for arm-linux |
2 | ---------------------- | |
58a21a9b | 3 | |
136febd5 JH |
4 | The files in this directory add another cross-compilation |
5 | target to the Perl buildsystem. It was built as a part of | |
6 | the Open Zaurus (http://www.openzaurus.com/) distribution. | |
7 | Most / All of the arm compiler optimisations are "borrowed" | |
8 | from this excellent project. | |
6a809565 | 9 | |
e7a3c61b JH |
10 | (Further discussion about cross-compiling Perl in the top level |
11 | INSTALL file, see the section "Cross-compilation".) | |
12 | ||
6a809565 | 13 | The main target is arm-linux but I have also managed to |
136febd5 | 14 | successfully cross-compile Perl for Solaris x86 using the same |
6a809565 JH |
15 | buildsystem. |
16 | ||
17 | We are currently dependent on an existing working local copy of | |
136febd5 JH |
18 | Perl ** of the same version and revision ** which is available |
19 | as /usr/bin/perl. | |
6a809565 | 20 | |
136febd5 JH |
21 | You need a working and tested cross-compiler for your build |
22 | and target combination. The binary directory must be in | |
6a809565 JH |
23 | your path. |
24 | ||
e7a3c61b | 25 | 1) You should be reading me (README) in perl-5.x.y/Cross |
6a809565 JH |
26 | |
27 | 2) Make sure you are in the Cross directory. | |
28 | ||
29 | 3) Edit the file 'config' to contain your target platform information. | |
30 | ||
31 | 4) make patch ## This will patch the existing source-tree. | |
32 | 5) make perl ## Will make perl | |
33 | ||
136febd5 JH |
34 | Your built Perl environment is in install_me_here/ in your build |
35 | directory. From here you can package and deploy as you wish. | |
36 | ||
6a809565 JH |
37 | The Obvious Ommissions |
38 | ---------------------- | |
39 | ||
136febd5 JH |
40 | This does NOT perform any installation as site installation method |
41 | will be dependent on the target architecture and OS. | |
6a809565 | 42 | |
136febd5 JH |
43 | make test will NOT work as the binaries and libraries will not execute |
44 | on your BUILD machine. | |
6a809565 JH |
45 | |
46 | Due to space limitations on the Zaurus (it's a PDA) we do not provide | |
47 | documentation in the core - Therefore man pages are not even generated. | |
48 | ||
136febd5 JH |
49 | Other Targets (For Developers) |
50 | ------------------------------ | |
51 | ||
52 | It is possible to extend the cross-compilation to other targets. | |
53 | We have sucessfully compiled for the target solaris2.8/x86 | |
54 | on linux/x86 build system. | |
55 | ||
56 | To attempt a cross-compile for another target using the methods | |
57 | in this directory: | |
58 | ||
59 | 1) Copy the Perl source code onto your TARGET machine. | |
60 | 2) Execute sh Configure as normal and configure as required, | |
61 | do not "make". | |
62 | 3) Copy the config.sh file that is generated to your BUILD | |
63 | machine and place it in the Cross directory with the | |
64 | filename config.sh-ARCH-OS. For example, | |
65 | config.sh-i386-pc-solaris2.8. For the appropriate ARCH | |
66 | and OS please refer to your cross-compiler documentation. | |
67 | 4) Edit Cross/config to reflect your new target and continue | |
68 | with build as above. | |
69 | ||
70 | Should you wish to produce optimised binaries for different | |
71 | architectures you can add the appropriate compiler flags to | |
72 | the Makefile in a new ifeq ($(ARCH),...) ... endif block. | |
73 | ||
e4568ebb | 74 | |
136febd5 JH |
75 | Please refer to your cross-compiler documentation for details. |
76 | ||
77 | ||
6a809565 JH |
78 | Note that the Cross/ directory is also used by a different |
79 | cross-compilation setup described in the INSTALL file, and | |
80 | executed by Configure. There should be no conflicts since | |
81 | it is unlikely both that cross-compilation setups are used | |
82 | simultaneously. | |
83 | ||
84 | Enjoy! | |
85 | ||
86 | References | |
e42fa77b | 87 | ---------- |
6a809565 JH |
88 | Redvers Davies <red@criticalintegration.com> |
89 | Open Zaurus http://www.openzaurus.org/ | |
e4568ebb | 90 | Perl OZ Packages http://www.criticalintegration.com/perl-oz/ |