Magellan Linux

Annotation of /trunk/xorg-server/patches/xorg-server-1.16.4-gcc5.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2700 - (hide annotations) (download)
Wed Sep 23 08:30:11 2015 UTC (8 years, 7 months ago) by niro
File size: 1335 byte(s)
-fix ftbfs with gcc5
1 niro 2700 From 612eb45a2e7a0b35cc3790870e6d0cc42eb50c74 Mon Sep 17 00:00:00 2001
2     From: Hans de Goede <hdegoede@redhat.com>
3     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     __attribute__((visibility("default")))
10     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     Signed-off-by: Hans de Goede <hdegoede@redhat.com>
17     ---
18     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     --- a/hw/xfree86/sdksyms.sh
24     +++ b/hw/xfree86/sdksyms.sh
25     @@ -350,6 +350,23 @@ BEGIN {
26     if (sdk) {
27     n = 3;
28    
29     + # 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     # skip attribute, if any
47     while ($n ~ /^(__attribute__|__global)/ ||
48     # skip modifiers, if any
49     --
50     2.1.0
51