diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.8.8/generate-sh.patch')
-rw-r--r-- | meta/recipes-devtools/perl/perl-5.8.8/generate-sh.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.8.8/generate-sh.patch b/meta/recipes-devtools/perl/perl-5.8.8/generate-sh.patch new file mode 100644 index 0000000000..ceb74196d6 --- /dev/null +++ b/meta/recipes-devtools/perl/perl-5.8.8/generate-sh.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | Use the ld flags from the supplied configuration file. For sh we need the | ||
2 | flags that specify to build PIC code so that the shared libraries work. | ||
3 | |||
4 | Index: perl-5.8.8/Cross/generate_config_sh | ||
5 | =================================================================== | ||
6 | --- perl-5.8.8.orig/Cross/generate_config_sh 2003-09-05 18:31:08.000000000 +1000 | ||
7 | +++ perl-5.8.8/Cross/generate_config_sh 2007-05-30 09:12:50.000000000 +1000 | ||
8 | @@ -19,10 +19,10 @@ | ||
9 | $callbacks->{'ar'} = [\&simple_process, ["AR", "arm-linux-ar"]]; | ||
10 | $callbacks->{'archname'} = [\&simple_process, ["SYS", "armv4l-linux"]]; | ||
11 | $callbacks->{'cc'} = [\&simple_process, ["CC", "arm-linux-gcc"]]; | ||
12 | -$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]]; | ||
13 | -$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]]; | ||
14 | -$callbacks->{'ccflags'} = [\&simple_process, ["CFLAGS", "-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]]; | ||
15 | -$callbacks->{'ccflags_uselargefiles'} = [\&simple_process, ["CFLAGS", "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]]; | ||
16 | +#$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]]; | ||
17 | +#$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]]; | ||
18 | +$callbacks->{'ccflags'} = [\&simple_process_insert, ["CFLAGS", "-fno-strict-aliasing -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]]; | ||
19 | +$callbacks->{'ccflags_uselargefiles'} = [\&simple_process_insert, ["CFLAGS", "-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]]; | ||
20 | $callbacks->{'ccname'} = [\&simple_process, ["CC", "arm-linux-gcc"]]; | ||
21 | $callbacks->{'cpp'} = [\&simple_process, ["CCP", "arm-linux-cpp"]]; | ||
22 | $callbacks->{'cppflags'} = [\&simple_process, ["CCPFLAGS", "-fno-strict-aliasing"]]; | ||
23 | @@ -105,6 +105,23 @@ | ||
24 | |||
25 | } | ||
26 | |||
27 | +# Insert env var into the variables value | ||
28 | +sub simple_process_insert { | ||
29 | + my $key = shift; | ||
30 | + my $value = shift; | ||
31 | + my $envvar = $callbacks->{$key}->[1][0]; | ||
32 | + | ||
33 | + if ($ENV{$envvar}) { | ||
34 | + # Strip quotes from value | ||
35 | + $value =~ s/^\'//; | ||
36 | + $value =~ s/\'$//; | ||
37 | + # Remove -I/usr/local/... from the value | ||
38 | + $value =~ s#\W-I/usr/local/\w+\W# #g; | ||
39 | + # Prepend env var (OE setting) to value | ||
40 | + print("$key=\'$ENV{$envvar} $value\'\n"); | ||
41 | + } | ||
42 | +} | ||
43 | + | ||
44 | sub library_munge { | ||
45 | my $key = shift; | ||
46 | my $value = shift; | ||