Allow vendor (redhat) triplet for riscv64

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2024-03-28 13:26:10 +02:00
parent 9912950ca3
commit 530d8ffdcc
Signed by: davidlt
GPG Key ID: 7A5F42FAF91FACC3
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From cabe78b47111a6e8935d9ca29bc31f63d8e3b290 Mon Sep 17 00:00:00 2001
From: David Abdurachmanov <davidlt@rivosinc.com>
Date: Thu, 28 Mar 2024 11:21:44 +0000
Subject: [PATCH] riscv use vendor triplet
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
---
clang/lib/Driver/ToolChains/Gnu.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
index f4c9bcb5..3bdd2f2d 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
@@ -2558,7 +2558,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",
--
2.44.0

View File

@ -78,7 +78,7 @@
Name: %pkg_name
Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
Release: 1.0.riscv64%{?dist}
Release: 1.1.riscv64%{?dist}
Summary: A C language family front-end for LLVM
License: Apache-2.0 WITH LLVM-exception OR NCSA
@ -106,6 +106,9 @@ Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch
# More info is available here: https://reviews.llvm.org/D159115#4641826
Patch5: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch
# RISCV vendor triplet
Path6: 0001-riscv-use-vendor-triplet.patch
# RHEL specific patches
# Avoid unwanted dependency on python-myst-parser
Patch101: 0009-disable-myst-parser.patch
@ -708,6 +711,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C %{__cmake
%endif
%changelog
* Thu Mar 28 2024 David Abdurachmanov <davidlt@rivosinc.com> - 18.1.1-1.1.riscv64
- Allow vendor triplet for riscv64
* Wed Mar 27 2024 David Abdurachmanov <davidlt@rivosinc.com> - 18.1.1-1.0.riscv64
- Add support for riscv64