Compare commits

...

2 Commits

Author SHA1 Message Date
00bb775640
Add support for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-04-23 08:17:55 +03:00
Tulio Magno Quites Machado Filho
d12d930c88 Rebuild for LLVM 16.0.0 update 2023-03-27 16:47:55 -03:00
2 changed files with 43 additions and 6 deletions

View File

@ -0,0 +1,27 @@
From 2dcf8703706e0a5b7b45991e5cd10dd38f1d8c4b Mon Sep 17 00:00:00 2001
From: David Abdurachmanov <davidlt@rivosinc.com>
Date: Thu, 24 Nov 2022 06:26:46 +0200
Subject: [PATCH] Bring back riscv64-redhat-linux 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 e955835b..e5c17544 100644
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
+++ b/clang/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

View File

@ -41,7 +41,7 @@
Name: %pkg_name
Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}
Release: 3%{?dist}
Release: 4.0.riscv64%{?dist}
Summary: A C language family front-end for LLVM
License: Apache-2.0 WITH LLVM-exception OR NCSA
@ -75,6 +75,8 @@ Patch8: 0001-clang-Fix-interaction-between-asm-labels-and-inline-.patch
Patch9: 0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch
Patch10: 0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.patch
Patch20: 0001-Bring-back-riscv64-redhat-linux-triplet.patch
%if %{with compat_build}
# Ensure that clang looks for LLVMgold.so in the directory the compat build
# uses.
@ -303,7 +305,7 @@ rm test/CodeGen/profile-filter.c
# Use ThinLTO to limit build time.
%define _lto_cflags -flto=thin
# And disable LTO on AArch64 entirely.
%ifarch aarch64
%ifarch aarch64 riscv64
%define _lto_cflags %{nil}
%endif
@ -313,7 +315,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@/64/g' test/lit.cfg.py
sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
%endif
%ifarch s390 s390x %{arm} aarch64 %ix86 ppc64le
%ifarch s390 s390x %{arm} aarch64 %ix86 ppc64le riscv64
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif
@ -335,7 +337,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPYTHON_EXECUTABLE=%{__python3} \
-DCMAKE_SKIP_RPATH:BOOL=ON \
%ifarch s390 s390x %{arm} %ix86 ppc64le
%ifarch s390 s390x %{arm} %ix86 ppc64le riscv64
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
%endif
@ -483,9 +485,9 @@ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format
%cmake_build --target clang-test-depends \
ExtraToolsUnitTests ClangdUnitTests ClangIncludeCleanerUnitTests ClangPseudoUnitTests
# requires lit.py from LLVM utilities
# FIXME: Fix failing ARM tests
# FIXME: Fix failing ARM & RISCV tests
LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{__cmake_builddir} || \
%ifarch %{arm}
%ifarch %{arm} riscv64
:
%else
false
@ -618,6 +620,14 @@ false
%endif
%changelog
* Sat Apr 23 2023 David Abdurachmanov <davidlt@rivosinc.com> - 15.0.7-4.0.riscv64
- Ignore test suite failures on riscv64 for now
- Prepare for riscv64
- Add riscv64-redhat-linux triplet
* Mon Mar 27 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 15.0.7-4
- Rebuild for LLVM 16.0.0 update
* Thu Jan 19 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 15.0.7-3
- Update license to SPDX identifiers.
- Include the Apache license adopted in 2019.