Compare commits
3 Commits
rawhide
...
f40-riscv6
Author | SHA1 | Date | |
---|---|---|---|
330fafa18c | |||
cd51a24a01 | |||
d76a0f3963 |
23
clang-fedora-riscv64.patch
Normal file
23
clang-fedora-riscv64.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
index 4325cbb4..86ae0f21 100644
|
||||
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
@@ -2065,6 +2065,7 @@ static llvm::StringRef getGCCToolchainDir(const ArgList &Args,
|
||||
/// triple.
|
||||
static const char *ConvertToGccTriple(StringRef CandidateTriple) {
|
||||
return llvm::StringSwitch<const char *>(CandidateTriple)
|
||||
+ .Case("riscv64-redhat-linux-gnu", "riscv64-redhat-linux")
|
||||
.Case("aarch64-redhat-linux-gnu", "aarch64-redhat-linux")
|
||||
.Case("i686-redhat-linux-gnu", "i686-redhat-linux")
|
||||
.Case("ppc64le-redhat-linux-gnu", "ppc64le-redhat-linux")
|
||||
@@ -2426,7 +2427,9 @@ 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-gnu",
|
||||
+ "riscv64-redhat-linux"};
|
||||
|
||||
static const char *const SPARCv8LibDirs[] = {"/lib32", "/lib"};
|
||||
static const char *const SPARCv8Triples[] = {"sparc-linux-gnu",
|
19
clang17.spec
19
clang17.spec
@ -11,7 +11,11 @@
|
||||
%undefine _include_frame_pointers
|
||||
|
||||
%bcond_without compat_build
|
||||
%ifnarch riscv64
|
||||
%bcond_without check
|
||||
%else
|
||||
%bcond_with check
|
||||
%endif
|
||||
|
||||
%global maj_ver 17
|
||||
%global min_ver 0
|
||||
@ -67,7 +71,7 @@
|
||||
|
||||
Name: %pkg_name
|
||||
Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
|
||||
Release: 7%{?dist}
|
||||
Release: 7.0.riscv64%{?dist}
|
||||
Summary: A C language family front-end for LLVM
|
||||
|
||||
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
||||
@ -105,6 +109,8 @@ Patch7: tsa.patch
|
||||
Patch8: 0001-Clang-Fix-build-with-GCC-14-on-ARM.patch
|
||||
Patch9: 0001-Clang-Defer-the-instantiation-of-explicit-specifier-.patch
|
||||
|
||||
# RISCV (riscv64)
|
||||
Patch20: clang-fedora-riscv64.patch
|
||||
|
||||
# RHEL specific patches
|
||||
# Avoid unwanted dependency on python-recommonmark
|
||||
@ -335,7 +341,7 @@ rm test/CodeGen/profile-filter.c
|
||||
%build
|
||||
|
||||
# And disable LTO on AArch64 entirely.
|
||||
%ifarch aarch64
|
||||
%ifarch aarch64 riscv64
|
||||
%define _lto_cflags %{nil}
|
||||
%endif
|
||||
|
||||
@ -344,13 +350,13 @@ rm test/CodeGen/profile-filter.c
|
||||
%global _lto_cflags %nil
|
||||
%endif
|
||||
|
||||
%ifarch s390 s390x aarch64 %ix86 ppc64le
|
||||
%ifarch s390 s390x aarch64 %ix86 ppc64le riscv64
|
||||
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
||||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||
%endif
|
||||
|
||||
# Disable dwz on aarch64, because it takes a huge amount of time to decide not to optimize things.
|
||||
%ifarch aarch64
|
||||
%ifarch aarch64 riscv64
|
||||
%define _find_debuginfo_dwz_opts %{nil}
|
||||
%endif
|
||||
|
||||
@ -366,7 +372,7 @@ rm test/CodeGen/profile-filter.c
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DPYTHON_EXECUTABLE=%{__python3} \
|
||||
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||
%ifarch s390 s390x %ix86 ppc64le
|
||||
%ifarch s390 s390x %ix86 ppc64le riscv64
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
%endif
|
||||
@ -692,6 +698,9 @@ LD_LIBRARY_PATH=%{buildroot}/%{install_libdir} %{__ninja} check-all -C %{__cmake
|
||||
|
||||
%endif
|
||||
%changelog
|
||||
* Wed Mar 27 2024 David Abdurachmanov <davidlt@rivosinc.com> - 17.0.6-7.0.riscv64
|
||||
- Add support for riscv64
|
||||
|
||||
* Wed Mar 06 2024 Tom Stellard <tstellar@redhat.com> - 17.0.6-7
|
||||
- Fix clang resource directory to match compiler-rt
|
||||
- Fix provides for clang-resource-filesystem
|
||||
|
Loading…
Reference in New Issue
Block a user