Compare commits

...

6 Commits

Author SHA1 Message Date
771f8ae70a
Add support for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2024-12-21 13:42:17 +02:00
Fedora Release Engineering
97c7e68425 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 19:23:37 +00:00
Fedora Release Engineering
c888747d26 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-23 01:44:29 +00:00
Fedora Release Engineering
77bcc64444 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 15:31:54 +00:00
Yaakov Selkowitz
4e0c596d9c Build compiler in compat package
If a package needs to build with a compat libclang, it may also need to
use a matching clang compiler.  For example, openshadinglanguage is
currently capped at clang-15 and uses the compiler for bytecode
generation at build-time.
2023-09-14 23:22:31 -04:00
Fedora Release Engineering
937fe8ae5d Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 15:45:54 +00:00
2 changed files with 79 additions and 12 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 Name: %pkg_name
Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}
Release: 3%{?dist} Release: 8.0.riscv64%{?dist}
Summary: A C language family front-end for LLVM Summary: A C language family front-end for LLVM
License: Apache-2.0 WITH LLVM-exception OR NCSA 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 Patch9: 0001-clang-MinGW-Improve-extend-the-gcc-sysroot-detection.patch
Patch10: 0002-clang-MinGW-Improve-detection-of-libstdc-headers-on-.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} %if %{with compat_build}
# Ensure that clang looks for LLVMgold.so in the directory the compat build # Ensure that clang looks for LLVMgold.so in the directory the compat build
# uses. # uses.
@ -194,8 +196,8 @@ Runtime library for clang.
%package devel %package devel
Summary: Development header files for clang Summary: Development header files for clang
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
%if %{without compat_build}
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
%if %{without compat_build}
# The clang CMake files reference tools from clang-tools-extra. # The clang CMake files reference tools from clang-tools-extra.
Requires: %{name}-tools-extra%{?_isa} = %{version}-%{release} Requires: %{name}-tools-extra%{?_isa} = %{version}-%{release}
%endif %endif
@ -303,7 +305,7 @@ rm test/CodeGen/profile-filter.c
# Use ThinLTO to limit build time. # Use ThinLTO to limit build time.
%define _lto_cflags -flto=thin %define _lto_cflags -flto=thin
# And disable LTO on AArch64 entirely. # And disable LTO on AArch64 entirely.
%ifarch aarch64 %ifarch aarch64 riscv64
%define _lto_cflags %{nil} %define _lto_cflags %{nil}
%endif %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 sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
%endif %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 # Decrease debuginfo verbosity to reduce memory consumption during final library linking
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /') %global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
%endif %endif
@ -335,12 +337,11 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPYTHON_EXECUTABLE=%{__python3} \ -DPYTHON_EXECUTABLE=%{__python3} \
-DCMAKE_SKIP_RPATH:BOOL=ON \ -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_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
%endif %endif
%if %{with compat_build} %if %{with compat_build}
-DCLANG_BUILD_TOOLS:BOOL=OFF \
-DLLVM_CMAKE_DIR=%{install_libdir}/cmake/llvm \ -DLLVM_CMAKE_DIR=%{install_libdir}/cmake/llvm \
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \ -DCMAKE_INSTALL_PREFIX=%{install_prefix} \
-DCLANG_INCLUDE_TESTS:BOOL=OFF \ -DCLANG_INCLUDE_TESTS:BOOL=OFF \
@ -392,12 +393,24 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
%if %{with compat_build} %if %{with compat_build}
# Remove binaries/other files # Remove binaries/other files
rm -Rf %{buildroot}%{install_bindir} find %{buildroot}%{install_bindir} -type f ! -name clang-%{maj_ver} ! -name clang \
! -name clang++ ! -name clang-cl ! -name clang-cpp -delete
install -D -m 0644 %{buildroot}%{install_prefix}/share/man/man1/clang.1 \
%{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1
rm -Rf %{buildroot}%{install_prefix}/share rm -Rf %{buildroot}%{install_prefix}/share
rm -Rf %{buildroot}%{install_prefix}/libexec rm -Rf %{buildroot}%{install_prefix}/libexec
# Remove scanview-py helper libs # Remove scanview-py helper libs
rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild} rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild}
# Create Manpage symlinks
ln -s clang-%{maj_ver}.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz
# Add clang-{version} symlinks
mkdir -p %{buildroot}%{_bindir}
ln -s %{install_bindir}/clang %{buildroot}%{_bindir}/clang-%{maj_ver}
ln -s %{install_bindir}/clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver}
ln -s clang++ %{buildroot}%{install_bindir}/clang++-%{maj_ver}
%else %else
# File in the macros file for other packages to use. We are not doing this # File in the macros file for other packages to use. We are not doing this
@ -485,7 +498,7 @@ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format
# requires lit.py from LLVM utilities # requires lit.py from LLVM utilities
# FIXME: Fix failing ARM tests # FIXME: Fix failing ARM tests
LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{__cmake_builddir} || \ LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C %{__cmake_builddir} || \
%ifarch %{arm} %ifarch %{arm} riscv64
: :
%else %else
false false
@ -494,20 +507,27 @@ false
%endif %endif
%if %{without compat_build}
%files %files
%license LICENSE.TXT %license LICENSE.TXT
%{_bindir}/clang
%{_bindir}/clang++
%{_bindir}/clang-%{maj_ver} %{_bindir}/clang-%{maj_ver}
%{_bindir}/clang++-%{maj_ver} %{_bindir}/clang++-%{maj_ver}
%if %{without compat_build}
%{_bindir}/clang
%{_bindir}/clang++
%{_bindir}/clang-cl %{_bindir}/clang-cl
%{_bindir}/clang-cpp %{_bindir}/clang-cpp
%{_mandir}/man1/clang.1.gz %{_mandir}/man1/clang.1.gz
%{_mandir}/man1/clang++.1.gz %{_mandir}/man1/clang++.1.gz
%else
%{pkg_bindir}/clang
%{pkg_bindir}/clang++
%{pkg_bindir}/clang-%{maj_ver}
%{pkg_bindir}/clang++-%{maj_ver}
%{pkg_bindir}/clang-cl
%{pkg_bindir}/clang-cpp
%endif
%{_mandir}/man1/clang-%{maj_ver}.1.gz %{_mandir}/man1/clang-%{maj_ver}.1.gz
%{_mandir}/man1/clang++-%{maj_ver}.1.gz %{_mandir}/man1/clang++-%{maj_ver}.1.gz
%endif
%files libs %files libs
%if %{without compat_build} %if %{without compat_build}
@ -618,6 +638,26 @@ false
%endif %endif
%changelog %changelog
* Sat Dec 21 2024 David Abdurachmanov <davidlt@rivosinc.com> - 15.0.7-8.0.riscv64
- Ignore test suite failures on riscv64 for now
- Prepare for riscv64
- Add riscv64-redhat-linux triplet
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 15.0.7-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Tue Jan 23 2024 Fedora Release Engineering <releng@fedoraproject.org> - 15.0.7-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 15.0.7-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Sep 15 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 15.0.7-5
- Build compiler in compat package
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 15.0.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jan 19 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 15.0.7-3 * Thu Jan 19 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 15.0.7-3
- Update license to SPDX identifiers. - Update license to SPDX identifiers.
- Include the Apache license adopted in 2019. - Include the Apache license adopted in 2019.