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>
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.
.eh_frame sections confuse bpf tools, so -funwind-tables shouldn't be enabled there.
There are other non-CPU arches where this could potentially cause problems, so be
conservative and only enable this on CPU arches supported by Fedora.