In headers, the symbols exported from Xorg are declared as
  "extern _X_EXPORT type name [...]".

In 3dad57b1 ("sdksyms: Tighten up the symbols we add to the magic table"),
a check has been inserted that ensures the word at the index matches the
_X_EXPORT expansion.

With GCC 5, the "skip line numbers" loop will reassign the index, and
the check works as intended.

With GCC 4 and below, the expanded declaration is put on a single line,
the initial index is off by one, the check will look at the type
instead, never pass, and the build breaks.

Fixes: b1dac41f ('Use libtool convenience libraries and better "symbol" table')
Signed-off-by: Mihail Konev <[email protected]>
---

v2a: Fix GCC 4 paragraph: "when extern and type are on the same line" ->
     "expansion is put on a single line".

 hw/xfree86/sdksyms.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
index 767ce2181d5f..0139a5077516 100755
--- a/hw/xfree86/sdksyms.sh
+++ b/hw/xfree86/sdksyms.sh
@@ -348,7 +348,7 @@ BEGIN {
 
 /^extern[      ]/  {
     if (sdk) {
-       n = 3;
+       n = 2;
 
         # skip line numbers GCC 5 adds before __attribute__
         while ($n == "" || $0 ~ /^# [0-9]+ "/) {
-- 
2.9.2

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to