BurningKrome has asked for the wisdom of the Perl Monks concerning the following question:

Hey,

I’m new to cross compiling and I’m trying to generate a full version of perl for use on an ARM platform.

I’ve read the /persrc/Cross/README, I’ve run the ./Configure on the TARGET machine. I’ve copied the generated config.sh to the BUILD to the ../perlsrc/Cross directory (as config.sh-arm-sbc-linux).

BUT…the README says…

-->START<--

To attempt a cross-compile for another target using the methods in this directory:

1) Copy the Perl source code onto your TARGET machine.

2) Execute sh Configure as normal and configure as required, do not "make".

3) Copy the config.sh file that is generated to your BUILD machine and place it in the Cross directory with the filename config.sh-ARCH-OS. For example, config.sh-i386-pc-solaris2.8. For the appropriate ARCH and OS please refer to your cross-compiler documentation.

4) Edit Cross/config to reflect your new target and continue with build as above.

-->END<--

Edit “config” to say WHAT??

When I open the default config, there appears to be only three functional lines.

-->START <--

### Target Arch

ARCH = arm

## Specific arm

CONFIG_TARGET_ARM_SA11X0 = 1

### Target OS

OS = linux

-->END<--

I’m assuming these lines are to find the proper config.sh (config.sh-platform-os-whatever)

ARCH is already correct, OS is too. BUT, there’s nothing I can find in any of the condif.sh scripts, or anywhere else as to how “CONFIG_TARGET_ARM_SA11X0 = 1” points the install to anything useful, and config.sh or anything else.

So what editing am I supposed to do in the “config” file, now that I’ve copied my “config.sh-arm-sbc-linux” file into the Cross directory before I run the makes?

Thanks. Sorry to be an idiot :-)

  • Comment on Editing the config file for cross-compiling full perl

Replies are listed 'Best First'.
Re: Editing the config file for cross-compiling full perl
by shmem (Chancellor) on May 10, 2010 at 12:06 UTC
    BUT, there’s nothing I can find in any of the condif.sh scripts, or anywhere else as to how “CONFIG_TARGET_ARM_SA11X0 = 1” points the install to anything useful, and config.sh or anything else.

    Look at the default Makefile in perlsrc/Cross:

    ## Optimisation work ifeq ($(ARCH),arm) ifdef CONFIG_TARGET_ARM_SA11X0 ifndef Architecture Architecture = armv4l-strongarm endif FULL_OPTIMIZATION += -march=armv4 -mtune=strongarm1100 -mapcs-32 OPTIMIZATION += -march=armv4 -mtune=strongarm1100 -mapcs-32 endif endif

    I haven't done cross-compiling yet, so I don't know how this flag is generated - but at least that's where the flag does something useful ;-)