From 24f8add82d160dc484dbdf00e58044c3890246a5 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Mon, 25 Sep 2006 08:53:24 +0000 Subject: perl 5.8.7: Fix the perl shared library generation for sh3/sh4 targets: - You cannot link using LD on sh3/sh4, since ld fails to link in the hidden library of weak symbols that is needed. Ccc knows about this library and correctly links it in. The generate_config_sh script was replacing the configred linker with LD from the environment and the soname patch was passing parameters directly to LD which need to be passed differently when linking with gcc. - Any code to go in shared libraries must be compiled with -fPIC, which while present in the config file was again being replaced from the environment by the generate_config_sh script. Both these patches probably should be ok for all targets, but they would definately need run-time testing. So they are just patched in for sh3 and sh4 for now. Also removed the old code I added not to install the shared library if its not configured since its configured for all targets after this change. --- packages/perl/perl-5.8.7/override-generate-sh.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 packages/perl/perl-5.8.7/override-generate-sh.patch (limited to 'packages/perl/perl-5.8.7/override-generate-sh.patch') diff --git a/packages/perl/perl-5.8.7/override-generate-sh.patch b/packages/perl/perl-5.8.7/override-generate-sh.patch new file mode 100644 index 0000000000..4c2b0bd752 --- /dev/null +++ b/packages/perl/perl-5.8.7/override-generate-sh.patch @@ -0,0 +1,16 @@ +Use the ld flags from the supplied configuration file. For sh we need the +flags that specify to build PIC code so that the shared libraries work. + +--- perl-5.8.7/Cross/generate_config_sh~ 2006-09-25 16:34:09.000000000 +1000 ++++ perl-5.8.7/Cross/generate_config_sh 2006-09-25 16:34:09.000000000 +1000 +@@ -19,8 +19,8 @@ + $callbacks->{'ar'} = [\&simple_process, ["AR", "arm-linux-ar"]]; + $callbacks->{'archname'} = [\&simple_process, ["SYS", "armv4l-linux"]]; + $callbacks->{'cc'} = [\&simple_process, ["CC", "arm-linux-gcc"]]; +-$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]]; +-$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]]; ++#$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]]; ++#$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]]; + $callbacks->{'ccflags'} = [\&simple_process, ["CFLAGS", "-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]]; + $callbacks->{'ccflags_uselargefiles'} = [\&simple_process, ["CFLAGS", "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]]; + $callbacks->{'ccname'} = [\&simple_process, ["CC", "arm-linux-gcc"]]; -- cgit v1.2.3