0001-Fix-build-with-clang-using-external-assembler.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From 2f6026cb8b16cf00726e3c5625c023f196680f07 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Fri, 17 Mar 2017 12:52:08 -0700
  4. Subject: [PATCH] Fix build with clang using external assembler
  5. Cherry-picked from
  6. https://github.com/openssl/openssl/commit/11208dcfb9105e8afa37233185decefd45e89e17
  7. https://github.com/openssl/openssl/commit/fbab8baddef8d3346ae40ff068871e2ddaf10270
  8. https://github.com/openssl/openssl/commit/6cf412c473d8145562b76219ce3da73b201b3255
  9. Fixes
  10. | ghash-armv4.S: Assembler messages:
  11. | ghash-armv4.S:81: Error: bad instruction `ldrbpl r12,[r2,r3]'
  12. | ghash-armv4.S:91: Error: bad instruction `ldrbpl r8,[r0,r3]'
  13. | ghash-armv4.S:137: Error: bad instruction `ldrbne r12,[r2,#15]'
  14. | ghash-armv4.S:224: Error: bad instruction `ldrbpl r12,[r0,r3]'
  15. | clang-4.0: error: assembler command failed with exit code 1 (use -v to see invocation)
  16. | make[2]: *** [<builtin>: ghash-armv4.o] Error 1
  17. Upstream-Status: Backport
  18. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  19. ---
  20. crypto/modes/asm/ghash-armv4.pl | 7 +++++++
  21. 1 file changed, 7 insertions(+)
  22. diff --git a/crypto/modes/asm/ghash-armv4.pl b/crypto/modes/asm/ghash-armv4.pl
  23. index 8ccc963ef..442fed4da 100644
  24. --- a/crypto/modes/asm/ghash-armv4.pl
  25. +++ b/crypto/modes/asm/ghash-armv4.pl
  26. @@ -124,7 +124,10 @@ $code=<<___;
  27. #include "arm_arch.h"
  28. .text
  29. +#if defined(__thumb2__) || defined(__clang__)
  30. +.syntax unified
  31. +#endif
  32. .code 32
  33. #ifdef __clang__
  34. #define ldrplb ldrbpl
  35. --
  36. 2.12.0