1
0

001-gcc5.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  2. Date: Mon, 16 Mar 2015 17:40:12 +0000 (-0400)
  3. Subject: Avoid breakage with gcc 5
  4. X-Git-Tag: libgpg-error-1.19~7
  5. X-Git-Url: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commitdiff_plain;h=c01c8f0c4f55d76b037c7f6aa44ad25ede18d38a
  6. Avoid breakage with gcc 5
  7. * src/Makefile.am: Add -P to the C preprocessor when building
  8. mkerrcodes.h, to avoid a noisy intermediate pipeline.
  9. --
  10. With gcc 5 without this patch, we see many errors like the following:
  11. gcc -I. -I. -o mkerrcodes ./mkerrcodes.c
  12. In file included from ./mkerrcodes.c:26:0:
  13. ./mkerrcodes.h:9:5: error: expected expression before ‘,’ token
  14. { , "GPG_ERR_E2BIG" },
  15. ^
  16. ./mkerrcodes.h:10:5: error: expected expression before ‘,’ token
  17. { , "GPG_ERR_EACCES" },
  18. ^
  19. This patch cleans up the generated mkerrcodes.h by making the
  20. intermediate stage clean for all the versions of gcc i tested (4.x and
  21. 5).
  22. Debian-Bug-Id: 777374
  23. Signed-Off-By: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  24. ---
  25. --- a/src/Makefile.am
  26. +++ b/src/Makefile.am
  27. @@ -140,7 +140,7 @@ code-to-errno.h: Makefile mkerrnos.awk e
  28. # It is correct to use $(CPP). We want the host's idea of the error codes.
  29. mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
  30. $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
  31. - $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
  32. + $(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
  33. $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
  34. -rm _$@
  35. --- a/src/Makefile.in
  36. +++ b/src/Makefile.in
  37. @@ -979,7 +979,7 @@ code-to-errno.h: Makefile mkerrnos.awk e
  38. # It is correct to use $(CPP). We want the host's idea of the error codes.
  39. mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers)
  40. $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@
  41. - $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \
  42. + $(CPP) $(CPPFLAGS) $(extra_cppflags) -P _$@ | grep GPG_ERR_ | \
  43. $(AWK) -f $(srcdir)/mkerrcodes.awk >$@
  44. -rm _$@