1
0

- u_symbols-Fix-sdksyms.sh-to-cope-with-gcc5.patch

Fix sdksyms.sh to work with gcc5 (bnc#916580).

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=557
This commit is contained in:
Egbert Eich 2015-02-06 15:02:40 +00:00 committed by Git OBS Bridge
parent 0de1ccd95c
commit b34ff9ee52
3 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,47 @@
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(...)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Feb 6 14:39:07 UTC 2015 - eich@suse.com
- u_symbols-Fix-sdksyms.sh-to-cope-with-gcc5.patch
Fix sdksyms.sh to work with gcc5 (bnc#916580).
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Feb 5 16:32:50 UTC 2015 - tobias.johannes.klausmann@mni.thm.de Thu Feb 5 16:32:50 UTC 2015 - tobias.johannes.klausmann@mni.thm.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package xorg-x11-server # spec file for package xorg-x11-server
# #
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -160,6 +160,7 @@ Patch106: u_exa-only-draw-valid-trapezoids.patch
Patch110: u_connection-avoid-crash-when-CloseWellKnownConnections-gets-called-twice.patch Patch110: u_connection-avoid-crash-when-CloseWellKnownConnections-gets-called-twice.patch
Patch111: u_CloseConsole-Don-t-report-FatalError-when-shutting-down.patch Patch111: u_CloseConsole-Don-t-report-FatalError-when-shutting-down.patch
Patch112: u_render-Cast-color-masks-to-unsigned-long-before-shifting-them.patch Patch112: u_render-Cast-color-masks-to-unsigned-long-before-shifting-them.patch
Patch113: u_symbols-Fix-sdksyms.sh-to-cope-with-gcc5.patch
Patch1000: n_xserver-optimus-autoconfig-hack.patch Patch1000: n_xserver-optimus-autoconfig-hack.patch
@ -247,6 +248,7 @@ cp %{SOURCE90} .
%patch110 -p1 %patch110 -p1
%patch111 -p1 %patch111 -p1
%patch112 -p1 %patch112 -p1
%patch113 -p1
%patch1000 -p1 %patch1000 -p1