Name: omp-compat Version: 1 Release: 1%{?dist} Summary: Shim for clang's OpenMP library compatible with libgomp License: MIT BuildRequires: %{?el7:llvm-toolset-7.0-}libomp gcc %description A trivial shim to allow dynamically linking clang's OpenMP library instead of libgomp by placing %_libdir/omp-compat in LD_LIBRARY_PATH. libomp may have some advantages, such as OMPT support. %prep rm -rf %name-%version mkdir %name-%version %build %{?el7:. /opt/rh/llvm-toolset-7.0/enable} cd %name-%version gcc -shared -Wl,-soname,libgomp.1 -o libgomp.1 -lomp %{?el7:-L$LD_LIBRARY_PATH} %install install -D -m755 %name-%version/libgomp.1 %buildroot/%_libdir/omp-compat/libgomp.1 %files %doc %_libdir/omp-compat/libgomp.1 %changelog * Tue Nov 12 2019 Dave Love - 1-1 - Initial packaging