Merge remote-tracking branch 'up/f38' into f38-riscv64

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
David Abdurachmanov 2023-06-12 09:54:09 +03:00
commit a961981e37
Signed by: davidlt
GPG Key ID: 8B7F1DA0E2C9FDBB
5 changed files with 104 additions and 51 deletions

View File

@ -0,0 +1,30 @@
From 2a0175c88ccd8c162901ac0ade56859d2b599f38 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Mon, 17 Apr 2023 16:19:04 +0200
Subject: [PATCH] Change LLVM_COMMON_CMAKE_UTILS usage
Let LLVM_COMMON_CMAKE_UTILS store the directory where cmake modules are
available and stop assuming its directory structure.
---
clang/CMakeLists.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/clang/CMakeLists.txt b/clang/CMakeLists.txt
index 1fff005d6525..f4b3ef4bd15a 100644
--- a/clang/CMakeLists.txt
+++ b/clang/CMakeLists.txt
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.13.4)
if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
- set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
+ set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake/Modules)
endif()
-include(${LLVM_COMMON_CMAKE_UTILS}/Modules/CMakePolicy.cmake
+include(${LLVM_COMMON_CMAKE_UTILS}/CMakePolicy.cmake
NO_POLICY_SCOPE)
# If we are not building as a part of LLVM, build Clang as an
--
2.39.2

View File

@ -1,26 +0,0 @@
From 701750a896a08d5841a7bc0d187bcddaa6c0f616 Mon Sep 17 00:00:00 2001
From: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
Date: Thu, 16 Mar 2023 17:22:24 -0300
Subject: [PATCH] [PowerPC][clang] Fix triple
Some Linux distributions use ppc64le instead of powerpc.
---
clang/test/CodeGenCoroutines/pr56329.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/test/CodeGenCoroutines/pr56329.cpp b/clang/test/CodeGenCoroutines/pr56329.cpp
index 31d4849af4e7..69e0f1d337cf 100644
--- a/clang/test/CodeGenCoroutines/pr56329.cpp
+++ b/clang/test/CodeGenCoroutines/pr56329.cpp
@@ -2,7 +2,7 @@
//
// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++20 %s -O3 -S -emit-llvm -o - | FileCheck %s
// This test is expected to fail on PowerPC.
-// XFAIL: target=powerpc{{.*}}
+// XFAIL: target={{(ppc|powerpc).*}}
#include "Inputs/coroutine.h"
--
2.39.2

View File

@ -0,0 +1,38 @@
From f4e2d711e5cfd8e357d770e2da7a114086ee8659 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder@redhat.com>
Date: Thu, 22 Sep 2022 10:49:43 +0200
Subject: disable recommonmark
---
clang/docs/conf.py | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/clang/docs/conf.py b/clang/docs/conf.py
index b8a42018191a..912449a7f792 100644
--- a/clang/docs/conf.py
+++ b/clang/docs/conf.py
@@ -37,20 +37,7 @@ source_suffix = {
'.rst': 'restructuredtext',
}
-try:
- import recommonmark
-except ImportError:
- # manpages do not use any .md sources
- if not tags.has('builder-man'):
- raise
-else:
- import sphinx
- if sphinx.version_info >= (3, 0):
- # This requires 0.5 or later.
- extensions.append('recommonmark')
- else:
- source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'}
- source_suffix['.md'] = 'markdown'
+import sphinx
# The encoding of source files.
#source_encoding = 'utf-8-sig'
--
2.37.1

View File

@ -9,7 +9,7 @@
%global maj_ver 16
%global min_ver 0
%global patch_ver 1
%global patch_ver 5
#global rc_ver 4
%global clang_version %{maj_ver}.%{min_ver}.%{patch_ver}
@ -37,7 +37,6 @@
%endif
%global clang_srcdir clang-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src
%global cmake_srcdir cmake-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src
%global clang_tools_srcdir clang-tools-extra-%{clang_version}%{?rc_ver:rc%{rc_ver}}.src
Name: %pkg_name
@ -53,11 +52,9 @@ Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig
%endif
Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz
Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig
Source6: release-keys.asc
Source4: release-keys.asc
%if %{without compat_build}
Source7: macros.%{name}
Source5: macros.%{name}
%endif
# Patches for clang
@ -67,8 +64,6 @@ Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch
# Drop the following patch after debugedit adds support to DWARF-5:
# https://sourceware.org/bugzilla/show_bug.cgi?id=28728
Patch5: 0010-PATCH-clang-Produce-DWARF4-by-default.patch
# Fix a test based on the triple used on RHEL-based systems.
Patch6: 0001-PowerPC-clang-Fix-triple.patch
# Make clangBasic and clangDriver depend on LLVMTargetParser
# See https://reviews.llvm.org/D141581
Patch7: D141581.diff
@ -78,8 +73,14 @@ Patch8: D138472.diff
Patch10: fix-ieee128-cross.diff
Patch11: 0001-Change-LLVM_COMMON_CMAKE_UTILS-usage.patch
Patch20: 0001-Add-support-for-riscv64.patch
# RHEL specific patches
# Avoid unwanted dependency on python-recommonmark
Patch101: 0009-disable-recommonmark.patch
%if %{without compat_build}
# Patches for clang-tools-extra
# See https://reviews.llvm.org/D120301
@ -112,7 +113,9 @@ BuildRequires: emacs
BuildRequires: python3-lit
BuildRequires: python3-sphinx
%if %{undefined rhel}
BuildRequires: python3-recommonmark
%endif
BuildRequires: libatomic
# We need python3-devel for %%py3_shebang_fix
@ -262,19 +265,13 @@ Requires: python3
%prep
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE3}' --data='%{SOURCE0}'
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE5}' --data='%{SOURCE4}'
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE3}' --data='%{SOURCE0}'
%setup -T -q -b 4 -n %{cmake_srcdir}
# TODO: It would be more elegant to set -DLLVM_COMMON_CMAKE_UTILS=%{_builddir}/%{cmake_srcdir},
# but this is not a CACHED variable, so we can't actually set it externally :(
cd ..
mv %{cmake_srcdir} cmake
%if %{with compat_build}
%autosetup -n %{clang_srcdir} -p2
%else
%{gpgverify} --keyring='%{SOURCE6}' --signature='%{SOURCE2}' --data='%{SOURCE1}'
%{gpgverify} --keyring='%{SOURCE4}' --signature='%{SOURCE2}' --data='%{SOURCE1}'
%setup -T -q -b 1 -n %{clang_tools_srcdir}
%autopatch -m200 -p2
@ -287,7 +284,7 @@ rm test/clang-tidy/checkers/altera/struct-pack-align.cpp
clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
%setup -q -n %{clang_srcdir}
%autopatch -M200 -p2
%autopatch -M%{?!rhel:100}%{?rhel:200} -p2
# failing test case
rm test/CodeGen/profile-filter.c
@ -368,6 +365,7 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
%else
-DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \
%endif
-DLLVM_COMMON_CMAKE_UTILS=%{_libdir}/cmake/llvm \
-DCLANG_ENABLE_ARCMT:BOOL=ON \
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
-DCLANG_INCLUDE_DOCS:BOOL=ON \
@ -408,7 +406,7 @@ rm -Rf %{buildroot}%{install_prefix}/lib/{libear,libscanbuild}
# File in the macros file for other packages to use. We are not doing this
# in the compat package, because the version macros would # conflict with
# eachother if both clang and the clang compat package were installed together.
install -p -m0644 -D %{SOURCE7} %{buildroot}%{_rpmmacrodir}/macros.%{name}
install -p -m0644 -D %{SOURCE5} %{buildroot}%{_rpmmacrodir}/macros.%{name}
sed -i -e "s|@@CLANG_MAJOR_VERSION@@|%{maj_ver}|" \
-e "s|@@CLANG_MINOR_VERSION@@|%{min_ver}|" \
-e "s|@@CLANG_PATCH_VERSION@@|%{patch_ver}|" \
@ -612,11 +610,26 @@ false
%endif
%changelog
* Mon Apr 24 2023 David Abdurachmanov <davidlt@rivosinc.com> - 16.0.1-1.0.riscv64
* Mon Jun 12 2023 David Abdurachmanov <davidlt@rivosinc.com> - 16.0.5-1.0.riscv64
- Ignore test suite failures on riscv64 for now
- Prepare for riscv64
- Add riscv64-redhat-linux triplet
* Tue Jun 06 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.5-1
- Update to LLVM 16.0.5
* Fri May 19 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.4-1
- Update to LLVM 16.0.4
* Mon May 15 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.3-2
- Remove patch for ppc64le triple in favor of https://reviews.llvm.org/D149746
* Tue May 09 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.3-1
- Update to LLVM 16.0.3
* Wed Apr 26 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.2-1
- Update to LLVM 16.0.2
* Wed Apr 12 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.1-1
- Update to LLVM 16.0.1

10
sources
View File

@ -1,6 +1,4 @@
SHA512 (clang-16.0.1.src.tar.xz) = c7ef4c386471850f30e194d0a8afe95fdd366c9182b1cdd7653342dcbf72a2b90970c0c4cc900314a26ba131163adec234eec00816207266fbe9c2259d01b61a
SHA512 (clang-16.0.1.src.tar.xz.sig) = 31756b55641debde8e075819a3705c9fbf9a3e39d0f5da5a0e8421bd96eb19972ced6f22df0f66f918d48375089c06b5e499f0627dc81d22956421d9791e088e
SHA512 (clang-tools-extra-16.0.1.src.tar.xz) = eb3a5656526db559fa331e4020305b6070a33e9c4e7a082f0ebe2b307ac43d542c989585e99c660fc749041774ff80dbad089678456318b40415e340654424c8
SHA512 (clang-tools-extra-16.0.1.src.tar.xz.sig) = c661a454ddc27aa12fd82aa19f49e26982147519bb108580059042302dc010b351d99fef65dc51c854a3d06a89a9200ee22dd613a1777bcf35b5236fa75ba2af
SHA512 (cmake-16.0.1.src.tar.xz) = 7a0f01a82660a953e06b1df267918542205ac46f151d284dca74255c36fe5ccd995266638a85ce502a81cdd5e76ff3311e5f8488e09d0abbf22ee07cec186f5f
SHA512 (cmake-16.0.1.src.tar.xz.sig) = 8d49050e9b04df253a5bb2fa3b27796f204d085610432826bef6bb6cab876990d67e7fd5267fc89fadf21d88da73c535c82ae6ea0e1c867f7cd5efac244b0fa2
SHA512 (clang-16.0.5.src.tar.xz) = d7ad46ee7d564c08baf600f55d46d735eeb1e5959c7f5b61bf2766b7b2a78a5a762ececb36fd55b61113435f0c3654529e61b7f71c01d60e9d63f3128eb009ed
SHA512 (clang-tools-extra-16.0.5.src.tar.xz) = 8f5c5617dad5eb3f89e8f7d29c3ac3a8ee3286f83cc4984ba28cdd8d9a663a80f581dbb81d8f520fa31f5a7f5fdd0c34d889ed32a17895e2daebf4c9380a0aff
SHA512 (clang-tools-extra-16.0.5.src.tar.xz.sig) = 1161fd65c3d693d7463489c5e7fda9e5742cd1389553faac324f008fcd75533d54742712c36e946635123c7dc1c634865cea5b5e238db45819b2da473b4f8a34
SHA512 (clang-16.0.5.src.tar.xz.sig) = ed0d70fe20057762c9396663d4012b117909f800dd01ddd887950d5e0a9afdfa12e70a9d031b9917170d7ceef8d1e79ea949664d6ab6b3fcad0e70b3fef08224