]> code.ossystems Code Review - openembedded-core.git/blob
215c0441136c6466740d41dcfbf22693c8e40cdb
[openembedded-core.git] /
1 Upstream-Status: Pending
2
3 From 612eb45a2e7a0b35cc3790870e6d0cc42eb50c74 Mon Sep 17 00:00:00 2001
4 From: Hans de Goede <hdegoede@redhat.com>
5 Date: Wed, 11 Feb 2015 16:26:40 +0100
6 Subject: [PATCH] sdksyms.sh: Make sdksyms.sh work with gcc5.
7
8 gcc5's cpp inserts patterns like this:
9
10 extern
11       __attribute__((visibility("default")))
12                 int WaitForSomething(int *
13     );
14
15 This patch make sdksyms.sh work with this. Note my awk skills are weak, so
16 there likely is a better way to deal with this.
17
18 Signed-off-by: Hans de Goede <hdegoede@redhat.com>
19 ---
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) {
29         n = 3;
30  
31 +       # detect the following gcc5 cpp pattern and skip it:
32 +       # extern
33 +       # # 320 "../../include/os.h" 3 4
34 +       #     __attribute__((visibility("default")))
35 +       # # 320 "../../include/os.h"
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 +
48         # skip attribute, if any
49         while ($n ~ /^(__attribute__|__global)/ ||
50             # skip modifiers, if any