diff options
Diffstat (limited to 'meta/recipes-devtools/perl/perl-5.14.3/debian/fixes/h2ph-multiarch.diff')
-rw-r--r-- | meta/recipes-devtools/perl/perl-5.14.3/debian/fixes/h2ph-multiarch.diff | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/meta/recipes-devtools/perl/perl-5.14.3/debian/fixes/h2ph-multiarch.diff b/meta/recipes-devtools/perl/perl-5.14.3/debian/fixes/h2ph-multiarch.diff deleted file mode 100644 index 3b6b4a078c..0000000000 --- a/meta/recipes-devtools/perl/perl-5.14.3/debian/fixes/h2ph-multiarch.diff +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | Upstream-Status:Inappropriate [debian patches] | ||
2 | From 37969e249dfc593ebabfcb682893b6c69dc6b313 Mon Sep 17 00:00:00 2001 | ||
3 | From: Niko Tyni <ntyni@debian.org> | ||
4 | Date: Wed, 18 May 2011 21:44:06 -0700 | ||
5 | Subject: Make h2ph correctly search gcc include directories | ||
6 | |||
7 | Bug: http://rt.perl.org/rt3/Public/Bug/Display.html?id=90122 | ||
8 | Bug-Debian: http://bugs.debian.org/625808 | ||
9 | Origin: upstream, http://perl5.git.perl.org/perl.git/commit/e7ec705d9b91d35fa99dc50d0a232b6372160a77 | ||
10 | |||
11 | System header conversion with "h2ph -a" is currently broken on Ubuntu | ||
12 | Natty and Oneiric (unless the gcc-multilib package is installed for | ||
13 | backward compatibility), resulting in things like | ||
14 | |||
15 | # perl -e 'require "syscall.ph"' | ||
16 | Can't locate asm/unistd.ph in @INC [...] | ||
17 | |||
18 | This happens because Ubuntu has switched to a 'multiarch' setup, see | ||
19 | <https://wiki.ubuntu.com/MultiarchSpec> for details. | ||
20 | |||
21 | The asm subdirectory isn't in $Config{usrinc} anymore: /usr/include/asm | ||
22 | is now /usr/include/x86_64-linux-gnu/asm. (The third component of the | ||
23 | new path varies with the actual architecture.) | ||
24 | |||
25 | gcc --print-search-dirs doesn't really tell anything about where gcc | ||
26 | looks for the include directories, it was just used to find the gcc | ||
27 | internal directory prefix. | ||
28 | |||
29 | Parse the output of "gcc -v -E" instead, and append $Config{usrinc} | ||
30 | for safety. Duplicates shouldn't matter. | ||
31 | |||
32 | The h2ph "-a" switch isn't currently tested automatically, and that | ||
33 | seems nontrivial to do portably. Manual testing was done with | ||
34 | |||
35 | # mkdir ttt | ||
36 | # ./perl -Ilib ./utils/h2ph -a -d $(pwd)/ttt syscall.h | ||
37 | |||
38 | The gcc invocation has been tested to work with gcc 4.6, 4.1, and 3.3. | ||
39 | |||
40 | http://bugs.debian.org/625808 | ||
41 | https://bugs.launchpad.net/bugs/777903 | ||
42 | |||
43 | Patch-Name: fixes/h2ph-multiarch.diff | ||
44 | --- | ||
45 | utils/h2ph.PL | 12 ++---------- | ||
46 | 1 files changed, 2 insertions(+), 10 deletions(-) | ||
47 | |||
48 | diff --git a/utils/h2ph.PL b/utils/h2ph.PL | ||
49 | index 87f3c7d..4545d6d 100644 | ||
50 | --- a/utils/h2ph.PL | ||
51 | +++ b/utils/h2ph.PL | ||
52 | @@ -761,16 +761,8 @@ sub queue_includes_from | ||
53 | # non-GCC?) C compilers, but gcc uses additional include directories. | ||
54 | sub inc_dirs | ||
55 | { | ||
56 | - my $from_gcc = `LC_ALL=C $Config{cc} -v 2>&1`; | ||
57 | - if( !( $from_gcc =~ s:^Reading specs from (.*?)/specs\b.*:$1/include:s ) ) | ||
58 | - { # gcc-4+ : | ||
59 | - $from_gcc = `LC_ALL=C $Config{cc} -print-search-dirs 2>&1`; | ||
60 | - if ( !($from_gcc =~ s/^install:\s*([^\s]+[^\s\/])([\s\/]*).*$/$1\/include/s) ) | ||
61 | - { | ||
62 | - $from_gcc = ''; | ||
63 | - }; | ||
64 | - }; | ||
65 | - length($from_gcc) ? ($from_gcc, $from_gcc . "-fixed", $Config{usrinc}) : ($Config{usrinc}); | ||
66 | + my $from_gcc = `LC_ALL=C $Config{cc} -v -E - < /dev/null 2>&1 | awk '/^#include/, /^End of search list/' | grep '^ '`; | ||
67 | + length($from_gcc) ? (split(' ', $from_gcc), $Config{usrinc}) : ($Config{usrinc}); | ||
68 | } | ||
69 | |||
70 | |||