Update to LLVM 17.0.0 RC4

This commit is contained in:
Tulio Magno Quites Machado Filho 2023-09-08 15:34:14 -03:00
parent 4d5309efc8
commit c4482a5a65
5 changed files with 75 additions and 41 deletions

View File

@ -1,32 +0,0 @@
From b7cf9bbfde5e623e16fe8669e18aa34cbb3afafa Mon Sep 17 00:00:00 2001
From: XinWang10 <xin10.wang@intel.com>
Date: Fri, 18 Aug 2023 00:08:01 -0700
Subject: [PATCH] Fix regression of D157680
Test cases in D157680 should be target specific, but miss some limit, add them back to make buildbot pass.
Reviewed By: skan, Hahnfeld
Differential Revision: https://reviews.llvm.org/D158252
---
diff --git a/clang/test/Driver/x86-no-gather-no-scatter.cpp b/clang/test/Driver/x86-no-gather-no-scatter.cpp
index 7efcc55787c4..2e8f4615b846 100644
--- a/clang/test/Driver/x86-no-gather-no-scatter.cpp
+++ b/clang/test/Driver/x86-no-gather-no-scatter.cpp
@@ -1,8 +1,8 @@
/// Tests -mno-gather and -mno-scatter
-// RUN: %clang -c -mno-gather -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s
-// RUN: %clang_cl -c /Qgather- -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s
+// RUN: %clang -target x86_64-unknown-linux-gnu -c -mno-gather -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s
+// RUN: %clang_cl --target=x86_64-windows -c /Qgather- -### %s 2>&1 | FileCheck --check-prefix=NOGATHER %s
// NOGATHER: "-target-feature" "+prefer-no-gather"
-// RUN: %clang -c -mno-scatter -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s
-// RUN: %clang_cl -c /Qscatter- -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s
+// RUN: %clang -target x86_64-unknown-linux-gnu -c -mno-scatter -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s
+// RUN: %clang_cl --target=x86_64-windows -c /Qscatter- -### %s 2>&1 | FileCheck --check-prefix=NOSCATTER %s
// NOSCATTER: "-target-feature" "+prefer-no-scatter"
--
2.41.0

View File

@ -0,0 +1,30 @@
From a2449cee8c995b56f1892502aab3dfad3d6f3ca1 Mon Sep 17 00:00:00 2001
From: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
Date: Fri, 8 Sep 2023 11:45:34 -0300
Subject: [PATCH] Workaround a bug in ORC on ppc64le
The Jit code appears to be returning the wrong printf symbol on ppc64le
after the transition of the default long double to IEEE 128-bit floating
point.
---
clang/unittests/Interpreter/InterpreterTest.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp
index abb8e6377aab..7b6697ebc6ed 100644
--- a/clang/unittests/Interpreter/InterpreterTest.cpp
+++ b/clang/unittests/Interpreter/InterpreterTest.cpp
@@ -243,7 +243,9 @@ TEST(IncrementalProcessing, FindMangledNameSymbol) {
EXPECT_FALSE(!Addr);
// FIXME: Re-enable when we investigate the way we handle dllimports on Win.
-#ifndef _WIN32
+ // FIXME: The printf symbol returned from the Jit may not be correct on
+ // ppc64le when the default long double is IEEE 128-bit fp.
+#if !defined _WIN32 && !(defined __PPC64__ && defined __LITTLE_ENDIAN__)
EXPECT_EQ((uintptr_t)&printf, Addr->getValue());
#endif // _WIN32
}
--
2.41.0

30
689.patch Normal file
View File

@ -0,0 +1,30 @@
From b7d6e2b5308a7b53ce7b3bbfd6e8e38e28e036ec Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org>
Date: Tue, 5 Sep 2023 16:02:04 +0100
Subject: [PATCH] [Clang] Fix JIT test on 32-bit systems
As reported by mgorny at https://reviews.llvm.org/D159115#4638037, the
unsigned long long cast fails on 32-bit systems at least with GCC.
It looks like a pointer provenance/aliasing issue rather than a bug in GCC.
Acked by Vassil Vassilev on the original revision.
(cherry picked from commit 3403686b72507e3fdbcd69f21fb9235ffa0ca169)
---
clang/unittests/Interpreter/InterpreterTest.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp
index abb8e6377aab..5f2911e9a7ad 100644
--- a/clang/unittests/Interpreter/InterpreterTest.cpp
+++ b/clang/unittests/Interpreter/InterpreterTest.cpp
@@ -244,7 +244,7 @@ TEST(IncrementalProcessing, FindMangledNameSymbol) {
// FIXME: Re-enable when we investigate the way we handle dllimports on Win.
#ifndef _WIN32
- EXPECT_EQ((unsigned long long)&printf, Addr->getValue());
+ EXPECT_EQ((uintptr_t)&printf, Addr->getValue());
#endif // _WIN32
}

View File

@ -16,7 +16,7 @@
%global maj_ver 17
%global min_ver 0
%global patch_ver 0
%global rc_ver 3
%global rc_ver 4
%if %{with snapshot_build}
%undefine rc_ver
@ -55,7 +55,7 @@
Name: %pkg_name
Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
Release: 2%{?dist}
Release: 1%{?dist}
Summary: A C language family front-end for LLVM
License: Apache-2.0 WITH LLVM-exception OR NCSA
@ -83,9 +83,12 @@ Source6: clang.cfg
Patch1: 0001-PATCH-clang-Make-funwind-tables-the-default-on-all-a.patch
Patch2: 0003-PATCH-clang-Don-t-install-static-libraries.patch
Patch3: 0001-Driver-Add-a-gcc-equivalent-triple-to-the-list-of-tr.patch
# Backport https://reviews.llvm.org/D158252 from LLVM 18
Patch5: 0001-Fix-regression-of-D157680.patch
# Backport from LLVM 18:
# https://github.com/llvm/llvm-project-release-prs/pull/689
Patch4: 689.patch
# Workaround a bug in ORC on ppc64le.
# More info is available here: https://reviews.llvm.org/D159115#4641826
Patch5: 0001-Workaround-a-bug-in-ORC-on-ppc64le.patch
# RHEL specific patches
# Avoid unwanted dependency on python-recommonmark
@ -645,6 +648,9 @@ false
%{?llvm_snapshot_changelog_entry}
* Tue Sep 05 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc4-1
- Update to LLVM 17.0.0 RC4
* Wed Aug 23 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc3-1
- Update to LLVM 17.0.0 RC3

View File

@ -1,4 +1,4 @@
SHA512 (clang-17.0.0rc3.src.tar.xz) = eb04e044f1fb4d10d6c46ead77bbb78b08a1d9a4144c4c24dd8fdaa634a493ead312d17ca8dfc1870673f80739204ec7ba2069f7704fc7ef37584b445a52097c
SHA512 (clang-17.0.0rc3.src.tar.xz.sig) = ed4c292e735c473908bdbe13dfa91a57ae8cf01759fb6c11be57c0b0661ea16df67fa29a4f51342ab6750a3e54191f96ea37b0e3b39a9854f60c72a4af652001
SHA512 (clang-tools-extra-17.0.0rc3.src.tar.xz) = 3134d1ff29e900d2701d9cef388a4f04f65246a0366584666b8848c465b7e876eb607c6f0c3ab60067e73e9371aa9b73baf54d313642542acd78c6b8c1cd64a7
SHA512 (clang-tools-extra-17.0.0rc3.src.tar.xz.sig) = 4ca473857bd00aba13015d35a776fb5b20848c79aa2e53e51a1f4c98eb088501dc87f4ae59b82e53ae9521c5ece4a92591ac8c14014d0a7af4e5cb8b355bf64f
SHA512 (clang-17.0.0rc4.src.tar.xz) = 97d9263fb56cbb20dfc70db31e375339b8ec490ba1a7b64b69a38738c2c4ea34b0bf8d38c7542be0a1eb68ead121dfc7cde4d76b08d916160cbbd81c3f1ea499
SHA512 (clang-17.0.0rc4.src.tar.xz.sig) = 4c0f70b236430de358ed51dc640970c8fa5894542d4af22ec6c0d2a87a1cda24684d8f58a3102e7973c510618d19f4cfd77aab1ced50542e0d602f021a9c9744
SHA512 (clang-tools-extra-17.0.0rc4.src.tar.xz) = 3372b94d0eeafd838a1d9b75d4e69645a40632150cc5ba4d74494469fb4fe070da979f0140954ac7773d27b1bdadd0ae30a7571ae08b23f307ade23a167e6818
SHA512 (clang-tools-extra-17.0.0rc4.src.tar.xz.sig) = 48e16589e37bafa98aec0de20ae6e5ac7abfb0d4405713c2b15ceca76dfce964949e36466affbdcad41c6889652a5dda40a6d5e17afa866eb208c404166909b3