You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
2.0 KiB
44 lines
2.0 KiB
From 44bea1c1866d1d8e623f5a17db1bca0ea5abce83 Mon Sep 17 00:00:00 2001
|
|
From: David Abdurachmanov <davidlt@rivosinc.com>
|
|
Date: Mon, 24 Apr 2023 08:28:31 +0000
|
|
Subject: [PATCH] Add support for riscv64
|
|
|
|
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
|
|
---
|
|
clang-16.0.1.src/lib/Driver/ToolChains/Gnu.cpp | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/clang-16.0.1.src/lib/Driver/ToolChains/Gnu.cpp b/clang-16.0.1.src/lib/Driver/ToolChains/Gnu.cpp
|
|
index 8fdf4de4..d682410d 100644
|
|
--- a/clang-16.0.1.src/lib/Driver/ToolChains/Gnu.cpp
|
|
+++ b/clang-16.0.1.src/lib/Driver/ToolChains/Gnu.cpp
|
|
@@ -1994,6 +1994,7 @@ static const char *ConvertToGccTriple(StringRef CandidateTriple) {
|
|
.Case("aarch64-redhat-linux-gnu", "aarch64-redhat-linux")
|
|
.Case("i686-redhat-linux-gnu", "i686-redhat-linux")
|
|
.Case("ppc64le-redhat-linux-gnu", "ppc64le-redhat-linux")
|
|
+ .Case("riscv64-redhat-linux-gnu", "riscv64-redhat-linux")
|
|
.Case("s390x-redhat-linux-gnu", "s390x-redhat-linux")
|
|
.Case("x86_64-redhat-linux-gnu", "x86_64-redhat-linux")
|
|
.Default(NULL);
|
|
@@ -2346,7 +2347,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
|
|
static const char *const RISCV64LibDirs[] = {"/lib64", "/lib"};
|
|
static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu",
|
|
"riscv64-linux-gnu",
|
|
- "riscv64-unknown-elf"};
|
|
+ "riscv64-unknown-elf",
|
|
+ "riscv64-redhat-linux"};
|
|
|
|
static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
|
|
static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",
|
|
@@ -2890,6 +2892,7 @@ Generic_GCC::getDefaultUnwindTableLevel(const ArgList &Args) const {
|
|
// rhbz#1655546
|
|
case llvm::Triple::systemz:
|
|
case llvm::Triple::arm:
|
|
+ case llvm::Triple::riscv64:
|
|
return UnwindTableLevel::Asynchronous;
|
|
default:
|
|
return UnwindTableLevel::None;
|
|
--
|
|
2.40.0
|
|
|