Compare commits

...

No commits in common. "c8-stream-rhel8" and "stream-llvm-toolset-rhel-next-rhel-8.10.0" have entirely different histories.

16 changed files with 268 additions and 63 deletions

View File

@ -1,4 +1,2 @@
0de534cfef38697e115c3ae80634765f05e78e5b SOURCES/cmake-16.0.6.src.tar.xz
2db5c88fe9277bb0fa85f49b58e946e49ff235c2 SOURCES/cmake-16.0.6.src.tar.xz.sig
28ddc89aac54cbfa6d0a0cd07a14bbd3f3a01d5f SOURCES/compiler-rt-16.0.6.src.tar.xz
7374cad6da4c3c936c26e72175bdff52ab3e98e5 SOURCES/compiler-rt-16.0.6.src.tar.xz.sig
b0f7f43251829aafd07a3b09a9c3e4987cfa9204 compiler-rt-17.0.6.src.tar.xz
5df8c5479d1c6e99092b865f3597afac8bff1432 compiler-rt-17.0.6.src.tar.xz.sig

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

18
.gitignore vendored
View File

@ -1,4 +1,14 @@
SOURCES/cmake-16.0.6.src.tar.xz
SOURCES/cmake-16.0.6.src.tar.xz.sig
SOURCES/compiler-rt-16.0.6.src.tar.xz
SOURCES/compiler-rt-16.0.6.src.tar.xz.sig
SOURCES/compiler-rt-15.0.7.src.tar.xz
/compiler-rt-15.0.7.src.tar.xz
/compiler-rt-16.0.0.src.tar.xz
/compiler-rt-16.0.0.src.tar.xz.sig
/cmake-16.0.0.src.tar.xz
/cmake-16.0.0.src.tar.xz.sig
/compiler-rt-16.0.6.src.tar.xz
/compiler-rt-16.0.6.src.tar.xz.sig
/cmake-16.0.6.src.tar.xz
/cmake-16.0.6.src.tar.xz.sig
/compiler-rt-17.0.2.src.tar.xz
/compiler-rt-17.0.2.src.tar.xz.sig
/compiler-rt-17.0.6.src.tar.xz
/compiler-rt-17.0.6.src.tar.xz.sig

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

Binary file not shown.

Binary file not shown.

View File

@ -1,10 +1,28 @@
%global maj_ver 16
%bcond_with snapshot_build
%if %{with snapshot_build}
# Unlock LLVM Snapshot LUA functions
%{llvm_sb_verbose}
%{llvm_sb}
%endif
# 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 17
%global min_ver 0
%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)
@ -13,30 +31,35 @@
%global optflags %(echo %{optflags} -Dasm=__asm__)
Name: compiler-rt
Version: %{compiler_rt_version}%{?rc_ver:~rc%{rc_ver}}
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: 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
# RHEL-specific patches
Patch100: 0001-Drop-fno-stack-protector-from-the-compiler-flags.patch
Patch101: fix-page-size-constant.patch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: clang
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: python3
# We need python3-devel for pathfix.py.
# We need python3-devel for %%py3_shebang_fix
BuildRequires: python3-devel
BuildRequires: llvm-devel = %{version}
BuildRequires: llvm-cmake-utils = %{version}
# For gpg source verification
BuildRequires: gnupg2
@ -51,27 +74,33 @@ 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
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
export ASMFLAGS=$CFLAGS
mkdir -p %{_vpath_builddir}
cd %{_vpath_builddir}
%undefine __cmake_in_source_build
%cmake .. -GNinja \
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
export ASMFLAGS="%{build_cflags}"
# RHEL 8 specific: "global toolchain clang" is not supported on RHEL 8, so explicitly enable
# clang in cmake. This is necessary to get the correct float16 ABI.
%cmake -GNinja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-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 \
@ -84,53 +113,38 @@ cd %{_vpath_builddir}
%install
cd %{_vpath_builddir}
%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
%{_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
* Wed Nov 29 2023 Nikita Popov <npopov@redhat.com> - 17.0.6-1
- Update to LLVM 17.0.6
* Fri Oct 13 2023 Nikita Popov <npopov@redhat.com> - 17.0.2-2
- Build with clang
* Wed Oct 04 2023 Nikita Popov <npopov@redhat.com> - 17.0.2-1
- Update to LLVM 17.0.2
* Fri Jun 23 2023 Tom Stellard <tstellar@redhat.com> - 16.0.6-1
- 16.0.6 Release

18
gating.yaml Normal file
View File

@ -0,0 +1,18 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier0.functional}

52
hans-gpg-key.asc Normal file
View File

@ -0,0 +1,52 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFS+1SABEACnmkESkY7eZq0GhDjbkWpKmURGk9+ycsfAhA44NqUvf4tk1GPM
5SkJ/fYedYZJaDVhIp98fHgucD0O+vjOzghtgwtITusYjiPHPFBd/MN+MQqSEAP+
LUa/kjHLjgyXxKhFUIDGVaDWL5tKOA7/AQKl1TyJ8lz89NHQoUHFsF/hu10+qhJe
V65d32MXFehIUSvegh8DrPuExrliSiORO4HOhuc6151dWA4YBWVg4rX5kfKrGMMT
pTWnSSZtgoRhkKW2Ey8cmZUqPuUJIfWyeNVu1e4SFtAivLvu/Ymz2WBJcNA1ZlTr
RCOR5SIRgZ453pQnI/Bzna2nnJ/TV1gGJIGRahj/ini0cs2x1CILfS/YJQ3rWGGo
OxwG0BVmPk0cmLVtyTq8gUPwxcPUd6WcBKhot3TDMlrffZACnQwQjlVjk5S1d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Ec5XBlDAha9
pUVs+J5C2D0UFFkyeOzeJPwy6x5ApWHm84n8AjhQSpu1qRKxKXdwei6tkQWWMHui
+TgSY/zCkmD9/oY15Ei5avJ4WgIbTLJUoZMi70riPmU8ThjpzA7S+Nk0g7rMPq+X
l1whjKU/u0udlsrIJjzkh6ftqKUmIkbxYTpjhnEujNrEr5m2S6Z6x3y9E5QagBMR
dxRhfk+HbyACcP/p9rXOzl4M291DoKeAAH70GHniGxyNs9rAoMr/hD5XW/Wrz3dc
KMc2s555E6MZILE2ZiolcRn+bYOMPZtWlbx98t8uqMf49gY4FGQBZAwPglMrx7mr
m7HTIiXahThQGOJg6izJDAD5RwSEGlAcL28T8KAuM6CLLkhlBfQwiKsUBNnh9r8w
V3lB+pV0GhL+3i077gTYfZBRwLzjFdhm9xUKEaZ6rN1BX9lzix4eSNK5nln0jUq1
67H2IH//2sf8dw==
=ADVe
-----END PGP PUBLIC KEY BLOCK-----

21
rpminspect.yaml Normal file
View File

@ -0,0 +1,21 @@
---
# 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

2
sources Normal file
View File

@ -0,0 +1,2 @@
SHA512 (compiler-rt-17.0.6.src.tar.xz) = 56dc9d304dd4ba8d28179077dd99ca7c820ce26dbc70d33b2ba41769928adc900f7618d3efef756b2fc92e322d2f25dba49be966d6583d2d8f1fce9283a9cdf7
SHA512 (compiler-rt-17.0.6.src.tar.xz.sig) = 3f1e21299fee7ab20fbeb61740049fb0ad61ceeaa8abec000c415320526dd84006d2d82161ff6ed63b33f0c1fd3937647e5eac5341cbeab602edaf70a8b875cd

53
tests/build-gating.fmf Normal file
View File

@ -0,0 +1,53 @@
#
# Build/PR gating tests for *LLVM 13*
#
# Imports and runs tests provided by Fedora LLVM git for the matching LLVM version.
#
# NOTE: *always* keep this file in sync with upstream, i.e. Fedora. Since we cannot "discover" a plan,
# we must duplicate at least some part of upstream plan setup, like `adjust` or `provision`. Not necessarily
# all steps, but if we do need some of them here, let's focus on making changes in upstream first, to preserve
# one source of truth. Once TMT learns to include whole plans, we could drop the copied content from here.
#
summary: compiler-rt tests for build/PR gating
adjust:
- because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR."
when: >-
trigger is defined
and trigger != commit
and trigger != build
enabled: false
# Unfortunately, TMT does not support more declarative approach, we need to run commands on our own.
- because: "On RHEL, CRB must be enabled to provide rarer packages"
when: >-
distro == rhel-9
or distro == rhel-8
prepare+:
- name: Enable CRB
how: shell
script: dnf config-manager --set-enabled rhel-CRB
- because: "On CentOS, CRB must be enabled to provide rarer packages"
when: >-
distro == centos
prepare+:
- name: Enable CRB
how: shell
script: dnf config-manager --set-enabled crb
discover:
- name: compiler-rt-upstream-tests
how: fmf
url: https://src.fedoraproject.org/rpms/compiler-rt.git
ref: rawhide
- name: upstream-llvm-integration-testsuite
how: fmf
url: https://src.fedoraproject.org/rpms/llvm.git
ref: rawhide
test: integration-test-suite
execute:
how: tmt
provision:
hardware:
memory: ">= 4 GiB"

BIN
tstellar-gpg-key.asc Normal file

Binary file not shown.