• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

MakefileH A D18-Dec-20202 KiB6348

Makefile-cross-SHH A D18-Dec-202038.7 KiB1,296839

Makefile.SH.patchH A D18-Dec-20206.5 KiB190160

READMEH A D18-Dec-20202.7 KiB8761

README.newH A D18-Dec-20202.7 KiB9461

TODOH A D18-Dec-202063 21

build-arm-n770-shH A D18-Dec-20202.3 KiB8865

cflags-cross-armH A D18-Dec-20203.3 KiB157120

configH A D18-Dec-2020494 2419

config.sh-arm-linuxH A D18-Dec-202027.9 KiB1,2021,186

config.sh-arm-linux-n770H A D18-Dec-202027.9 KiB1,2001,184

generate_config_shH A D18-Dec-20203.7 KiB13388

installperl.patchH A D18-Dec-2020538 2321

warpH A D18-Dec-2020376 156

README

1Building for arm-linux
2----------------------
3
4The files in this directory add another cross-compilation
5target to the Perl buildsystem.  It was built as a part of
6the Open Zaurus (http://www.openzaurus.org/) distribution.
7Most / All of the arm compiler optimisations are "borrowed"
8from this excellent project.
9
10(Further discussion about cross-compiling Perl in the top level
11INSTALL file, see the section "Cross-compilation".)
12
13The main target is arm-linux but I have also managed to
14successfully cross-compile Perl for Solaris x86 using the same
15buildsystem.
16
17We are currently dependent on an existing working local copy of
18Perl ** of the same version and revision ** which is available
19as /usr/bin/perl.
20
21You need a working and tested cross-compiler for your build
22and target combination.  The binary directory must be in
23your path.
24
251)	You should be reading me (README) in perl-5.x.y/Cross
26
272)	Make sure you are in the Cross directory.
28
293)	Edit the file 'config' to contain your target platform information.
30
314)	make patch	## This will patch the existing source-tree.
325)	make perl	## Will make perl
33
34Your built Perl environment is in install_me_here/ in your build
35directory.  From here you can package and deploy as you wish.
36
37Omissions
38----------
39
40This does NOT perform any installation.
41
42Make test will NOT work.
43
44We do not provide documentation in the core,  man pages are not generated.
45
46Other Targets (For Developers)
47------------------------------
48
49It is possible to extend the cross-compilation to other targets.
50We have successfully compiled for the target solaris2.8/x86
51on linux/x86 build system.
52
53To attempt a cross-compile for another target using the methods
54in this directory:
55
561)	Copy the Perl source code onto your TARGET machine.
572)	Execute sh Configure as normal and configure as required,
58	do not "make".
593)	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.
644)	Edit Cross/config to reflect your new target and continue
65	with build as above.
66
67Should you wish to produce optimised binaries for different
68architectures you can add the appropriate compiler flags to
69the Makefile in a new ifeq ($(ARCH),...) ... endif block.
70
71
72Please 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
81Enjoy!
82
83References
84----------
85Redvers Davies <red@criticalintegration.com>
86Open Zaurus http://www.openzaurus.org/
87

README.new

1You're reading ./Cross/README.new, describing Perl cross-compilation process.
2NOTE: this file will replace ./Cross/README, after the cross-compilation scheme
3is stabilized.
4
5=head1 NAME
6
7README.new - Cross-compilation for linux
8
9=head1 DESCRIPTION
10
11This is second approach to linux cross-compilation, which should allow
12building full perl and extensions for target platform.
13
14We refer to HOST as the platform where the build is performed, and to
15TARGET as where final executables will run.
16
17=head2 Basic ideas
18
19=head3 common
20
21Output files from GCC cross-compiler are produced in the same
22directory where C files are. All TARGET binaries have different extensions
23so to distinguish HOST and TARGET binaries. Namely, object files for C<arm>
24cross-compilation will have extension C<.armo>, executable files will have
25C<.arm>.
26
27After typical cross-compilation the following files will be built, among
28others:
29
30  sv.c
31  sv.o
32  sv.armo
33  libperl.arma
34
35(this approach may be reconsidered, however.)
36
37=head3 build process
38
39C<miniperl> is built. This executable is intended to run on HOST, and it
40will facilitate the remaining build process; all binaries built after it are
41foreign (TARGET) and should not run locally (HOST).
42
43Unlike HOST build, miniperl will not have C<Config.pm> of HOST within reach;
44it rather will use the C<Config.pm> from the cross-compilation directories.
45In fact, if the build process does have Config.pm within reach, this is only
46an indication of a mistake somewhere in the middle.
47
48  # following command is okay:
49  ./miniperl -Ilib -MCross -MConfig -e 1
50  # following command should cluck, and it is bad if it does not:
51  ./miniperl -Ilib -MConfig -e 1
52
53After C<miniperl> is built, C<configpm> is invoked to create an
54appropriate C<Config.pm> in the right place and its corresponding
55C<Cross.pm>.
56
57File C<Cross.pm> is dead simple: for given cross-architecture places in @INC
58a path where perl modules are, and right C<Config.pm> in that place.
59
60That said, C<miniperl -Ilib -MConfig -we 1> should report an error, because
61it cannot find C<Config.pm>. If it does not give an error, a wrong C<Config.pm>
62is substituted, and resulting binaries will be a mess.
63
64C<miniperl -MCross -MConfig -we 1> should run okay, and it will provide a
65correct C<Config.pm> for further compilations.
66
67During extensions build phase, the script C<./ext/util/make_ext_cross> is
68invoked.
69
70All invocations of C<Makefile.PL> are provided with C<-MCross> so to enable
71cross-compilation.
72
73=head2 BUILD
74
75=head3 Tools & SDK
76
77To compile, you need the following:
78
79=over 4
80
81=item * TODO
82
83=back
84
85=head1 Things to be done
86
87=over 4
88
89=item * better distinguishing of config.h/xconfig.h, dependencies
90
91=item * object files created in ./xlib/cross-name/ ?
92
93=back
94