0013-fix-compiling-error-when-march-not-include-b-ext.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 66b5c3e50b1acf0a4cb7cdaf7ddad7c7f8e2c3b8 Mon Sep 17 00:00:00 2001
  2. From: "demin.han" <demin.han@starfivetech.com>
  3. Date: Mon, 31 Oct 2022 11:20:22 +0800
  4. Subject: [PATCH 13/19] fix compiling error when -march not include b ext
  5. ---
  6. sysdeps/riscv/rv64/multiarch/memchr_as.S | 4 +++-
  7. sysdeps/riscv/rv64/multiarch/memrchr.S | 2 ++
  8. 2 files changed, 5 insertions(+), 1 deletion(-)
  9. diff --git a/sysdeps/riscv/rv64/multiarch/memchr_as.S b/sysdeps/riscv/rv64/multiarch/memchr_as.S
  10. index e614630a4d..aa6c22a3d0 100644
  11. --- a/sysdeps/riscv/rv64/multiarch/memchr_as.S
  12. +++ b/sysdeps/riscv/rv64/multiarch/memchr_as.S
  13. @@ -19,6 +19,8 @@
  14. #include <sysdep.h>
  15. +.option arch, +zbb
  16. +
  17. .macro chr_8B
  18. ld a4, 0(a0)
  19. xor a4, a4, a1
  20. @@ -105,4 +107,4 @@ ENTRY (memchr)
  21. add a0, a0, a3
  22. ret
  23. END (memchr)
  24. -libc_hidden_builtin_def (memchr)
  25. \ No newline at end of file
  26. +libc_hidden_builtin_def (memchr)
  27. diff --git a/sysdeps/riscv/rv64/multiarch/memrchr.S b/sysdeps/riscv/rv64/multiarch/memrchr.S
  28. index c6db183163..01c2d949de 100644
  29. --- a/sysdeps/riscv/rv64/multiarch/memrchr.S
  30. +++ b/sysdeps/riscv/rv64/multiarch/memrchr.S
  31. @@ -19,6 +19,8 @@
  32. #include <sysdep.h>
  33. +.option arch, +zbb
  34. +
  35. .macro chr_8B
  36. ld a4, -8(a0)
  37. xor a4, a4, a1
  38. --
  39. 2.25.1