clang has a couple of indirect weak dependencies; installing clang
without those will cause it to fail in certain use cases, but its
description doesn't mention them which makes resolving this harder
than it could be.
This patch adds a brief description of the weak dependencies to the
main clang package description.
Closes: #1879410
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Packages that need to read or write files from the clang resource
directory should Require this sub-package. This will ensure that we
won't have packages continuing to use older versions of the clang
resource directory when clang is updated.
We need to uninstall clang at the beginning of this test along with libomp,
so that we can later install clang to test that it has the correct dependency on
libomp. If we don't uninstall clang along with libomp at the beginning, then
clang won't be installed later and libomp won't get pulled back in.
The emacs plugins are shipped with clang-tools-extra, which already
Requires: emacs-filesystem, so the main package does not need to
have a dependency on this.
redhat-rpm-config now adds --config to CFLAGS when the macro
%toolchain is set to clang. Some packages end up adding CFLAGS
twice to their compiler commands, so we need to patch clang to
allow multiple --config options so that these packages won't
fail to compile.
With the current setup, if you only install clang-tools-extra, the
package clang-format is not found by Emacs.
A similar change was made for the Python scripts, although I did not
run in the same situation myself.
v2: Moved additional files at the suggestion of @sergesanspaille
%{_mandir}/man1/diagtool.1.gz
%{_bindir}/c-index-test
Also restored trailing whitespaces in the .spec file