Annotation of /trunk/xorg-server/patches/xorg-server-1.17.1-make-sdksyms-work-with-gcc5.patch
Parent Directory | Revision Log
Revision 2576 -
(hide annotations)
(download)
Mon Jun 15 13:02:17 2015 UTC (9 years, 3 months ago) by niro
File size: 1335 byte(s)
Mon Jun 15 13:02:17 2015 UTC (9 years, 3 months ago) by niro
File size: 1335 byte(s)
-fixed garbage patches
1 | niro | 2576 | From 612eb45a2e7a0b35cc3790870e6d0cc42eb50c74 Mon Sep 17 00:00:00 2001 |
2 | From: Hans de Goede <hdegoede@redhat.com> | ||
3 | niro | 2575 | Date: Wed, 11 Feb 2015 16:26:40 +0100 |
4 | Subject: [PATCH] sdksyms.sh: Make sdksyms.sh work with gcc5. | ||
5 | |||
6 | gcc5's cpp inserts patterns like this: | ||
7 | |||
8 | extern | ||
9 | niro | 2576 | __attribute__((visibility("default"))) |
10 | niro | 2575 | int WaitForSomething(int * |
11 | ); | ||
12 | |||
13 | This patch make sdksyms.sh work with this. Note my awk skills are weak, so | ||
14 | there likely is a better way to deal with this. | ||
15 | |||
16 | niro | 2576 | Signed-off-by: Hans de Goede <hdegoede@redhat.com> |
17 | --- | ||
18 | niro | 2575 | hw/xfree86/sdksyms.sh | 17 +++++++++++++++++ |
19 | 1 file changed, 17 insertions(+) | ||
20 | |||
21 | diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh | ||
22 | index 2305073..99b0cae 100755 | ||
23 | niro | 2576 | --- a/hw/xfree86/sdksyms.sh |
24 | +++ b/hw/xfree86/sdksyms.sh | ||
25 | @@ -350,6 +350,23 @@ BEGIN { | ||
26 | niro | 2575 | if (sdk) { |
27 | n = 3; | ||
28 | |||
29 | niro | 2576 | + # detect the following gcc5 cpp pattern and skip it: |
30 | + # extern | ||
31 | + # # 320 "../../include/os.h" 3 4 | ||
32 | + # __attribute__((visibility("default"))) | ||
33 | + # # 320 "../../include/os.h" | ||
34 | + # Note in this case the "extern " or "extern void " always has | ||
35 | + # a trailing space | ||
36 | + if ($0 ~ "^extern.* $") { | ||
37 | + getline; | ||
38 | + getline; | ||
39 | + getline; | ||
40 | + getline; | ||
41 | + n = 1; | ||
42 | + while ($n == " ") | ||
43 | + n++; | ||
44 | + } | ||
45 | + | ||
46 | niro | 2575 | # skip attribute, if any |
47 | while ($n ~ /^(__attribute__|__global)/ || | ||
48 | # skip modifiers, if any | ||
49 | niro | 2576 | -- |
50 | niro | 2575 | 2.1.0 |
51 |