0001-angle.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From ed00a14f6501b48d2cf24df1642d49653ddc77ff Mon Sep 17 00:00:00 2001
  2. From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  3. Date: Mon, 25 Jul 2022 09:44:05 +0800
  4. Subject: [PATCH] add riscv64 architecture detection
  5. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  6. ---
  7. gni/angle.gni | 2 +-
  8. src/common/platform.h | 2 +-
  9. 2 files changed, 2 insertions(+), 2 deletions(-)
  10. diff --git a/gni/angle.gni b/gni/angle.gni
  11. index 01d260427..7229ec1af 100644
  12. --- a/gni/angle.gni
  13. +++ b/gni/angle.gni
  14. @@ -74,7 +74,7 @@ declare_args() {
  15. if (current_cpu == "arm64" || current_cpu == "x64" ||
  16. current_cpu == "mips64el" || current_cpu == "s390x" ||
  17. - current_cpu == "ppc64") {
  18. + current_cpu == "ppc64" || current_cpu == "riscv64") {
  19. angle_64bit_current_cpu = true
  20. } else if (current_cpu == "arm" || current_cpu == "x86" ||
  21. current_cpu == "mipsel" || current_cpu == "s390" ||
  22. diff --git a/src/common/platform.h b/src/common/platform.h
  23. index c39c7e040..0e35bbdea 100644
  24. --- a/src/common/platform.h
  25. +++ b/src/common/platform.h
  26. @@ -102,7 +102,7 @@
  27. #endif
  28. // Mips and arm devices need to include stddef for size_t.
  29. -#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
  30. +#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64)
  31. # include <stddef.h>
  32. #endif
  33. --
  34. 2.30.2