From 55c2266027a57eb83f3b4d1100cb9d1b0e4615c1 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Mon, 10 Jul 2023 11:57:13 -0300 Subject: [PATCH] Update to LLVM 16.0.6 --- ...random.randint-stop-parameter-as-int.patch | 30 +++++++++++++++++++ lld.spec | 16 ++++++---- 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 0001-lld-Pass-random.randint-stop-parameter-as-int.patch diff --git a/0001-lld-Pass-random.randint-stop-parameter-as-int.patch b/0001-lld-Pass-random.randint-stop-parameter-as-int.patch new file mode 100644 index 0000000..816a46d --- /dev/null +++ b/0001-lld-Pass-random.randint-stop-parameter-as-int.patch @@ -0,0 +1,30 @@ +From 015c43178f9d8531b6bcd1685dbf72b7d837cf5a Mon Sep 17 00:00:00 2001 +From: Jacek Caban +Date: Fri, 10 Mar 2023 21:54:14 -0500 +Subject: [PATCH] [lld] Pass random.randint stop parameter as int. + +It's required by Python 3.12, from https://docs.python.org/3.12/library/random.html "Changed in version 3.12: Automatic conversion of non-integer types is no longer supported." + +Reviewed By: #lld-macho, int3 + +Differential Revision: https://reviews.llvm.org/D145826 +--- + lld/test/MachO/tools/generate-cfi-funcs.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lld/test/MachO/tools/generate-cfi-funcs.py b/lld/test/MachO/tools/generate-cfi-funcs.py +index 3f22008349f4..e2b75d0cd9a5 100755 +--- a/lld/test/MachO/tools/generate-cfi-funcs.py ++++ b/lld/test/MachO/tools/generate-cfi-funcs.py +@@ -23,7 +23,7 @@ def print_function(name): + global lsda_odds + have_lsda = (random.random() < lsda_odds) + frame_size = random.randint(4, 64) * 16 +- frame_offset = -random.randint(0, (frame_size/16 - 4)) * 16 ++ frame_offset = -random.randint(0, int(frame_size/16 - 4)) * 16 + global func_size_low, func_size_high + func_size = random.randint(func_size_low, func_size_high) * 0x10 + func_size_high += 1 +-- +2.41.0 + diff --git a/lld.spec b/lld.spec index 36461a4..b4bb5d0 100644 --- a/lld.spec +++ b/lld.spec @@ -11,7 +11,7 @@ %global lld_srcdir lld-%{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:rc%{rc_ver}}.src %global maj_ver 16 %global min_ver 0 -%global patch_ver 5 +%global patch_ver 6 %if %{with compat_build} %global pkg_name lld%{maj_ver} @@ -29,7 +29,7 @@ Name: %{pkg_name} Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 1%{?dist} Summary: The LLVM Linker License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -40,12 +40,15 @@ Source2: release-keys.asc ExcludeArch: s390x -# Backport from LLVM 17. -Patch2: 0001-lld-Use-installed-llvm_gtest-in-standalone-builds.patch - # Bundle libunwind header need during build for MachO support Patch1: 0002-PATCH-lld-Import-compact_unwind_encoding.h-from-libu.patch +# Backport from LLVM 17. +Patch2: 0001-lld-Use-installed-llvm_gtest-in-standalone-builds.patch + +# Backport from LLVM 17. +Patch3: 0001-lld-Pass-random.randint-stop-parameter-as-int.patch + BuildRequires: clang BuildRequires: cmake BuildRequires: ninja-build @@ -191,6 +194,9 @@ fi %{install_libdir}/liblld*.so.* %changelog +* Mon Jul 10 2023 Tulio Magno Quites Machado Filho - 16.0.6-1 +- Update to LLVM 16.0.6 + * Tue Jun 13 2023 Nikita Popov - 16.0.5-2 - Use llvm-cmake-utils package