0013-src-corelib-arch-qatomic_arm.h-fix-build-on-ARMv8-32.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 2281fa50f6e13278d3fd4f028377b8249b7b3cdb Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Fri, 8 Sep 2017 09:06:54 +0200
  4. Subject: [PATCH] src/corelib/arch/qatomic_arm.h: fix build on ARMv8 32-bit
  5. The Qt build fails on ARMv8 32-bit because it falls back to using the
  6. ARMv5 code that uses the swp instruction, which no longer exists:
  7. /tmp/ccSxVIzw.s: Assembler messages:
  8. /tmp/ccSxVIzw.s:127: Error: swp{b} use is obsoleted for ARMv8 and later
  9. /tmp/ccSxVIzw.s:190: Error: swp{b} use is obsoleted for ARMv8 and later
  10. So, this commit adjusts the ARM atomic code to assume ARMv8 is similar
  11. to ARMv7.
  12. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  13. ---
  14. src/corelib/arch/qatomic_arm.h | 3 ++-
  15. 1 file changed, 2 insertions(+), 1 deletion(-)
  16. diff --git a/src/corelib/arch/qatomic_arm.h b/src/corelib/arch/qatomic_arm.h
  17. index 77cd66f272..e011929d3e 100644
  18. --- a/src/corelib/arch/qatomic_arm.h
  19. +++ b/src/corelib/arch/qatomic_arm.h
  20. @@ -47,7 +47,8 @@ QT_BEGIN_HEADER
  21. #if defined(__ARM_ARCH_7__) \
  22. || defined(__ARM_ARCH_7A__) \
  23. || defined(__ARM_ARCH_7R__) \
  24. - || defined(__ARM_ARCH_7M__)
  25. + || defined(__ARM_ARCH_7M__) \
  26. + || defined(__ARM_ARCH_8A__)
  27. # define QT_ARCH_ARMV7
  28. QT_BEGIN_INCLUDE_HEADER
  29. # include "QtCore/qatomic_armv7.h"
  30. --
  31. 2.13.5