Note from kkleine:
This is a backport of
4cce509493?branch=rawhide
to fix the failing /clang-tests/tests/llvm-test-suite test:
```
+ git clone --depth 1 https://src.fedoraproject.org/rpms/llvm-test-suite.git llvm-test-suite
Cloning into 'llvm-test-suite'...
+ cd llvm-test-suite/tests/test-suite
+ ./runtest.sh
++ mktemp -d
+ cd /tmp/tmp.j8wd1oLfpN
+ cmake -G Ninja /usr/share/llvm-test-suite/ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DTEST_SUITE_LIT_FLAGS=-sv
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
See also "/tmp/tmp.j8wd1oLfpN/CMakeFiles/CMakeOutput.log".
```
Given that we're building `--with=compat_build`, when we don't
exclude the patches, the following logic will try to apply all
patches to clang even if they are meant for clang-tools-extra:
```
%if %{with compat_build}
%autosetup -n %{clang_srcdir} -p2
%else
```
I'm not willing to patch the %auto... part because I fear to break
stuff. Both ways work.
This works around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104334,
which miscompiles clang on s390x and ppc64le. The issue is already
fixed on the gcc side and a new fedora build is in progress, but
including this as a temporary workaround to get a working build.
scanview and other tools are not built so these libraries
are not needed, so remove them.
Resolves a build but not packaged error.
Signed-off-by: Tom Rix <trix@redhat.com>
The regular llvm build installs llvm-config-N to _bindir
The compat_build llvm build install llvm-config-N to pkg_bindir
Use the pkg_bindir one.
Fixes a build error
error: File not found: .../rpmbuild/BUILDROOT/
clang13-13.0.0-5.fc36.x86_64/usr/lib64/llvm13/lib/*.so.*
Signed-off-by: Tom Rix <trix@redhat.com>
This error is seen on the compat_build
find: '.../rpmbuild/BUILDROOT/clang13-13.0.0-5.fc36.x86_64/
usr/lib/python3.10/site-packages': No such file or directory
python3-clang is not part of the compat_build so ifdef out
the problem area.
Signed-off-by: Tom Rix <trix@redhat.com>
Downstream has no `libc++`, but it can run clang tests with `libstdc++`.
Parametrize the tests, leaving the actual library to use on their
respective `main.fmf` files that are easier to overturn in downstream
repos.
The clang-resource-filesystem package will now prevent a
compiler-rt >= 11.0.0 package from being installed at the same time as a
newer clang package, so we no longer need to add a conflicts here.