1 Upstream-Status: Backport
2 Signed-off-by: Ross Burton <ross.burton@intel.com>
4 From 21b896939c5bb242f3aacc37baf12379e43254b6 Mon Sep 17 00:00:00 2001
5 From: Egbert Eich <eich@freedesktop.org>
6 Date: Tue, 3 Mar 2015 16:27:05 +0100
7 Subject: symbols: Fix sdksyms.sh to cope with gcc5
9 Gcc5 adds additional lines stating line numbers before and
10 after __attribute__() which need to be skipped.
12 Signed-off-by: Egbert Eich <eich@freedesktop.org>
13 Tested-by: Daniel Stone <daniels@collabora.com>
14 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
16 diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
17 index 2305073..05ac410 100755
18 --- a/hw/xfree86/sdksyms.sh
19 +++ b/hw/xfree86/sdksyms.sh
20 @@ -350,13 +350,25 @@ BEGIN {
24 + # skip line numbers GCC 5 adds before __attribute__
25 + while ($n == "" || $0 ~ /^# [0-9]+ "/) {
30 # skip attribute, if any
31 while ($n ~ /^(__attribute__|__global)/ ||
32 # skip modifiers, if any
33 $n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ ||
35 - $n ~ /^[a-zA-Z0-9_]*\*$/)
36 + $n ~ /^[a-zA-Z0-9_]*\*$/) {
38 + # skip line numbers GCC 5 adds after __attribute__
39 + while ($n == "" || $0 ~ /^# [0-9]+ "/) {
45 # type specifier may not be set, as in
46 # extern _X_EXPORT unsigned name(...)