0001-third-party-angle.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. diff --git a/BUILD.gn b/BUILD.gn
  2. index 7bbf13c99..be55d871f 100644
  3. --- a/BUILD.gn
  4. +++ b/BUILD.gn
  5. @@ -244,7 +244,13 @@ config("extra_warnings") {
  6. "-Wstrict-prototypes",
  7. "-Wunreachable-code-aggressive",
  8. "-Wshorten-64-to-32",
  9. +
  10. + # Workaround for clang unable to locate pci/pci.h header
  11. + "-I../../build/linux/debian_sid_riscv64-sysroot/usr/include/riscv64-linux-gnu",
  12. ]
  13. +
  14. + # Workaround for linker unable to locate X11 related header
  15. + ldflags = [ "-Wl,-L../../build/linux/debian_sid_riscv64-sysroot/usr/lib/riscv64-linux-gnu" ]
  16. }
  17. if (is_gcc) {
  18. diff --git a/gni/angle.gni b/gni/angle.gni
  19. index 09acabb4a..14ba84aac 100644
  20. --- a/gni/angle.gni
  21. +++ b/gni/angle.gni
  22. @@ -77,7 +77,8 @@ declare_args() {
  23. if (current_cpu == "arm64" || current_cpu == "x64" ||
  24. current_cpu == "mips64el" || current_cpu == "s390x" ||
  25. - current_cpu == "ppc64" || current_cpu == "loong64") {
  26. + current_cpu == "ppc64" || current_cpu == "loong64" ||
  27. + current_cpu == "riscv64") {
  28. angle_64bit_current_cpu = true
  29. } else if (current_cpu == "arm" || current_cpu == "x86" ||
  30. current_cpu == "mipsel" || current_cpu == "s390" ||
  31. diff --git a/src/common/platform.h b/src/common/platform.h
  32. index c39c7e040..792c854c3 100644
  33. --- a/src/common/platform.h
  34. +++ b/src/common/platform.h
  35. @@ -101,8 +101,8 @@
  36. # define ANGLE_USE_SSE
  37. #endif
  38. -// Mips and arm devices need to include stddef for size_t.
  39. -#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
  40. +// Mips and arm and riscv devices need to include stddef for size_t.
  41. +#if defined(__mips__) || defined(__arm__) || defined(__aarch64__) || (defined(__riscv) && __riscv_xlen == 64)
  42. # include <stddef.h>
  43. #endif