Initial version to 12.0.1
This commit is contained in:
parent
78b183bdd6
commit
3602b6153b
BIN
openmp-12.0.1.src.tar.xz
Normal file
BIN
openmp-12.0.1.src.tar.xz
Normal file
Binary file not shown.
118
openmp.spec
Normal file
118
openmp.spec
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
%bcond_with sys_llvm
|
||||||
|
%bcond_with check
|
||||||
|
|
||||||
|
%global maj_ver 12
|
||||||
|
%global min_ver 0
|
||||||
|
%global patch_ver 1
|
||||||
|
%global openmp_version %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||||
|
%global openmp_srcdir openmp-%{openmp_version}.src
|
||||||
|
|
||||||
|
%if %{with sys_llvm}
|
||||||
|
%global pkg_name libomp
|
||||||
|
%global install_prefix %{_prefix}
|
||||||
|
%else
|
||||||
|
%global pkg_name libomp%{maj_ver}
|
||||||
|
%global install_prefix %{_libdir}/llvm%{maj_ver}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%global install_includedir %{install_prefix}/include
|
||||||
|
%global install_libdir %{install_prefix}/%{_lib}
|
||||||
|
%global install_libexecdir %{install_prefix}/libexec
|
||||||
|
%global install_sharedir %{install_prefix}/share
|
||||||
|
|
||||||
|
%ifarch ppc64le
|
||||||
|
%global libomp_arch ppc64
|
||||||
|
%else
|
||||||
|
%global libomp_arch %{_arch}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: %{pkg_name}
|
||||||
|
Version: %{openmp_version}
|
||||||
|
Release: 1
|
||||||
|
Summary: OpenMP runtime for clang
|
||||||
|
|
||||||
|
License: Apache License 2.0
|
||||||
|
URL: http://openmp.llvm.org
|
||||||
|
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{openmp_version}/%{openmp_srcdir}.tar.xz
|
||||||
|
|
||||||
|
BuildRequires: gcc gcc-c++
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: ninja-build
|
||||||
|
BuildRequires: elfutils-libelf-devel
|
||||||
|
BuildRequires: perl
|
||||||
|
BuildRequires: perl-Data-Dumper
|
||||||
|
BuildRequires: perl-Encode
|
||||||
|
BuildRequires: libffi-devel
|
||||||
|
%if "%toolchain" == "clang"
|
||||||
|
BuildRequires: clang
|
||||||
|
BuildRequires: clang-tools-extra
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with sys_llvm}
|
||||||
|
BuildRequires: llvm-devel llvm-test
|
||||||
|
%else
|
||||||
|
BuildRequires: llvm%{maj_ver}-devel
|
||||||
|
BuildRequires: llvm%{maj_ver}-test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Requires: elfutils-libelf%{?isa}
|
||||||
|
|
||||||
|
%description
|
||||||
|
OpenMP runtime for clang.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: OpenMP header files
|
||||||
|
Requires: %{name}%{?isa} = %{version}-%{release}
|
||||||
|
%if %{with sys_llvm}
|
||||||
|
Requires: clang-resource-filesystem%{?isa} = %{version}
|
||||||
|
%else
|
||||||
|
Requires: clang%{maj_ver}-resource-filesystem%{?isa} = %{version}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
OpenMP header files.
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{openmp_srcdir} -p2
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%cmake -GNinja \
|
||||||
|
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
|
||||||
|
-DLIBOMP_INSTALL_ALIASES=OFF \
|
||||||
|
-DCMAKE_MODULE_PATH=%{install_libdir}/cmake/llvm \
|
||||||
|
-DLLVM_DIR=%{install_libdir}/cmake/llvm \
|
||||||
|
-DCMAKE_INSTALL_INCLUDEDIR=%{install_libdir}/clang/%{openmp_version}/include \
|
||||||
|
%if 0%{?__isa_bits} == 64
|
||||||
|
-DOPENMP_LIBDIR_SUFFIX=64 \
|
||||||
|
%else
|
||||||
|
-DOPENMP_LIBDIR_SUFFIX= \
|
||||||
|
%endif
|
||||||
|
-DCMAKE_SKIP_RPATH:BOOL=ON
|
||||||
|
|
||||||
|
%ninja_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%ninja_install
|
||||||
|
rm -rf %{buildroot}%{install_libdir}/libarcher_static.a
|
||||||
|
|
||||||
|
%check
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{install_libdir}/libomp.so
|
||||||
|
%ifnarch %{arm}
|
||||||
|
%{install_libdir}/libarcher.so
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{install_includedir}/omp.h
|
||||||
|
%ifnarch %{arm}
|
||||||
|
%{install_includedir}/omp-tools.h
|
||||||
|
%{install_includedir}/ompt.h
|
||||||
|
%{install_includedir}/ompt-multiplex.h
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sat Aug 26 2023 cf-zhao <zhaochuanfeng@huawei.com> - 12.0.1-1
|
||||||
|
- Initial version to 12.0.1
|
||||||
Loading…
x
Reference in New Issue
Block a user