From 7a3aee27c2571b2e678ce113fb16978a840893ef Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 20 Mar 2020 18:43:23 +0000 Subject: [PATCH] Add dependency on libomp-devel This fixes compiling with -fopenmp, because clang needs libomp-devel to be installed so it can find omp.h. --- clang.spec | 8 +++++++- tests/tests-libomp.yml | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 tests/tests-libomp.yml diff --git a/clang.spec b/clang.spec index 0ad526d..d3a79ae 100644 --- a/clang.spec +++ b/clang.spec @@ -4,7 +4,7 @@ %global min_ver 0 %global patch_ver 0 %global rc_ver 5 -%global baserelease 0.8 +%global baserelease 0.9 %global clang_tools_binaries \ %{_bindir}/clang-apply-replacements \ @@ -159,6 +159,9 @@ as libraries and designed to be loosely-coupled and extensible. %package libs Summary: Runtime library for clang Recommends: compiler-rt%{?_isa} = %{version} +# libomp-devel is required, so clang can find the omp.h header when compiling +# with -fopenmp. +Recommends: libomp-devel%{_isa} = %{version} Recommends: libomp%{_isa} = %{version} %description libs @@ -456,6 +459,9 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \ %endif %changelog +* Fri Mar 20 2020 Tom Stellard - 10.0.0-0.9.rc5 +- Add dependency on libomp-devel + * Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.8.rc5 - 10.0.0 rc5 diff --git a/tests/tests-libomp.yml b/tests/tests-libomp.yml new file mode 100644 index 0000000..b49702f --- /dev/null +++ b/tests/tests-libomp.yml @@ -0,0 +1,22 @@ +- hosts: localhost + pre_tasks: + # We want to make sure libomp is not already present on the system to ensure + # that clang pulls in the correct libomp dependencies when it is installed. + - name: Uninstall libomp + package: + name: "{{ item }}" + state: absent + with_items: + - libomp + - libomp-devel + roles: + - role: standard-test-basic + tags: + - classic + repositories: + - repo: "https://src.fedoraproject.org/tests/clang.git" + dest: "clang" + required_packages: + - clang + tests: + - clang/libomp