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