klcc-cross: Add patch to use /usr/bin/env perl
authorTom Rini <tom_rini@mentor.com>
Wed, 5 Jan 2011 23:17:31 +0000 (16:17 -0700)
committerTom Rini <tom_rini@mentor.com>
Thu, 6 Jan 2011 00:15:09 +0000 (17:15 -0700)
Certain configurations (such as autobuilders) may build in very
deep paths (that are longer than the #! mechanism allows) which
makes it unsafe to use the direct path for perl.  In our case we know
that /usr/bin/env perl will always return ours (if it has been built).

Signed-off-by: Tom Rini <tom_rini@mentor.com>
recipes/klibc/klcc-cross_1.5.20.bb
recipes/klibc/klibc-1.5.20/use-env-for-perl.patch [new file with mode: 0644]

index 6b6d74d..ef01449 100644 (file)
@@ -1,7 +1,10 @@
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
 
 require klibc.inc
 require klibc-checksums_${PV}.inc
+
+SRC_URI += "file://use-env-for-perl.patch"
+
 DEPENDS = "klibc"
 
 FILESPATHPKG =. "klibc-${PV}:"
diff --git a/recipes/klibc/klibc-1.5.20/use-env-for-perl.patch b/recipes/klibc/klibc-1.5.20/use-env-for-perl.patch
new file mode 100644 (file)
index 0000000..8609864
--- /dev/null
@@ -0,0 +1,17 @@
+---
+ klcc/makeklcc.pl |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: klibc-1.5.20/klcc/makeklcc.pl
+===================================================================
+--- klibc-1.5.20.orig/klcc/makeklcc.pl
++++ klibc-1.5.20/klcc/makeklcc.pl
+@@ -26,7 +26,7 @@ sub pathsearch($) {
+     return undef;
+ }
+-print "#!${perlpath}\n";
++print "#!/usr/bin/env perl\n";
+ open(KLIBCCONF, "< $klibcconf\0")
+     or die "$0: cannot open $klibcconf: $!\n";