[clang] [Driver] Add missing triplet to RISCV64Triples (PR #164614)
Andreas Schwab via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 16 03:23:30 PST 2026
https://github.com/andreas-schwab updated https://github.com/llvm/llvm-project/pull/164614
>From bfe423eee9b10cb83c970bb6d5073184f97fb1d7 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab at suse.de>
Date: Mon, 20 Oct 2025 14:20:19 +0200
Subject: [PATCH] [Driver] Add missing triple to RISCV64Triples
Fixes #164228
---
clang/lib/Driver/ToolChains/Gnu.cpp | 4 ++--
clang/test/Driver/linux-ld.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index d8d537ec14b89..23d9c5b455516 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2438,8 +2438,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
static const char *const RISCV32Triples[] = {"riscv32-unknown-linux-gnu",
"riscv32-unknown-elf"};
static const char *const RISCV64LibDirs[] = {"/lib64", "/lib"};
- static const char *const RISCV64Triples[] = {"riscv64-unknown-linux-gnu",
- "riscv64-unknown-elf"};
+ static const char *const RISCV64Triples[] = {
+ "riscv64-unknown-linux-gnu", "riscv64-suse-linux", "riscv64-unknown-elf"};
static const char *const RISCV32beLibDirs[] = {"/lib32", "/lib"};
static const char *const RISCV32beTriples[] = {"riscv32be-unknown-linux-gnu",
diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c
index be3293cdc253e..9da0b79aa587e 100644
--- a/clang/test/Driver/linux-ld.c
+++ b/clang/test/Driver/linux-ld.c
@@ -711,7 +711,7 @@
// RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_riscv64_tree \
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-RISCV64 %s
// RUN: %clang -### %s -no-pie 2>&1 \
-// RUN: --target=riscv64-suse-linux -rtlib=platform --unwindlib=platform \
+// RUN: --target=riscv64-unknown-linux-gnu -rtlib=platform --unwindlib=platform \
// RUN: --sysroot=%S/Inputs/opensuse_tumbleweed_riscv64_tree \
// RUN: | FileCheck --check-prefix=CHECK-OPENSUSE-TW-RISCV64 %s
// CHECK-OPENSUSE-TW-RISCV64: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
More information about the cfe-commits
mailing list