0001-sdksyms-gcc5.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 21b896939c5bb242f3aacc37baf12379e43254b6 Mon Sep 17 00:00:00 2001
  2. From: Egbert Eich <eich@freedesktop.org>
  3. Date: Tue, 3 Mar 2015 16:27:05 +0100
  4. Subject: symbols: Fix sdksyms.sh to cope with gcc5
  5. Gcc5 adds additional lines stating line numbers before and
  6. after __attribute__() which need to be skipped.
  7. Downloaded from upstream commit
  8. https://cgit.freedesktop.org/xorg/xserver/commit/hw/xfree86/sdksyms.sh?id=21b896939c5bb242f3aacc37baf12379e43254b6
  9. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  10. Signed-off-by: Egbert Eich <eich@freedesktop.org>
  11. Tested-by: Daniel Stone <daniels@collabora.com>
  12. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  13. diff --git a/hw/xfree86/sdksyms.sh b/hw/xfree86/sdksyms.sh
  14. index 2305073..05ac410 100755
  15. --- a/hw/xfree86/sdksyms.sh
  16. +++ b/hw/xfree86/sdksyms.sh
  17. @@ -350,13 +350,25 @@ BEGIN {
  18. if (sdk) {
  19. n = 3;
  20. + # skip line numbers GCC 5 adds before __attribute__
  21. + while ($n == "" || $0 ~ /^# [0-9]+ "/) {
  22. + getline;
  23. + n = 1;
  24. + }
  25. +
  26. # skip attribute, if any
  27. while ($n ~ /^(__attribute__|__global)/ ||
  28. # skip modifiers, if any
  29. $n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ ||
  30. # skip pointer
  31. - $n ~ /^[a-zA-Z0-9_]*\*$/)
  32. + $n ~ /^[a-zA-Z0-9_]*\*$/) {
  33. n++;
  34. + # skip line numbers GCC 5 adds after __attribute__
  35. + while ($n == "" || $0 ~ /^# [0-9]+ "/) {
  36. + getline;
  37. + n = 1;
  38. + }
  39. + }
  40. # type specifier may not be set, as in
  41. # extern _X_EXPORT unsigned name(...)
  42. --
  43. cgit v0.10.2