boost-0003-fix-64bit-build-with-recent-gcc.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. Patch for recent versions of glibc which always assume int64_t support.
  2. Fixes compilation error with aarch64 target:
  3. ./boost/atomic/atomic.hpp: At global scope:
  4. ./boost/atomic/atomic.hpp:202:16: error: 'uintptr_t' was not declared in this scope
  5. typedef atomic<uintptr_t> atomic_uintptr_t;
  6. ^
  7. ./boost/atomic/atomic.hpp:202:25: error: template argument 1 is invalid
  8. typedef atomic<uintptr_t> atomic_uintptr_t;
  9. ^
  10. ./boost/atomic/atomic.hpp:202:43: error: invalid type in declaration before ';' token
  11. typedef atomic<uintptr_t> atomic_uintptr_t;
  12. ^
  13. Reported here: https://svn.boost.org/trac/boost/ticket/8973
  14. Fix reported here: https://svn.boost.org/trac/boost/ticket/8731
  15. Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
  16. Backported-from: https://svn.boost.org/trac/boost/changeset/84950
  17. --- a/boost/cstdint.hpp (revision 84805)
  18. +++ b/boost/cstdint.hpp (revision 84950)
  19. @@ -42,5 +42,8 @@
  20. // See https://svn.boost.org/trac/boost/ticket/3548 and http://sources.redhat.com/bugzilla/show_bug.cgi?id=10990
  21. //
  22. -#if defined(BOOST_HAS_STDINT_H) && (!defined(__GLIBC__) || defined(__GLIBC_HAVE_LONG_LONG))
  23. +#if defined(BOOST_HAS_STDINT_H) \
  24. + && (!defined(__GLIBC__) \
  25. + || defined(__GLIBC_HAVE_LONG_LONG) \
  26. + || (defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 17)))))
  27. // The following #include is an implementation artifact; not part of interface.