0001-Kill-compatibility-bits.patch 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From e180a4085d8d2f82a05f037e465708cfc16bd2bf Mon Sep 17 00:00:00 2001
  2. From: Gustavo Zacarias <gustavo@zacarias.com.ar>
  3. Date: Tue, 14 Jun 2016 20:31:12 -0300
  4. Subject: [PATCH] Kill compatibility bits
  5. Kill ABI compatibility bits, we don't need them.
  6. Fixes build failures on non-ELF targets.
  7. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  8. ---
  9. pcrecpp.cc | 16 ----------------
  10. 1 file changed, 16 deletions(-)
  11. diff --git a/pcrecpp.cc b/pcrecpp.cc
  12. index d09c9ab..6910db0 100644
  13. --- a/pcrecpp.cc
  14. +++ b/pcrecpp.cc
  15. @@ -58,22 +58,6 @@ static const int kVecSize = (1 + kMaxArgs) * 3; // results + PCRE workspace
  16. // Special object that stands-in for no argument
  17. Arg RE::no_arg((void*)NULL);
  18. -// This is for ABI compatibility with old versions of pcre (pre-7.6),
  19. -// which defined a global no_arg variable instead of putting it in the
  20. -// RE class. This works on GCC >= 3, at least. It definitely works
  21. -// for ELF, but may not for other object formats (Mach-O, for
  22. -// instance, does not support aliases.) We could probably have a more
  23. -// inclusive test if we ever needed it. (Note that not only the
  24. -// __attribute__ syntax, but also __USER_LABEL_PREFIX__, are
  25. -// gnu-specific.)
  26. -#if defined(__GNUC__) && __GNUC__ >= 3 && defined(__ELF__) && !defined(__INTEL_COMPILER)
  27. -# define ULP_AS_STRING(x) ULP_AS_STRING_INTERNAL(x)
  28. -# define ULP_AS_STRING_INTERNAL(x) #x
  29. -# define USER_LABEL_PREFIX_STR ULP_AS_STRING(__USER_LABEL_PREFIX__)
  30. -extern Arg no_arg
  31. - __attribute__((alias(USER_LABEL_PREFIX_STR "_ZN7pcrecpp2RE6no_argE")));
  32. -#endif
  33. -
  34. // If a regular expression has no error, its error_ field points here
  35. static const string empty_string;
  36. --
  37. 2.7.3