Compare commits

...

23 Commits

Author SHA1 Message Date
David Abdurachmanov ea711d0cbc
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-12-07 17:39:49 +02:00
Tulio Magno Quites Machado Filho 070a9c18a9 Update to LLVM 17.0.6 2023-11-29 10:28:02 -03:00
David Abdurachmanov 12c79e34b3
Add support for riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-07 12:37:24 +02:00
David Abdurachmanov f7b2aa5fbc
Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2023-11-07 12:33:50 +02:00
Tulio Magno Quites Machado Filho 075db526e7 Update to LLVM 17.0.4 2023-11-01 19:03:07 -03:00
Tulio Magno Quites Machado Filho c5e3e571c1 Update to LLVM 17.0.3 2023-10-18 09:32:44 -03:00
Nikita Popov ee22a23839 Don't explicitly set LIBOMP_HAVE_VERSION_SCRIPT_FLAG
This is working around an issue that has been fixed in
https://reviews.llvm.org/D148798.
2023-10-13 13:45:11 +00:00
Tulio Magno Quites Machado Filho 7cfd6fed80 Update to LLVM 17.0.2 2023-10-05 09:06:54 -03:00
Tulio Magno Quites Machado Filho d42e16cfa3 Update to LLVM 17.0.1 2023-09-25 09:36:09 -03:00
Tulio Magno Quites Machado Filho bb343d77a1 Update to LLVM 17.0.0 RC4 2023-09-11 11:41:51 -03:00
Tulio Magno Quites Machado Filho c559ecca0c Update to LLVM 17.0.0 RC3 2023-08-25 18:09:00 -03:00
Tulio Magno Quites Machado Filho 81da7e4538 Update to LLVM 17.0.0 RC2 2023-08-23 14:04:09 -03:00
Tulio Magno Quites Machado Filho c29cb30511 Update to LLVM 17.0.0 RC1
This is also a squashed merge commit from upstream-snapshot (commit ID
294d9ace52a3eb86) into rawhide whose most important commits from
upstream-snapshot are:

Konrad Kleine (19):
      Prepare for snapshot builds
      Fix download link
      Make download path for snapshot sources-easily adjustable
      Introduce version suffix for snapshot
      Attempt to fix RPM build error
      Fix version to include snapshot revision
      Fix RPM snapshot build for i386 and aarch64
      Use llvm_snapshot_version_suffix
      Regenerated patch from streamline branch
      Compile with DWARFv4
      Fix error with missing *.bc files
      Fix RPM build error about installed but unpacked *.bc files
      Remove files not found
      Fix RPM build error with i386
      Make libomp use the llvm-snapshot-builder
      Use %{llvm_snapshot_extra_source_tags} macro
      Merge remote-tracking branch 'origin/rawhide' into upstream-snapshot
      Fix unclosed %if
      Drop already landed patch

Nikita Popov (1):
      Package ompx.h

Timm Bäder (1):
      Don't ship nextgen libraries

Tom Stellard (5):
      Use correct suffix for shared objects
      Add new nextgen libraries
      libomptarget is no longer built on 32-bit arches
      Merge branch 'rawhide' of ssh://pkgs.fedoraproject.org/rpms/libomp into upstream-snapshot
      Install llvm-snapshot-builder from the current COPR project
2023-08-10 14:45:15 -03:00
Fedora Release Engineering 4e305961cd Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-20 11:40:20 +00:00
Tulio Magno Quites Machado Filho 91dfa8f84a Update to LLVM 16.0.6 2023-07-10 12:10:18 -03:00
Tulio Magno Quites Machado Filho 2f463babee Start to require clang's major version on builds
In recent daily snapshot builds, libomp started to build with older
clang versions that are not binary compatible with the latest libomp,
causing build issues.

Requiring a clang version that is identical to libomp may prevent these
errors and will also help in avoiding disabling features unintentionally.
2023-06-28 17:46:50 -03:00
Tom Stellard 8c3e353313 Remove libomp-test package
We aren't using this package for testing anymore, because it was too
hard maintain and keep working.
2023-06-17 06:16:09 +00:00
Nikita Popov a286411376 Use llvm-cmake-utils package 2023-06-15 16:51:58 +02:00
Tulio Magno Quites Machado Filho b0e0d8b005 Update to LLVM 16.0.5 2023-06-06 11:46:13 -03:00
Tulio Magno Quites Machado Filho 561c1d2554 Update to LLVM 16.0.4 2023-05-19 19:08:11 -03:00
Tulio Magno Quites Machado Filho c47cf621db Update to LLVM 16.0.3 2023-05-10 14:54:36 -03:00
Tulio Magno Quites Machado Filho cf6760974f Update to LLVM 16.0.2 2023-04-27 10:15:26 -03:00
David Abdurachmanov 638b6cb226
Do not package libomptarget.rtl* files for riscv64
These files do not exist.

Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
2022-08-26 09:50:06 +03:00
5 changed files with 128 additions and 157 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

@ -1,16 +1,29 @@
%bcond_with snapshot_build
%if %{with snapshot_build}
# Unlock LLVM Snapshot LUA functions
%{llvm_sb}
%endif
%global maj_ver 17
%global libomp_version %{maj_ver}.0.6
#global rc_ver 4
%global libomp_srcdir openmp-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src
%global so_suffix %{maj_ver}
%if %{with snapshot_build}
%undefine rc_ver
%global maj_ver %{llvm_snapshot_version_major}
%global libomp_version %{llvm_snapshot_version}
%global so_suffix %{maj_ver}%{llvm_snapshot_version_suffix}
%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 libomp_version %{maj_ver}.0.1
#global rc_ver 4
%global libomp_srcdir openmp-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src
%global cmake_srcdir cmake-%{libomp_version}%{?rc_ver:rc%{rc_ver}}.src
%ifarch ppc64le
%global libomp_arch ppc64
%else
@ -18,21 +31,22 @@
%endif
Name: libomp
Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}}
Release: 3%{?dist}
Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}}
Release: 1.0.riscv64%{?dist}
Summary: OpenMP runtime for clang
License: Apache-2.0 WITH LLVM-exception OR NCSA
URL: http://openmp.llvm.org
%if %{with snapshot_build}
Source0: %{llvm_snapshot_source_prefix}openmp-%{llvm_snapshot_yyyymmdd}.src.tar.xz
%{llvm_snapshot_extra_source_tags}
%else
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{libomp_srcdir}.tar.xz
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{libomp_srcdir}.tar.xz.sig
Source2: release-keys.asc
Source3: run-lit-tests
Source4: lit.fedora.cfg.py
Source5: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz
Source6: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{libomp_version}%{?rc_ver:-rc%{rc_ver}}/%{cmake_srcdir}.tar.xz.sig
%endif
BuildRequires: clang
BuildRequires: clang >= %{maj_ver}
# For clang-offload-packager
BuildRequires: clang-tools-extra
BuildRequires: cmake
@ -48,6 +62,7 @@ BuildRequires: gnupg2
# libomptarget needs the llvm cmake files
BuildRequires: llvm-devel
BuildRequires: llvm-cmake-utils
Requires: elfutils-libelf%{?isa}
@ -65,41 +80,27 @@ Requires: clang-resource-filesystem%{?isa} = %{version}
%description devel
OpenMP header files.
%package test
Summary: OpenMP regression tests
Requires: %{name}%{?isa} = %{version}-%{release}
Requires: %{name}-devel%{?isa} = %{version}-%{release}
Requires: clang
Requires: llvm
Requires: python3-lit
%description test
OpenMP regression tests
%prep
%if %{without snapshot_build}
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE6}' --data='%{SOURCE5}'
%setup -T -q -b 5 -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
%endif
%autosetup -n %{libomp_srcdir} -p2
%build
# TODO: LIBOMP_HAVE_VERSION_SCRIPT_FLAG should be set automatically.
%cmake -GNinja \
-DLIBOMP_INSTALL_ALIASES=OFF \
-DCMAKE_MODULE_PATH=%{_libdir}/cmake/llvm \
-DCMAKE_MODULE_PATH=%{_datadir}/llvm/cmake/Modules \
-DLLVM_DIR=%{_libdir}/cmake/llvm \
-DCMAKE_INSTALL_INCLUDEDIR=%{_libdir}/clang/%{maj_ver}/include \
-DCMAKE_INSTALL_INCLUDEDIR=%{_prefix}/lib/clang/%{maj_ver}/include \
%if 0%{?__isa_bits} == 64
-DOPENMP_LIBDIR_SUFFIX=64 \
%else
-DOPENMP_LIBDIR_SUFFIX= \
%endif
-DCMAKE_SKIP_RPATH:BOOL=ON \
-DLIBOMP_HAVE_VERSION_SCRIPT_FLAG:BOOL=ON
%if %{with snapshot_build}
-DLLVM_VERSION_SUFFIX="%{llvm_snapshot_version_suffix}" \
%endif
-DCMAKE_SKIP_RPATH:BOOL=ON
%cmake_build
@ -107,30 +108,6 @@ mv %{cmake_srcdir} cmake
%install
%cmake_install
# Test package setup
%global libomp_srcdir %{_datadir}/libomp/src/
%global libomp_testdir %{libomp_srcdir}/runtime/test/
%global lit_cfg %{libomp_testdir}/%{_arch}.site.cfg.py
%global lit_fedora_cfg %{_datadir}/libomp/lit.fedora.cfg.py
install -d %{buildroot}%{libomp_srcdir}/runtime
cp -R runtime/test %{buildroot}%{libomp_srcdir}/runtime
cp -R runtime/src %{buildroot}%{libomp_srcdir}/runtime
# Generate lit config files. Strip off the last line that initiates the
# test run, so we can customize the configuration.
head -n -1 %{_vpath_builddir}/runtime/test/lit.site.cfg >> %{buildroot}%{lit_cfg}
# Install custom fedora config file
cp %{SOURCE4} %{buildroot}%{lit_fedora_cfg}
# Patch lit config files to load custom fedora config
echo "lit_config.load_config(config, '%{lit_fedora_cfg}')" >> %{buildroot}%{lit_cfg}
# Install test script
install -d %{buildroot}%{_libexecdir}/tests/libomp
install -m 0755 %{SOURCE3} %{buildroot}%{_libexecdir}/tests/libomp
# Remove static libraries with equivalent shared libraries
rm -rf %{buildroot}%{_libdir}/libarcher_static.a
@ -146,42 +123,95 @@ rm -rf %{buildroot}%{_libdir}/libarcher_static.a
%endif
%ifnarch %{ix86} %{arm}
# libomptarget is not supported on 32-bit systems.
%{_libdir}/libomptarget.rtl.amdgpu.so.%{maj_ver}
%{_libdir}/libomptarget.rtl.amdgpu.nextgen.so.%{maj_ver}
%{_libdir}/libomptarget.rtl.cuda.so.%{maj_ver}
%{_libdir}/libomptarget.rtl.cuda.nextgen.so.%{maj_ver}
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{maj_ver}
%{_libdir}/libomptarget.rtl.%{libomp_arch}.nextgen.so.%{maj_ver}
%{_libdir}/libomptarget.so.%{maj_ver}
%ifnarch riscv64
%{_libdir}/libomptarget.rtl.amdgpu.so.%{so_suffix}
%{_libdir}/libomptarget.rtl.cuda.so.%{so_suffix}
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{so_suffix}
%endif
%{_libdir}/libomptarget.so.%{so_suffix}
%endif
%files devel
%{_libdir}/clang/%{maj_ver}/include/omp.h
%{_libdir}/cmake/openmp/FindOpenMPTarget.cmake
%{_prefix}/lib/clang/%{maj_ver}/include/omp.h
%ifnarch %{arm}
%{_libdir}/clang/%{maj_ver}/include/omp-tools.h
%{_libdir}/clang/%{maj_ver}/include/ompt.h
%{_libdir}/clang/%{maj_ver}/include/ompt-multiplex.h
%{_prefix}/lib/clang/%{maj_ver}/include/omp-tools.h
%{_prefix}/lib/clang/%{maj_ver}/include/ompt.h
%{_prefix}/lib/clang/%{maj_ver}/include/ompt-multiplex.h
%endif
%{_libdir}/cmake/openmp/FindOpenMPTarget.cmake
%ifnarch %{ix86} %{arm}
# libomptarget is not supported on 32-bit systems.
%ifnarch riscv64
%{_libdir}/libomptarget.rtl.amdgpu.so
%{_libdir}/libomptarget.rtl.amdgpu.nextgen.so
%{_libdir}/libomptarget.rtl.cuda.so
%{_libdir}/libomptarget.rtl.cuda.nextgen.so
%{_libdir}/libomptarget.rtl.%{libomp_arch}.so
%{_libdir}/libomptarget.rtl.%{libomp_arch}.nextgen.so
%endif
%{_libdir}/libomptarget.devicertl.a
%{_libdir}/libomptarget-amdgpu-*.bc
%{_libdir}/libomptarget-nvptx-*.bc
%{_libdir}/libomptarget.so
%endif
%files test
%{_datadir}/libomp
%{_libexecdir}/tests/libomp/
%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
* 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
* Wed Aug 02 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 17.0.0~rc1-1
- Update to LLVM 17.0.0 RC1
* Thu Jul 20 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
* Wed Jun 28 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.5-4
- Specify the required clang version at build time
* Sat Jun 17 2023 Tom Stellard <tstellar@redhat.com> - 16.0.5-3
- Remove libomp-test package
* 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
* Wed Apr 19 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.1-3
- Bump the release. Fix rhbz#2187642.

View File

@ -1,15 +0,0 @@
import tempfile
compiler = '%(libomp_compiler)s' % lit_config.params
config.test_filecheck = '%(bindir)s/FileCheck' % lit_config.params
config.omp_header_directory = '%(includedir)s' % lit_config.params
config.libomp_obj_root = tempfile.mkdtemp()
config.library_dir = '%(libdir)s' % lit_config.params
test_root = '%(libomp_test_root)s' % lit_config.params
# Lit will default to the compiler used to build openmp, which is gcc, but we
# want to run the tests using clang.
config.test_compiler_features = ['clang']
config.test_c_compiler = 'clang'
config.test_cxx_compiler = 'clang++'
lit_config.load_config(config, '%(libomp_test_root)s/lit.cfg' % lit_config.params)

View File

@ -1,59 +0,0 @@
#!/usr/bin/bash
usage() {
echo "usage: `basename $0` [OPTIONS]"
echo " --threads NUM The number of threads to use for running tests."
}
threads_arg=''
while [ $# -gt 0 ]; do
case $1 in
--threads)
shift
threads_arg="--threads $1"
;;
--multilib-arch)
shift
ARCH=$1
;;
* )
echo "unknown option: $1"
echo ""
usage
exit 1
;;
esac
shift
done
set -xe
if [ -z "$ARCH" ]; then
ARCH=`rpm --eval '%_arch'`
fi
case $ARCH in
arm)
;&
i686)
LIB_DIR="/usr/lib/"
;;
*)
LIB_DIR="/usr/lib64/"
;;
esac
BIN_DIR="/usr/bin/"
INCLUDE_DIR="/usr/include/"
lit $threads_arg -v \
--config-prefix $ARCH \
-Dlibomp_compiler=clang \
-Dbindir=$BIN_DIR \
-Dlibdir=$LIB_DIR \
-Dincludedir=$INCLUDE_DIR \
-Dlibomp_test_root=/usr/share/libomp/src/runtime/test \
/usr/share/libomp/src/runtime/test

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 (openmp-16.0.1.src.tar.xz) = 9c22ce1c7a2d12d266d5ce88d610d5bbbbf1da9ce9ad27be10f875ad238c5353b8cac7a64a84b7b0477387f3f60577eff49cde8b4521ab66509c9cd3d90c881f
SHA512 (openmp-16.0.1.src.tar.xz.sig) = b625b5a9394109bbb46763997914b0ba8bfe80b702c8685e7ffcec19126732a8cce7b959507682bacd6c5db3d4f6b6974cc9ba9daab68504058badd5fb1e305d
SHA512 (openmp-17.0.6.src.tar.xz) = 836c48db873e3da64835913c2c1d80efaebdfc7061f153acc7b478ea0d73b9c546a09d70dd1465e3e92684947c4a9cb197886b29cbd42418a778faa56b08cc5e
SHA512 (openmp-17.0.6.src.tar.xz.sig) = 58fb951620d3494e016f0eeefb1cd28d86eb9ecc7894163ed96e8818573f6ed6b6f58d63884799fd052c943e5a63dec39193039f8499b99a55bfd8316c24a55f