summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg/0001-sdksyms.sh-Make-sdksyms.sh-work-with-gcc5.patch76
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 @@
1Upstream-Status: Pending 1Upstream-Status: Backport
2Signed-off-by: Ross Burton <ross.burton@intel.com>
2 3
3From 612eb45a2e7a0b35cc3790870e6d0cc42eb50c74 Mon Sep 17 00:00:00 2001 4From 21b896939c5bb242f3aacc37baf12379e43254b6 Mon Sep 17 00:00:00 2001
4From: Hans de Goede <hdegoede@redhat.com> 5From: Egbert Eich <eich@freedesktop.org>
5Date: Wed, 11 Feb 2015 16:26:40 +0100 6Date: Tue, 3 Mar 2015 16:27:05 +0100
6Subject: [PATCH] sdksyms.sh: Make sdksyms.sh work with gcc5. 7Subject: symbols: Fix sdksyms.sh to cope with gcc5
7 8
8gcc5's cpp inserts patterns like this: 9Gcc5 adds additional lines stating line numbers before and
10after __attribute__() which need to be skipped.
9 11
10extern 12Signed-off-by: Egbert Eich <eich@freedesktop.org>
11 __attribute__((visibility("default"))) 13Tested-by: Daniel Stone <daniels@collabora.com>
12 int WaitForSomething(int * 14Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
13 );
14 15
15This patch make sdksyms.sh work with this. Note my awk skills are weak, so 16diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
16there likely is a better way to deal with this. 17index 2305073..05ac410 100755
17 18--- a/hw/xfree86/sdksyms.sh
18Signed-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
23Index: 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--
48cgit v0.10.2