Compare commits

...

26 Commits

Author SHA1 Message Date
David Abdurachmanov ae4add5c98
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-12-07 17:38:51 +02:00
Tulio Magno Quites Machado Filho ed1b7e9154 Update to LLVM 17.0.6 2023-11-29 10:44:09 -03:00
Jesus Checa Hidalgo 6a6d525e8e Update rpminspect.yaml config
Updated syntax to be compliant with latest rpminspect versions
Added badfunc exceptions per file
2023-11-08 14:08:17 +01:00
David Abdurachmanov e131cd69c6
Add support for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-07 12:41:52 +02:00
David Abdurachmanov 514c57828a
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-07 12:40:31 +02:00
Tulio Magno Quites Machado Filho db9a4bdb91 Update to LLVM 17.0.4 2023-11-01 20:41:22 -03:00
Tulio Magno Quites Machado Filho 8e9cac7e43 Update to LLVM 17.0.3 2023-10-18 09:36:34 -03:00
Tulio Magno Quites Machado Filho 0c86a48b7a Update to LLVM 17.0.2 2023-10-05 09:23:45 -03:00
Tulio Magno Quites Machado Filho 9be9c8c17f Update to LLVM 17.0.1 2023-09-25 10:04:17 -03:00
Tulio Magno Quites Machado Filho 43a7a39a44 Update to LLVM 17.0.0 RC4 2023-09-11 11:43:37 -03:00
Tom Stellard 8dfdb6780c Fix FLOAT16 detection 2023-09-05 09:52:20 -03:00
Tulio Magno Quites Machado Filho ac55f0dda7 Update to LLVM 17.0.0 RC3 2023-08-25 21:53:11 -03:00
Tulio Magno Quites Machado Filho 652197cf49 Update to LLVM 17.0.0 RC2 2023-08-23 13:57:12 -03:00
Tulio Magno Quites Machado Filho 7f94942644 Fix changelog chronological order
rpmlint report errors when the changelog is not in descending
chronological order.
2023-08-23 10:16:18 -03:00
Tom Stellard b383b170ec Fix runtime install path on ppc64le 2023-08-10 10:32:06 -03:00
Tulio Magno Quites Machado Filho d423f98be3 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
2023-08-10 10:32:06 -03:00
Fedora Release Engineering c3a9639f8f Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 16:13:13 +00:00
Tulio Magno Quites Machado Filho e57eb63070 Update to LLVM 16.0.6 2023-07-10 12:13:17 -03:00
Nikita Popov 53c9478c36 Use llvm-cmake-utils package 2023-06-15 16:57:13 +02:00
Tulio Magno Quites Machado Filho 1291dd7b82 Update to LLVM 16.0.5 2023-06-06 12:03:16 -03:00
Tulio Magno Quites Machado Filho 5af9a6c642 Update to LLVM 16.0.4 2023-05-19 18:36:44 -03:00
Tulio Magno Quites Machado Filho 2ed570f50f Update to LLVM 16.0.3 2023-05-10 15:48:33 -03:00
Tulio Magno Quites Machado Filho 891fc43fb3 Update to LLVM 16.0.2 2023-04-27 10:57:45 -03:00
David Abdurachmanov 5f1dbe8759
Make patch for with -p2
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-08-25 12:02:12 +03:00
David Abdurachmanov 69e965f243
Add missing patch
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-08-25 11:31:32 +03:00
David Abdurachmanov c7f32cbc97
Fix build on glibc 2.36
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-08-25 11:11:31 +03:00
5 changed files with 178 additions and 71 deletions

17
.copr/Makefile Normal file
View File

@ -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)

View File

@ -0,0 +1,36 @@
From ce15f52198639e9195b8833ed60dc1a49c293956 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 29 Aug 2023 15:49:55 -0700
Subject: [PATCH] compiler-rt: Fix FLOAT16 feature detection
CMAKE_TRY_COMPILE_TARGET_TYPE defaults to EXECUTABLE, which causes
any feature detection code snippet without a main function to fail,
so we need to make sure it gets explicitly set to STATIC_LIBRARY.
---
compiler-rt/lib/builtins/CMakeLists.txt | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
index 2fc70522895f..e83a1ecea50b 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -5,7 +5,6 @@
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
cmake_minimum_required(VERSION 3.20.0)
- set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
project(CompilerRTBuiltins C ASM)
set(COMPILER_RT_STANDALONE_BUILD TRUE)
set(COMPILER_RT_BUILTINS_STANDALONE_BUILD TRUE)
@@ -50,6 +49,8 @@ if (COMPILER_RT_STANDALONE_BUILD)
ON)
endif()
+set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
+
include(builtin-config-ix)
include(CMakeDependentOption)
include(CMakePushCheckState)
--
2.41.0

View File

@ -1,17 +1,30 @@
%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 1
%global patch_ver 6
#global rc_ver 4
%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
%global cmake_srcdir cmake-%{compiler_rt_version}%{?rc_ver:rc%{rc_ver}}.src
# see https://sourceware.org/bugzilla/show_bug.cgi?id=25271
%global optflags %(echo %{optflags} -D_DEFAULT_SOURCE)
@ -20,17 +33,22 @@
%global optflags %(echo %{optflags} -Dasm=__asm__)
Name: compiler-rt
Version: %{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}}
Release: 1%{?dist}
Version: %{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
Release: 1.0.riscv64%{?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
Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz
Source4: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{compiler_rt_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig
%endif
Patch0: 0001-compiler-rt-Fix-FLOAT16-feature-detection.patch
BuildRequires: clang
BuildRequires: cmake
@ -39,6 +57,7 @@ BuildRequires: python3
# We need python3-devel for %%py3_shebang_fix
BuildRequires: python3-devel
BuildRequires: llvm-devel = %{version}
BuildRequires: llvm-cmake-utils = %{version}
BuildRequires: zlib-devel
# For gpg source verification
@ -54,14 +73,11 @@ instrumentation, and Blocks C language extension.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE4}' --data='%{SOURCE3}'
%setup -T -q -b 3 -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
%autosetup -n %{crt_srcdir} -p2
# compiler-rt does not allow configuring LLVM_COMMON_CMAKE_UTILS.
ln -s %{_datadir}/llvm/cmake ../cmake
%py3_shebang_fix lib/hwasan/scripts/hwasan_symbolize
%build
@ -72,6 +88,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 \
@ -85,51 +107,87 @@ export ASMFLAGS=$CFLAGS
%install
%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
%ifarch ppc64le
# Fix install path on ppc64le so that the directory name matches the triple used
# by clang.
mv %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/powerpc64le-redhat-linux-gnu %{buildroot}%{_prefix}/lib/clang/%{maj_ver}/lib/ppc64le-redhat-linux-gnu
%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
%ifarch x86_64 aarch64 riscv64
%{_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 Dec 07 2023 David Abdurachmanov <davidlt@rivosinc.com> - 17.0.6-1.0.riscv64
- Add support for riscv64
* Wed Nov 29 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.6-1
- Update to LLVM 17.0.6
* Wed Nov 01 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.4-1
- Update to LLVM 17.0.4
* Wed Oct 18 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.3-1
- Update to LLVM 17.0.3
* Thu Oct 05 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.2-1
- Update to LLVM 17.0.2
* Mon Sep 25 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.1-1
- Update to LLVM 17.0.1
* Mon Sep 11 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc4-1
- Update to LLVM 17.0.0 RC4
* Tue Aug 29 2023 Tom Stellard <tstellar@redhat.com> - 17.0.0~rc3-2
- Fix FLOAT16 detection
* Fri Aug 25 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc3-1
- Update to LLVM 17.0.0 RC3
* Wed Aug 23 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc2-1
- Update to LLVM 17.0.0 RC2
* Thu Aug 03 2023 Tom Stellard <tstellar@redhat.com> - 17.0.0~rc1-2
- Fix for ppc64le
* Thu Aug 03 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc1-1
- Update to LLVM 17.0.0 RC1
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 16.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Jul 10 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.6-1
- Update to LLVM 16.0.6
* Thu Jun 15 2023 Nikita Popov <npopov@redhat.com> - 16.0.5-2
- Use llvm-cmake-utils package
* 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
* Wed May 10 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.3-1
- Update to LLVM 16.0.3
* Thu Apr 27 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.2-1
- Update to LLVM 16.0.2
* Thu Apr 13 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.1-1
- Update to LLVM 16.0.1

View File

@ -1,21 +1,19 @@
---
# For compiler-rt, we filter out the following forbidden functions from the list:
# - gethostbyname
# - gethostbyname2
# - gethostbyaddr
# - inet_aton
# These are never actually used, and are installed just as interceptors.
badfuncs:
- inet_addr
- inet_nsap_addr
- inet_ntoa
- inet_nsap_ntoa
- inet_makeaddr
- inet_netof
- inet_network
- inet_neta
- inet_net_ntop
- inet_net_pton
- rcmd
- rexec
- rresvport
# For compiler-rt, we allow the following forbidden functions:
# - gethostbyname
# - gethostbyname2
# - gethostbyaddr
# - inet_aton
# These are never actually used, and are installed just as interceptors.
allowed:
/usr/lib*/clang/*/lib/*/libclang_rt.?san.so:
- gethostbyaddr
- gethostbyname
- gethostbyname2
- inet_aton
/usr/lib*/clang/*/lib/*/libclang_rt.memprof.so:
- gethostbyaddr
- gethostbyname
- gethostbyname2
- inet_aton

View File

@ -1,4 +1,2 @@
SHA512 (cmake-16.0.1.src.tar.xz) = 7a0f01a82660a953e06b1df267918542205ac46f151d284dca74255c36fe5ccd995266638a85ce502a81cdd5e76ff3311e5f8488e09d0abbf22ee07cec186f5f
SHA512 (cmake-16.0.1.src.tar.xz.sig) = 8d49050e9b04df253a5bb2fa3b27796f204d085610432826bef6bb6cab876990d67e7fd5267fc89fadf21d88da73c535c82ae6ea0e1c867f7cd5efac244b0fa2
SHA512 (compiler-rt-16.0.1.src.tar.xz) = ca9e076ef47b6298d68d7799896da0fb18148317ddc4b01e26d11b7ee02979bb771e39217611666c771c8177672f951631e5114140c9b3e58fe94e596964a9b9
SHA512 (compiler-rt-16.0.1.src.tar.xz.sig) = c427904cf95515c42ce7cd02b08890cf475ec538a5725ce207a0c330ff131554f9ca32ea08e469433c851760e3c8acc61c83186349b0614ac5f2fe0965161958
SHA512 (compiler-rt-17.0.6.src.tar.xz) = 56dc9d304dd4ba8d28179077dd99ca7c820ce26dbc70d33b2ba41769928adc900f7618d3efef756b2fc92e322d2f25dba49be966d6583d2d8f1fce9283a9cdf7
SHA512 (compiler-rt-17.0.6.src.tar.xz.sig) = 3f1e21299fee7ab20fbeb61740049fb0ad61ceeaa8abec000c415320526dd84006d2d82161ff6ed63b33f0c1fd3937647e5eac5341cbeab602edaf70a8b875cd