diff options
-rw-r--r-- | meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-sdksyms.sh-Make-sdksyms.sh-work-with-gcc5.patch | 76 |
1 files changed, 37 insertions, 39 deletions
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-sdksyms.sh-Make-sdksyms.sh-work-with-gcc5.patch b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-sdksyms.sh-Make-sdksyms.sh-work-with-gcc5.patch index 215c044113..9c9f595fa6 100644 --- a/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-sdksyms.sh-Make-sdksyms.sh-work-with-gcc5.patch +++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-sdksyms.sh-Make-sdksyms.sh-work-with-gcc5.patch | |||
@@ -1,50 +1,48 @@ | |||
1 | Upstream-Status: Pending | 1 | Upstream-Status: Backport |
2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
2 | 3 | ||
3 | From 612eb45a2e7a0b35cc3790870e6d0cc42eb50c74 Mon Sep 17 00:00:00 2001 | 4 | From 21b896939c5bb242f3aacc37baf12379e43254b6 Mon Sep 17 00:00:00 2001 |
4 | From: Hans de Goede <hdegoede@redhat.com> | 5 | From: Egbert Eich <eich@freedesktop.org> |
5 | Date: Wed, 11 Feb 2015 16:26:40 +0100 | 6 | Date: Tue, 3 Mar 2015 16:27:05 +0100 |
6 | Subject: [PATCH] sdksyms.sh: Make sdksyms.sh work with gcc5. | 7 | Subject: symbols: Fix sdksyms.sh to cope with gcc5 |
7 | 8 | ||
8 | gcc5's cpp inserts patterns like this: | 9 | Gcc5 adds additional lines stating line numbers before and |
10 | after __attribute__() which need to be skipped. | ||
9 | 11 | ||
10 | extern | 12 | Signed-off-by: Egbert Eich <eich@freedesktop.org> |
11 | __attribute__((visibility("default"))) | 13 | Tested-by: Daniel Stone <daniels@collabora.com> |
12 | int WaitForSomething(int * | 14 | Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> |
13 | ); | ||
14 | 15 | ||
15 | This patch make sdksyms.sh work with this. Note my awk skills are weak, so | 16 | diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh |
16 | there likely is a better way to deal with this. | 17 | index 2305073..05ac410 100755 |
17 | 18 | --- a/hw/xfree86/sdksyms.sh | |
18 | Signed-off-by: Hans de Goede <hdegoede@redhat.com> | 19 | +++ b/hw/xfree86/sdksyms.sh |
19 | --- | 20 | @@ -350,13 +350,25 @@ BEGIN { |
20 | hw/xfree86/sdksyms.sh | 17 +++++++++++++++++ | ||
21 | 1 file changed, 17 insertions(+) | ||
22 | |||
23 | Index: xorg-server-1.16.3/hw/xfree86/sdksyms.sh | ||
24 | =================================================================== | ||
25 | --- xorg-server-1.16.3.orig/hw/xfree86/sdksyms.sh | ||
26 | +++ xorg-server-1.16.3/hw/xfree86/sdksyms.sh | ||
27 | @@ -353,6 +353,23 @@ BEGIN { | ||
28 | if (sdk) { | 21 | if (sdk) { |
29 | n = 3; | 22 | n = 3; |
30 | 23 | ||
31 | + # detect the following gcc5 cpp pattern and skip it: | 24 | + # skip line numbers GCC 5 adds before __attribute__ |
32 | + # extern | 25 | + while ($n == "" || $0 ~ /^# [0-9]+ "/) { |
33 | + # # 320 "../../include/os.h" 3 4 | 26 | + getline; |
34 | + # __attribute__((visibility("default"))) | 27 | + n = 1; |
35 | + # # 320 "../../include/os.h" | 28 | + } |
36 | + # Note in this case the "extern " or "extern void " always has | ||
37 | + # a trailing space | ||
38 | + if ($0 ~ "^extern.* $") { | ||
39 | + getline; | ||
40 | + getline; | ||
41 | + getline; | ||
42 | + getline; | ||
43 | + n = 1; | ||
44 | + while ($n == " ") | ||
45 | + n++; | ||
46 | + } | ||
47 | + | 29 | + |
48 | # skip attribute, if any | 30 | # skip attribute, if any |
49 | while ($n ~ /^(__attribute__|__global)/ || | 31 | while ($n ~ /^(__attribute__|__global)/ || |
50 | # skip modifiers, if any | 32 | # skip modifiers, if any |
33 | $n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ || | ||
34 | # skip pointer | ||
35 | - $n ~ /^[a-zA-Z0-9_]*\*$/) | ||
36 | + $n ~ /^[a-zA-Z0-9_]*\*$/) { | ||
37 | n++; | ||
38 | + # skip line numbers GCC 5 adds after __attribute__ | ||
39 | + while ($n == "" || $0 ~ /^# [0-9]+ "/) { | ||
40 | + getline; | ||
41 | + n = 1; | ||
42 | + } | ||
43 | + } | ||
44 | |||
45 | # type specifier may not be set, as in | ||
46 | # extern _X_EXPORT unsigned name(...) | ||
47 | -- | ||
48 | cgit v0.10.2 | ||