0009-tools-clang-scripts-add-RISCV-as-one-of-the-llvm-tar.patch 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. From da9353ac4fa80dcc4ce28a7a34e65248069e12d3 Mon Sep 17 00:00:00 2001
  2. From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  3. Date: Wed, 22 Jun 2022 07:59:07 +0000
  4. Subject: [PATCH 09/51] tools: clang: scripts: add RISCV as one of the llvm
  5. targets to build
  6. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  7. ---
  8. tools/clang/scripts/build.py | 5 ++++-
  9. tools/clang/scripts/update.py | 2 +-
  10. 2 files changed, 5 insertions(+), 2 deletions(-)
  11. diff --git a/tools/clang/scripts/build.py b/tools/clang/scripts/build.py
  12. index a68eb85b25a1..299d3755d1a9 100755
  13. --- a/tools/clang/scripts/build.py
  14. +++ b/tools/clang/scripts/build.py
  15. @@ -612,7 +612,7 @@ def main():
  16. cxxflags = []
  17. ldflags = []
  18. - targets = 'AArch64;ARM;Mips;PowerPC;SystemZ;WebAssembly;X86'
  19. + targets = 'AArch64;ARM;Mips;PowerPC;RISCV;SystemZ;WebAssembly;X86'
  20. projects = 'clang;compiler-rt;lld;clang-tools-extra'
  21. @@ -986,6 +986,9 @@ def main():
  22. if platform.machine() == 'aarch64':
  23. cmake_args.append(
  24. '-DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-unknown-linux-gnu')
  25. + elif platform.machine() == 'riscv64':
  26. + cmake_args.append(
  27. + '-DLLVM_DEFAULT_TARGET_TRIPLE=riscv64-unknown-linux-gnu')
  28. else:
  29. cmake_args.append('-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu')
  30. cmake_args.append('-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON')
  31. diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
  32. index ceeeedc42d9f..8cf820d7d1f5 100755
  33. --- a/tools/clang/scripts/update.py
  34. +++ b/tools/clang/scripts/update.py
  35. @@ -36,7 +36,7 @@ import zlib
  36. # Reverting problematic clang rolls is safe, though.
  37. # This is the output of `git describe` and is usable as a commit-ish.
  38. CLANG_REVISION = 'llvmorg-15-init-3677-g8133778d'
  39. -CLANG_SUB_REVISION = 4
  40. +CLANG_SUB_REVISION = 5
  41. PACKAGE_VERSION = '%s-%s' % (CLANG_REVISION, CLANG_SUB_REVISION)
  42. RELEASE_VERSION = '15.0.0'
  43. --
  44. 2.25.1