From 6c44decc636e018318f5e8511c179dcaa6fce525 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Mon, 20 Nov 2017 18:07:34 +0000 Subject: [PATCH] libomp 5.0.0 --- .gitignore | 1 + ...P_HEADERS_INSTALL_PATH-a-cache-varia.patch | 27 ++++++++ libomp.spec | 64 +++++++++++++++++++ sources | 1 + 4 files changed, 93 insertions(+) create mode 100644 .gitignore create mode 100644 0001-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-a-cache-varia.patch create mode 100644 libomp.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..99abc44 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/openmp-5.0.0.src.tar.xz diff --git a/0001-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-a-cache-varia.patch b/0001-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-a-cache-varia.patch new file mode 100644 index 0000000..d1e1dfb --- /dev/null +++ b/0001-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-a-cache-varia.patch @@ -0,0 +1,27 @@ +From 6a50c3deceaf66e3d2be93871abef03e22ee4a7c Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Tue, 16 May 2017 11:52:19 -0400 +Subject: [PATCH] CMake: Make LIBOMP_HEADERS_INSTALL_PATH a cache variable when + bulding standalone + +This way it can be overriden on the command line. +--- + runtime/src/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/runtime/src/CMakeLists.txt b/runtime/src/CMakeLists.txt +index b0aa487..04ebdc3 100644 +--- a/runtime/src/CMakeLists.txt ++++ b/runtime/src/CMakeLists.txt +@@ -283,7 +283,7 @@ add_dependencies(libomp-micro-tests libomp-test-deps) + # We want to install libomp in DESTDIR/CMAKE_INSTALL_PREFIX/lib + # We want to install headers in DESTDIR/CMAKE_INSTALL_PREFIX/include + if(${LIBOMP_STANDALONE_BUILD}) +- set(LIBOMP_HEADERS_INSTALL_PATH include) ++ set(LIBOMP_HEADERS_INSTALL_PATH include CACHE PATH "Install path for OpenMP headers") + else() + string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION ${PACKAGE_VERSION}) + set(LIBOMP_HEADERS_INSTALL_PATH lib${LIBOMP_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) +-- +1.8.3.1 + diff --git a/libomp.spec b/libomp.spec new file mode 100644 index 0000000..227dd99 --- /dev/null +++ b/libomp.spec @@ -0,0 +1,64 @@ +Name: libomp +Version: 5.0.0 +Release: 1%{?dist} +Summary: OpenMP runtime for clang + +License: NCSA +URL: http://openmp.llvm.org +Source0: http://llvm.org/releases/%{version}/openmp-%{version}.src.tar.xz + +Patch0: 0001-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-a-cache-varia.patch + +BuildRequires: cmake +BuildRequires: elfutils-libelf-devel +BuildRequires: perl +BuildRequires: perl-Data-Dumper +BuildRequires: perl-Encode + +Requires: elfutils-libelf%{?isa} + +# libomp does not support s390x. +ExcludeArch: s390x + +%description +OpenMP runtime for clang. + +%package devel +Summary: OpenMP header files +Requires: clang-devel%{?isa} = %{version} + +%description devel +OpenMP header files. + +%prep +%autosetup -n openmp-%{version}.src -p1 + +%build +mkdir -p _build +cd _build + +%cmake .. \ + -DLIBOMP_INSTALL_ALIASES=OFF \ + -DLIBOMP_HEADERS_INSTALL_PATH:PATH=%{_libdir}/clang/%{version}/include \ +%if 0%{?__isa_bits} == 64 + -DLIBOMP_LIBDIR_SUFFIX=64 \ +%else + -DLIBOMP_LIBDIR_SUFFIX= \ +%endif + +%make_build + + +%install +%make_install -C _build + + +%files +%{_libdir}/libomp.so + +%files devel +%{_libdir}/clang/%{version}/include/omp.h + +%changelog +* Mon May 15 2017 Tom Stellard - 5.0.0-1 +- Initial version. diff --git a/sources b/sources new file mode 100644 index 0000000..8275635 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (openmp-5.0.0.src.tar.xz) = 038cc1d262414fac9a05eabdce97b21eb04fc1b3609d07f8da2c9da6b1aaa143f8b26953cb799e7dde82f708103539fe03fe939ba7323a71bd3e9e3925bd5513