Blob Blame History Raw
%global toolchain clang
%{?scl:%global scl_prefix %{scl}-}

Name: test
Version: 1
Release: 1
Summary: Test package for checking that RPM packages using -fopenmp build correctly
License: MIT

BuildRequires: %{?scl_prefix}clang
BuildRequires: %{?scl_prefix}libomp

Source0: test.c

clang was adding RUNPATH to binaries that use OpenMP, and since RUNPATH
is prohibited in Fedora builds, this was causing packages using clang
and OpenMP to fail to build.


clang ${CFLAGS} -c %{SOURCE0} -o test.o
clang ${LDFLAGS} -fopenmp test.o -o main


install -d %{buildroot}%{_bindir}
install main %{buildroot}%{_bindir}