From 5a4139029ef3da43941ae156f067f07f9bbbc203 Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Thu, 24 Nov 2022 06:29:44 +0200 Subject: [PATCH] Bring back riscv64-redhat-linux triplet Signed-off-by: David Abdurachmanov --- ...ng-back-riscv64-redhat-linux-triplet.patch | 27 +++++++++++++++++++ clang.spec | 3 +++ 2 files changed, 30 insertions(+) create mode 100644 0001-Bring-back-riscv64-redhat-linux-triplet.patch diff --git a/0001-Bring-back-riscv64-redhat-linux-triplet.patch b/0001-Bring-back-riscv64-redhat-linux-triplet.patch new file mode 100644 index 0000000..0cfd630 --- /dev/null +++ b/0001-Bring-back-riscv64-redhat-linux-triplet.patch @@ -0,0 +1,27 @@ +From 2dcf8703706e0a5b7b45991e5cd10dd38f1d8c4b Mon Sep 17 00:00:00 2001 +From: David Abdurachmanov +Date: Thu, 24 Nov 2022 06:26:46 +0200 +Subject: [PATCH] Bring back riscv64-redhat-linux triplet + +Signed-off-by: David Abdurachmanov +--- + lib/Driver/ToolChains/Gnu.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp +index e955835b..e5c17544 100644 +--- a/lib/Driver/ToolChains/Gnu.cpp ++++ b/lib/Driver/ToolChains/Gnu.cpp +@@ -2302,7 +2302,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.37.1 + diff --git a/clang.spec b/clang.spec index 351d03a..c654f8e 100644 --- a/clang.spec +++ b/clang.spec @@ -70,6 +70,8 @@ Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch # TODO: Can be dropped in LLVM 16: https://reviews.llvm.org/D133316 Patch6: 0001-Mark-fopenmp-implicit-rpath-as-NoArgumentUnused.patch +Patch10: 0001-Bring-back-riscv64-redhat-linux-triplet.patch + %if %{without compat_build} # Patches for clang-tools-extra # See https://reviews.llvm.org/D120301 @@ -598,6 +600,7 @@ false * Thu Nov 24 2022 David Abdurachmanov - 15.0.4-1.0.riscv64 - Ignore test suite failures on riscv64 for now - Prepare for riscv64 +- Add riscv64-redhat-linux triplet * Tue Nov 08 2022 Nikita Popov - 15.0.4-1 - Update to LLVM 15.0.4