summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-5.14.2/generate-sh.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.14.2/generate-sh.patch')
-rw-r--r--meta/recipes-devtools/perl/perl-5.14.2/generate-sh.patch56
1 files changed, 0 insertions, 56 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.14.2/generate-sh.patch b/meta/recipes-devtools/perl/perl-5.14.2/generate-sh.patch
deleted file mode 100644
index 27f6e691c0..0000000000
--- a/meta/recipes-devtools/perl/perl-5.14.2/generate-sh.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1Upstream-Status:Inappropriate [embedded specific]
2
3Use the ld flags from the supplied configuration file. For sh we need the
4flags that specify to build PIC code so that the shared libraries work.
5
6Index: perl-5.14.2/Cross/generate_config_sh
7===================================================================
8--- perl-5.14.2.orig/Cross/generate_config_sh 2010-12-30 04:07:14.000000000 +0200
9+++ perl-5.14.2/Cross/generate_config_sh 2012-11-22 15:58:49.852852805 +0200
10@@ -19,10 +19,10 @@
11 $callbacks->{'ar'} = [\&simple_process, ["AR", "arm-linux-ar"]];
12 $callbacks->{'archname'} = [\&simple_process, ["SYS", "armv4l-linux"]];
13 $callbacks->{'cc'} = [\&simple_process, ["CC", "arm-linux-gcc"]];
14-$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
15-$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
16-$callbacks->{'ccflags'} = [\&simple_process, ["CFLAGS", "-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
17-$callbacks->{'ccflags_uselargefiles'} = [\&simple_process, ["CFLAGS", "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
18+#$callbacks->{'cccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
19+#$callbacks->{'ccdlflags'} = [\&simple_process, ["CFLAGS", ""]];
20+$callbacks->{'ccflags'} = [\&simple_process_insert, ["CFLAGS", "-fno-strict-aliasing -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
21+$callbacks->{'ccflags_uselargefiles'} = [\&simple_process_insert, ["CFLAGS", "-D_GNU_SOURCE -DTHREADS_HAVE_PIDS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"]];
22 $callbacks->{'ccname'} = [\&simple_process, ["CC", "arm-linux-gcc"]];
23 $callbacks->{'cpp'} = [\&simple_process, ["CCP", "arm-linux-cpp"]];
24 $callbacks->{'cppflags'} = [\&simple_process, ["CCPFLAGS", "-fno-strict-aliasing"]];
25@@ -30,6 +30,7 @@
26 $callbacks->{'cppstdin'} = [\&simple_process_append, ["CC", "arm-linux-gcc -E", "-E"]];
27 $callbacks->{'full_ar'} = [\&backtick, ["AR", "which $ENV{AR}", "/usr/local/arm/2.95.3/bin/arm-linux-ar"]];
28 $callbacks->{'ld'} = [\&simple_process, ["LD", "arm-linux-ld"]];
29+$callbacks->{'lddlflags'} = [\&simple_process, ["LDDLFLAGS", ""]];
30 $callbacks->{'ldflags'} = [\&simple_process, ["LDFLAGS", ""]];
31 $callbacks->{'ldflags_uselargefiles'} = [\&simple_process, ["LDFLAGS", ""]];
32 $callbacks->{'myarchname'} = [\&simple_process, ["SYS", "armv4l-linux"]];
33@@ -105,6 +106,23 @@
34
35 }
36
37+# Insert env var into the variables value
38+sub simple_process_insert {
39+ my $key = shift;
40+ my $value = shift;
41+ my $envvar = $callbacks->{$key}->[1][0];
42+
43+ if ($ENV{$envvar}) {
44+ # Strip quotes from value
45+ $value =~ s/^\'//;
46+ $value =~ s/\'$//;
47+ # Remove -I/usr/local/... from the value
48+ $value =~ s#\W-I/usr/local/\w+\W# #g;
49+ # Prepend env var (OE setting) to value
50+ print("$key=\'$ENV{$envvar} $value\'\n");
51+ }
52+}
53+
54 sub library_munge {
55 my $key = shift;
56 my $value = shift;