summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/extutils-cbuilder-cflags.diff
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2011-10-19 14:53:17 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-10-24 17:27:14 +0100
commit5f8f114e4cc29e96942f96ef7dec6d25e18b6d4f (patch)
tree5b7867dec533d001ce29d8bf7b4869299cea254f /meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/extutils-cbuilder-cflags.diff
parent53f7342562a66d1b14ecee234aa76be07951dedc (diff)
downloadpoky-5f8f114e4cc29e96942f96ef7dec6d25e18b6d4f.tar.gz
perl: upgrade from 5.12.3 to 5.14.2
parallel build fix patches are not needed as they are upstream now. Got a new set of debian patch set for 5.14.2 perl-rpdepends: fix the autogenerated rdepends mistakes take out some mdoules which are not going to be built. [Saul Wold: Remove debug] (From OE-Core rev: 8dc5f118832a4aca906239ffed82f72497c37f8e) Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/extutils-cbuilder-cflags.diff')
-rw-r--r--meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/extutils-cbuilder-cflags.diff86
1 files changed, 86 insertions, 0 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/extutils-cbuilder-cflags.diff b/meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/extutils-cbuilder-cflags.diff
new file mode 100644
index 0000000000..cd86a76dea
--- /dev/null
+++ b/meta/recipes-devtools/perl/perl-5.14.2/debian/fixes/extutils-cbuilder-cflags.diff
@@ -0,0 +1,86 @@
1From 0c91624f1f9ec46a6f13cad3031b706213233479 Mon Sep 17 00:00:00 2001
2From: Niko Tyni <ntyni@debian.org>
3Date: Thu, 28 Apr 2011 09:18:54 +0300
4Subject: Append CFLAGS and LDFLAGS to their Config.pm counterparts in
5 EU::CBuilder
6
7Bug: http://rt.perl.org/rt3//Public/Bug/Display.html?id=89478
8Bug-Debian: http://bugs.debian.org/624460
9Origin: upstream, http://perl5.git.perl.org/perl.git/commitdiff/011e8fb476b5fb27c9aa613360d918aa0b798b3d
10
11Since ExtUtils::CBuilder 0.27_04 (bleadperl commit 06e8058f27e4),
12CFLAGS and LDFLAGS from the environment have overridden the Config.pm
13ccflags and ldflags settings. This can cause binary incompatibilities
14between the core Perl and extensions built with EU::CBuilder.
15
16Append to the Config.pm values rather than overriding them.
17
18Patch-Name: fixes/extutils-cbuilder-cflags.diff
19---
20 .../lib/ExtUtils/CBuilder/Base.pm | 6 +++-
21 dist/ExtUtils-CBuilder/t/04-base.t | 25 +++++++++++++++++++-
22 2 files changed, 28 insertions(+), 3 deletions(-)
23
24diff --git a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
25index b572312..2255c51 100644
26--- a/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
27+++ b/dist/ExtUtils-CBuilder/lib/ExtUtils/CBuilder/Base.pm
28@@ -40,11 +40,13 @@ sub new {
29 $self->{config}{$k} = $v unless exists $self->{config}{$k};
30 }
31 $self->{config}{cc} = $ENV{CC} if defined $ENV{CC};
32- $self->{config}{ccflags} = $ENV{CFLAGS} if defined $ENV{CFLAGS};
33+ $self->{config}{ccflags} = join(" ", $self->{config}{ccflags}, $ENV{CFLAGS})
34+ if defined $ENV{CFLAGS};
35 $self->{config}{cxx} = $ENV{CXX} if defined $ENV{CXX};
36 $self->{config}{cxxflags} = $ENV{CXXFLAGS} if defined $ENV{CXXFLAGS};
37 $self->{config}{ld} = $ENV{LD} if defined $ENV{LD};
38- $self->{config}{ldflags} = $ENV{LDFLAGS} if defined $ENV{LDFLAGS};
39+ $self->{config}{ldflags} = join(" ", $self->{config}{ldflags}, $ENV{LDFLAGS})
40+ if defined $ENV{LDFLAGS};
41
42 unless ( exists $self->{config}{cxx} ) {
43 my ($ccpath, $ccbase, $ccsfx ) = fileparse($self->{config}{cc}, qr/\.[^.]*/);
44diff --git a/dist/ExtUtils-CBuilder/t/04-base.t b/dist/ExtUtils-CBuilder/t/04-base.t
45index db0ef98..49819a1 100644
46--- a/dist/ExtUtils-CBuilder/t/04-base.t
47+++ b/dist/ExtUtils-CBuilder/t/04-base.t
48@@ -1,7 +1,7 @@
49 #! perl -w
50
51 use strict;
52-use Test::More tests => 50;
53+use Test::More tests => 64;
54 use Config;
55 use Cwd;
56 use File::Path qw( mkpath );
57@@ -328,6 +328,29 @@ is_deeply( $mksymlists_args,
58 "_prepare_mksymlists_args(): got expected arguments for Mksymlists",
59 );
60
61+my %testvars = (
62+ CFLAGS => 'ccflags',
63+ LDFLAGS => 'ldflags',
64+);
65+
66+while (my ($VAR, $var) = each %testvars) {
67+ local $ENV{$VAR};
68+ $base = ExtUtils::CBuilder::Base->new( quiet => 1 );
69+ ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" );
70+ isa_ok( $base, 'ExtUtils::CBuilder::Base' );
71+ like($base->{config}{$var}, qr/\Q$Config{$var}/,
72+ "honours $var from Config.pm");
73+
74+ $ENV{$VAR} = "-foo -bar";
75+ $base = ExtUtils::CBuilder::Base->new( quiet => 1 );
76+ ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" );
77+ isa_ok( $base, 'ExtUtils::CBuilder::Base' );
78+ like($base->{config}{$var}, qr/\Q$ENV{$VAR}/,
79+ "honours $VAR from the environment");
80+ like($base->{config}{$var}, qr/\Q$Config{$var}/,
81+ "doesn't override $var from Config.pm with $VAR from the environment");
82+}
83+
84 #####
85
86 for ($source_file, $object_file, $lib_file) {