From d423f98be31737d0a9119f4174e0d65e639281c2 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Thu, 3 Aug 2023 18:14:44 -0300 Subject: [PATCH] Update to LLVM 17.0.0 RC 1 This is also a squashed merge commit from upstream-snapshot (commit ID b0d2b4ed0ad18d3e) into rawhide whose most important commits from upstream-snapshot are: Konrad Kleine (19): Add --without=check option Rework compiler-rt Rebase 0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch patch Make download path for snapshot sources-easily adjustable Help compiler-rt utilize llvm-cmake subpackage Help compiler-rt to find llvm-cmake files Adapt to reverted https://reviews.llvm.org/D88458 Revert "Adapt to reverted https://reviews.llvm.org/D88458" Require llvm-cmake-devel package when building Adjust the CMAKE_MODULE_PATH instead of patching the source Use new llvm_snashot_changelog_entry macro Use llvm_snapshot_version_suffix Compile with DWARFv4 Merge remote-tracking branch 'upstream/rawhide' into upstream-snapshot Tempoarily remove build dependency on cmake-devel and the packaged cmake directory Make compiler-rt use the llvm-snapshot-builder Use %{llvm_snapshot_extra_source_tags} macro Fixup Merge remote-tracking branch 'origin/main' into upstream-snapshot Tom Stellard (9): Add a patch to fix standalone buidls with compiler-rt Fix typo Handle rename of libclang_rt.orc to liborc_rt liborc_rt is not built on i386 liborc_rt is not built on s390x or ppc64le Merge branch 'rawhide' of ssh://pkgs.fedoraproject.org/rpms/compiler-rt into upstream-snapshot Install llvm-snapshot-builder from the current COPR project Try again to enable local copr repo Use new per-target runtime install feature Tulio Magno Quites Machado Filho (1): Fix packaging on ppc64le and s390x --- .copr/Makefile | 17 ++++++++++ compiler-rt.spec | 82 +++++++++++++++++++++++++----------------------- 2 files changed, 59 insertions(+), 40 deletions(-) create mode 100644 .copr/Makefile diff --git a/.copr/Makefile b/.copr/Makefile new file mode 100644 index 0000000..753982b --- /dev/null +++ b/.copr/Makefile @@ -0,0 +1,17 @@ +# See https://docs.pagure.org/copr.copr/user_documentation.html#make-srpm +# See for the --setopt option in the enabling of copr repo see: +# https://pagure.io/copr/copr/issue/184 + +COPR_USERNAME=$(shell rpm --eval %copr_username) +COPR_PROJECT=$(shell rpm --eval %copr_projectname) + +.PHONY: srpm +srpm: + dnf install -y dnf-plugins-core fedora-packager + dnf copr enable -y --setopt=reposdir=/tmp/yum.repos.d $(COPR_USERNAME)/$(COPR_PROJECT) + dnf install -y --setopt=reposdir=/tmp/yum.repos.d llvm-snapshot-builder + rpmbuild \ + --define "_srcrpmdir $(outdir)" \ + --define "_sourcedir $(shell pwd)" \ + --define "_disable_source_fetch 0" \ + -bs $(spec) diff --git a/compiler-rt.spec b/compiler-rt.spec index 93b4c50..4365f4f 100644 --- a/compiler-rt.spec +++ b/compiler-rt.spec @@ -1,13 +1,27 @@ +%bcond_with snapshot_build + +%if %{with snapshot_build} +# Unlock LLVM Snapshot LUA functions +%{llvm_sb_verbose} +%{llvm_sb} +%endif + %global toolchain clang # Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer # https://bugzilla.redhat.com/show_bug.cgi?id=2158587 %undefine _include_frame_pointers -%global maj_ver 16 +%global maj_ver 17 %global min_ver 0 -%global patch_ver 6 -#global rc_ver 4 +%global patch_ver 0 +%global rc_ver 1 +%if %{with snapshot_build} +%global maj_ver %{llvm_snapshot_version_major} +%global min_ver %{llvm_snapshot_version_minor} +%global patch_ver %{llvm_snapshot_version_patch} +%undefine rc_ver +%endif %global compiler_rt_version %{maj_ver}.%{min_ver}.%{patch_ver} %global crt_srcdir compiler-rt-%{compiler_rt_version}%{?rc_ver:rc%{rc_ver}}.src @@ -19,15 +33,20 @@ %global optflags %(echo %{optflags} -Dasm=__asm__) Name: compiler-rt -Version: %{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Version: %{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} +Release: 1%{?dist} Summary: LLVM "compiler-rt" runtime libraries License: Apache-2.0 WITH LLVM-exception OR NCSA OR MIT URL: http://llvm.org +%if %{with snapshot_build} +Source0: %{llvm_snapshot_source_prefix}compiler-rt-%{llvm_snapshot_yyyymmdd}.src.tar.xz +%{llvm_snapshot_extra_source_tags} +%else Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz.sig Source2: release-keys.asc +%endif BuildRequires: clang BuildRequires: cmake @@ -67,6 +86,12 @@ export ASMFLAGS=$CFLAGS -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \ -DCMAKE_SKIP_RPATH:BOOL=ON \ + -DCOMPILER_RT_INSTALL_PATH=%{_prefix}/lib/clang/%{maj_ver} \ + -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON \ + \ +%if %{with snapshot_build} + -DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \ +%endif \ %if 0%{?__isa_bits} == 64 -DLLVM_LIBDIR_SUFFIX=64 \ @@ -81,50 +106,27 @@ export ASMFLAGS=$CFLAGS %cmake_install -# move blacklist/abilist files to where clang expect them -mkdir -p %{buildroot}%{_libdir}/clang/%{maj_ver}/share -mv -v %{buildroot}%{_datadir}/*list.txt %{buildroot}%{_libdir}/clang/%{maj_ver}/share/ - -# move sanitizer libs to better place -%global libclang_rt_installdir lib/linux -mkdir -p %{buildroot}%{_libdir}/clang/%{maj_ver}/lib -mv -v %{buildroot}%{_prefix}/%{libclang_rt_installdir}/*_rt* %{buildroot}%{_libdir}/clang/%{maj_ver}/lib -mkdir -p %{buildroot}%{_libdir}/clang/%{maj_ver}/lib/linux/ -pushd %{buildroot}%{_libdir}/clang/%{maj_ver}/lib -for i in *.a *.so -do - ln -s ../$i linux/$i -done - -# multilib support: also create symlink from lib to lib64, fixes rhbz#1678240 -# the symlinks will be dangling if the 32 bits version is not installed, but that should be fine -%ifarch x86_64 - -mkdir -p %{buildroot}/%{_exec_prefix}/lib/clang/%{maj_ver}/lib/linux -for i in *.a *.so -do - target=`echo "$i" | sed -e 's/x86_64/i386/'` - ln -s ../../../../../lib/clang/%{maj_ver}/lib/$target ../../../../%{_lib}/clang/%{maj_ver}/lib/linux/ -done - -%endif - -popd - %check - #%%cmake_build --target check-compiler-rt %files %license LICENSE.TXT -%{_includedir}/* -%{_libdir}/clang/%{maj_ver}/lib/* -%{_libdir}/clang/%{maj_ver}/share/* %ifarch x86_64 aarch64 -%{_bindir}/hwasan_symbolize +%{_prefix}/lib/clang/%{maj_ver}/bin/* %endif +%{_prefix}/lib/clang/%{maj_ver}/include/* +%{_prefix}/lib/clang/%{maj_ver}/lib/* +%{_prefix}/lib/clang/%{maj_ver}/share/* +#%ifarch x86_64 aarch64 +#{_bindir}/hwasan_symbolize +#%endif %changelog +%{?llvm_snapshot_changelog_entry} + +* Thu Aug 03 2023 Tulio Magno Quites Machado Filho - 17.0.0~rc1-1 +- Update to LLVM 17.0.0 RC1 + * Wed Jul 19 2023 Fedora Release Engineering - 16.0.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild