| |
@@ -375,8 +375,14 @@
|
| |
|
| |
# Move include files
|
| |
mkdir -p %{buildroot}%{pkg_includedir}
|
| |
- mv %{buildroot}/%{install_includedir}/clang %{buildroot}/%{pkg_includedir}/
|
| |
- mv %{buildroot}/%{install_includedir}/clang-c %{buildroot}/%{pkg_includedir}/
|
| |
+
|
| |
+ # Conditional move to prevent an error that's similar to this one:
|
| |
+ # + mv /builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64//usr/lib64/llvm12/include/clang /builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64//usr/lib64/llvm12/include/
|
| |
+ # mv: '/builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64//usr/lib64/llvm12/include/clang' and '/builddir/build/BUILDROOT/clang12-12.0.0-2.fc35.x86_64//usr/lib64/llvm12/include/clang' are the same file
|
| |
+ %if %{without compat_build}
|
| |
+ mv %{buildroot}/%{install_includedir}/clang %{buildroot}/%{pkg_includedir}/
|
| |
+ mv %{buildroot}/%{install_includedir}/clang-c %{buildroot}/%{pkg_includedir}/
|
| |
+ %endif
|
| |
|
| |
%else
|
| |
|
| |
@@ -437,7 +443,9 @@
|
| |
rm -Rvf %{buildroot}%{_includedir}/clang-tidy/
|
| |
|
| |
# Add a symlink in /usr/bin to clang-format-diff
|
| |
+ %if %{without compat_build}
|
| |
ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format-diff
|
| |
+ %endif
|
| |
|
| |
%check
|
| |
%if %{without compat_build}
|
| |
@@ -489,9 +497,9 @@
|
| |
%files resource-filesystem
|
| |
%dir %{pkg_libdir}/clang/%{version}/
|
| |
%dir %{pkg_libdir}/clang/%{version}/include/
|
| |
+ %if %{without compat_build}
|
| |
%dir %{pkg_libdir}/clang/%{version}/lib/
|
| |
%dir %{pkg_libdir}/clang/%{version}/share/
|
| |
- %if %{without compat_build}
|
| |
%{pkg_libdir}/clang/%{maj_ver}
|
| |
%endif
|
| |
|
| |
This change includes all the changes I needed to make in order for the
compatibilty build of clang12 to succeed.
I took the code from https://src.fedoraproject.org/rpms/clang11/pull-request/3.patch and did more changes along the way as the build kept failing.
For example, the following error was fixed by putting a section into a
conditional build if-block.