diff --git a/README.en.md b/README.en.md index ebf049df0c436be901d0737f8b2c93ddecc984fa..30d9309b9be0fb5aeea354732e49cea3ba18fea9 100644 --- a/README.en.md +++ b/README.en.md @@ -1,8 +1,23 @@ -# openmp +# openmp-latest #### Description LLVM OpenMP Libraries +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + #### Contribution 1. Fork the repository @@ -10,6 +25,7 @@ LLVM OpenMP Libraries 3. Commit your code 4. Create Pull Request + #### Gitee Feature 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md diff --git a/README.md b/README.md index 7d1288fd4f77ceb0225e31bdc480f863a1f336ec..4e5be1603cb510a285f883f9055a7854a5f42375 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,24 @@ -# openmp +# openmp-latest #### 介绍 LLVM OpenMP Libraries +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx + #### 参与贡献 1. Fork 本仓库 @@ -10,6 +26,7 @@ LLVM OpenMP Libraries 3. 提交代码 4. 新建 Pull Request + #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md diff --git a/openmp-17.0.6.src.tar.xz b/openmp-17.0.6.src.tar.xz deleted file mode 100644 index b6cbb6a28cef0577407c0be6ddc67fd678fe1376..0000000000000000000000000000000000000000 Binary files a/openmp-17.0.6.src.tar.xz and /dev/null differ diff --git a/openmp-18.1.8.src.tar.xz b/openmp-18.1.8.src.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..5a5adcad35f4a22cedfb46cfdc36943d5348021f Binary files /dev/null and b/openmp-18.1.8.src.tar.xz differ diff --git a/openmp.spec b/openmp.spec index fbc70e5d0a301c8c8c405726027816d327ad1776..bf76d7c943622a6ff30b10fdd8664292bfcd4af5 100644 --- a/openmp.spec +++ b/openmp.spec @@ -1,29 +1,20 @@ -%bcond_without sys_llvm %bcond_with check %bcond_without toolchain_clang -%bcond_without bisheng_autotuner - -%if %{with toolchain_clang} -%global toolchain clang -%endif %global toolchain clang -%global maj_ver 17 -%global min_ver 0 -%global patch_ver 6 +%global maj_ver 18 +%global min_ver 1 +%global patch_ver 8 %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} -%global install_datadir %{_datadir} -%else -%global pkg_name libomp%{maj_ver} -%global install_prefix %{_libdir}/llvm%{maj_ver} -%global install_datadir %{install_prefix}/share -%endif +%global _scl_prefix /opt/openEuler +%{?scl:%scl_package %scl} +%{!?scl:%global scl_prefix llvm-toolset-%{maj_ver}-} +%{!?scl:%global pkg_name %{name}} +%global install_prefix %{!?scl:%{_scl_prefix}/llvm-toolset-%{maj_ver}/root}%{_prefix} +%global install_datadir %{!?scl:%{_scl_prefix}/llvm-toolset-%{maj_ver}/root}%{_datadir} %global install_includedir %{install_prefix}/include %global install_libdir %{install_prefix}/%{_lib} @@ -36,13 +27,13 @@ %global libomp_arch %{_arch} %endif -Name: %{pkg_name} +Name: %{?scl_prefix}openmp Version: %{openmp_version} -Release: 5 +Release: 1 Summary: OpenMP runtime for clang -License: Apache-2.0 -URL: https://openmp.llvm.org +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++ @@ -55,32 +46,23 @@ BuildRequires: perl-Encode BuildRequires: libffi-devel %if "%toolchain" == "clang" BuildRequires: clang -BuildRequires: clang-tools-extra %endif +BuildRequires: %{?scl_prefix}clang +BuildRequires: %{?scl_prefix}clang-tools-extra -%if %{with sys_llvm} -BuildRequires: llvm-devel llvm-test -BuildRequires: llvm-cmake-utils = %{version} -%else -BuildRequires: llvm%{maj_ver}-devel -BuildRequires: llvm%{maj_ver}-test -BuildRequires: llvm%{maj_ver}-cmake-utils = %{version} -%endif +BuildRequires: %{?scl_prefix}llvm-devel %{?scl_prefix}llvm-test +BuildRequires: %{?scl_prefix}llvm-cmake-utils = %{version} 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 - +Requires: %{pkg_name}%{?isa} = %{version}-%{release} +Requires: %{?scl_prefix}clang-resource-filesystem%{?isa} = %{version} + %description devel OpenMP header files. @@ -88,7 +70,7 @@ OpenMP header files. %autosetup -n %{openmp_srcdir} -p2 %build - + %cmake -GNinja \ -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ -DLIBOMP_INSTALL_ALIASES=OFF \ @@ -103,18 +85,17 @@ OpenMP header files. %if "%{toolchain}" == "clang" -DCMAKE_C_COMPILER=clang \ -DCMAKE_CXX_COMPILER=clang++ \ -%endif -%if %{with bisheng_autotuner} - -DLLVM_ENABLE_AUTOTUNER=ON \ %endif -DCMAKE_SKIP_RPATH:BOOL=ON -%cmake_build - +%ninja_build + %install -%cmake_install +%ninja_install rm -rf %{buildroot}%{install_libdir}/libarcher_static.a +%check + %files %license LICENSE.TXT %{install_libdir}/libomp.so @@ -122,23 +103,26 @@ rm -rf %{buildroot}%{install_libdir}/libarcher_static.a %ifnarch %{arm} %{install_libdir}/libarcher.so %endif -%ifnarch %{ix86} %{arm} riscv64 loongarch64 -%{install_libdir}/libomptarget.rtl.amdgpu.so.%{maj_ver} -%{install_libdir}/libomptarget.rtl.cuda.so.%{maj_ver} -%{install_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{maj_ver} +%ifnarch %{ix86} %{arm} riscv64 +# libomptarget is not supported on 32-bit systems. +%{install_libdir}/libomptarget.rtl.amdgpu.so.%{maj_ver}.%{min_ver} +%{install_libdir}/libomptarget.rtl.cuda.so.%{maj_ver}.%{min_ver} +%{install_libdir}/libomptarget.rtl.%{libomp_arch}.so.%{maj_ver}.%{min_ver} +%{install_libdir}/libomptarget.so.%{maj_ver}.%{min_ver} %endif -%{install_libdir}/libomptarget.so.%{maj_ver} - + %files devel %{install_libdir}/clang/%{maj_ver}/include/omp.h -%{install_libdir}/cmake/openmp/FindOpenMPTarget.cmake +%{install_libdir}/clang/%{maj_ver}/include/ompx.h +%{install_libdir}/cmake/openmp/ %ifnarch %{arm} %{install_libdir}/clang/%{maj_ver}/include/omp-tools.h %{install_libdir}/clang/%{maj_ver}/include/ompt.h %{install_libdir}/clang/%{maj_ver}/include/ompt-multiplex.h %endif %ifnarch %{ix86} %{arm} -%ifnarch riscv64 loongarch64 +# libomptarget is not supported on 32-bit systems. +%ifnarch riscv64 %{install_libdir}/libomptarget.rtl.amdgpu.so %{install_libdir}/libomptarget.rtl.cuda.so %{install_libdir}/libomptarget.rtl.%{libomp_arch}.so @@ -146,10 +130,13 @@ rm -rf %{buildroot}%{install_libdir}/libarcher_static.a %{install_libdir}/libomptarget.devicertl.a %{install_libdir}/libomptarget-amdgpu-*.bc %{install_libdir}/libomptarget-nvptx-*.bc -%endif %{install_libdir}/libomptarget.so - +%endif + %changelog +* Fri Dec 6 2024 liyunfei - 18.1.8-1 +- init for Multi-Version LLVM-18.1.8 + * Sun Nov 10 2024 Funda Wang - 17.0.6-5 - adopt to new cmake macro