0012-Adjust-to-changes-in-GCC-11.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 5a5656920c6b49902ae0da6a0da84efe6e5a66f0 Mon Sep 17 00:00:00 2001
  2. From: Boris Kolpackov <boris@codesynthesis.com>
  3. Date: Wed, 31 Mar 2021 10:45:21 +0200
  4. Subject: [PATCH] Adjust to changes in GCC 11
  5. [Upstream: 61d80f051293a7449a09081f60f48b8377bfbbad]
  6. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  7. ---
  8. odb/gcc.hxx | 20 ++++++++++++++++++++
  9. 1 file changed, 20 insertions(+)
  10. diff --git a/odb/gcc.hxx b/odb/gcc.hxx
  11. index fb6a1bf..d8ad590 100644
  12. --- a/odb/gcc.hxx
  13. +++ b/odb/gcc.hxx
  14. @@ -164,6 +164,7 @@ gcc_tree_code_name (gcc_tree_code_type tc) {return tree_code_name[tc];}
  15. // In GCC 9:
  16. //
  17. // INCLUDED_FROM Became linemap_included_from_linemap().
  18. +//
  19. // LAST_SOURCE_LINE Was removed apparently as no longer used. Studying
  20. // the line-map.h diff from 8.3 suggests that the old
  21. // implementation should still work.
  22. @@ -193,4 +194,23 @@ LAST_SOURCE_LINE (const line_map_ordinary* map)
  23. #endif
  24. +// In GCC 11:
  25. +//
  26. +// lookup_qualified_name() has a new interface.
  27. +//
  28. +// DECL_IS_BUILTIN became DECL_IS_UNDECLARED_BUILTIN.
  29. +//
  30. +#if BUILDING_GCC_MAJOR >= 11
  31. +
  32. +inline tree
  33. +lookup_qualified_name (tree scope, tree name, bool type, bool complain)
  34. +{
  35. + return lookup_qualified_name (
  36. + scope, name, (type ? LOOK_want::TYPE : LOOK_want::NORMAL), complain);
  37. +}
  38. +
  39. +#define DECL_IS_BUILTIN(decl) DECL_IS_UNDECLARED_BUILTIN(decl)
  40. +
  41. +#endif
  42. +
  43. #endif // ODB_GCC_HXX
  44. --
  45. 2.34.1