1
0
xorg-x11-server/u_symbols-Fix-sdksyms.sh-to-cope-with-gcc5.patch

48 lines
1.4 KiB
Diff

From: Egbert Eich <eich@suse.de>
Date: Fri Feb 6 14:56:57 2015 +0100
Subject: [PATCH]symbols: Fix sdksyms.sh to cope with gcc5
Patch-mainline: to be upstreamed
References: bnc#916580
Signed-off-by: Egbert Eich <eich@suse.com>
Gcc5 adds additional lines stating line numbers before and
after __attribute__() which need to be skipped.
Signed-off-by: Egbert Eich <eich@suse.de>
---
hw/xfree86/sdksyms.sh | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index d9a4478..2936669 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -353,13 +353,25 @@ BEGIN {
if (sdk) {
n = 3;
+ # skip line numbers GCC 5 adds before __attribute__
+ while ($n == "" || $0 ~ /^# [0-9]+ "/) {
+ getline;
+ n = 1;
+ }
+
# skip attribute, if any
while ($n ~ /^(__attribute__|__global)/ ||
# skip modifiers, if any
$n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ ||
# skip pointer
- $n ~ /^[a-zA-Z0-9_]*\*$/)
+ $n ~ /^[a-zA-Z0-9_]*\*$/) {
n++;
+ # skip line numbers GCC 5 adds after __attribute__
+ while ($n == "" || $0 ~ /^# [0-9]+ "/) {
+ getline;
+ n = 1;
+ }
+ }
# type specifier may not be set, as in
# extern _X_EXPORT unsigned name(...)