From b34ff9ee52bce91ff59f5344b8a24e8fa0101c02b50a5c03846f0cf1858ad27a Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Fri, 6 Feb 2015 15:02:40 +0000 Subject: [PATCH] - 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 --- ...ols-Fix-sdksyms.sh-to-cope-with-gcc5.patch | 47 +++++++++++++++++++ xorg-x11-server.changes | 6 +++ xorg-x11-server.spec | 4 +- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 u_symbols-Fix-sdksyms.sh-to-cope-with-gcc5.patch diff --git a/u_symbols-Fix-sdksyms.sh-to-cope-with-gcc5.patch b/u_symbols-Fix-sdksyms.sh-to-cope-with-gcc5.patch new file mode 100644 index 0000000..8c7e9cb --- /dev/null +++ b/u_symbols-Fix-sdksyms.sh-to-cope-with-gcc5.patch @@ -0,0 +1,47 @@ +From: Egbert Eich +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 + +Gcc5 adds additional lines stating line numbers before and +after __attribute__() which need to be skipped. + +Signed-off-by: Egbert Eich +--- + 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(...) diff --git a/xorg-x11-server.changes b/xorg-x11-server.changes index d7e424e..35c8ea8 100644 --- a/xorg-x11-server.changes +++ b/xorg-x11-server.changes @@ -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 diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 9b8963d..2895eee 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -1,7 +1,7 @@ # # 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 # 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 Patch111: u_CloseConsole-Don-t-report-FatalError-when-shutting-down.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 @@ -247,6 +248,7 @@ cp %{SOURCE90} . %patch110 -p1 %patch111 -p1 %patch112 -p1 +%patch113 -p1 %patch1000 -p1