From 169d5a1490d340526556b735764fc9315c697adc Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Wed, 15 May 2024 13:02:24 +0000 Subject: [PATCH] Add triple prefix to clang config files See https://src.fedoraproject.org/rpms/clang/pull-request/240 --- files.spec.inc | 3 ++- install.spec.inc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/files.spec.inc b/files.spec.inc index 1d5e9be..8f50a24 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -319,7 +319,8 @@ %{install_bindir}/clang++-%{maj_ver} %{install_bindir}/clang-cl %{install_bindir}/clang-cpp -%{_sysconfdir}/%{pkg_name_clang}/clang.cfg +%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang.cfg +%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang++.cfg %if %{without compat_build} %{_mandir}/man1/clang.1.gz %{_mandir}/man1/clang++.1.gz diff --git a/install.spec.inc b/install.spec.inc index 3cd1a9d..5d66d86 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -198,7 +198,8 @@ ln -s %{_datadir}/clang/clang-format-diff.py %{buildroot}%{_bindir}/clang-format # Install config file for clang %if %{maj_ver} >=18 mkdir -p %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/ -echo "--gcc-triple=%{_arch}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/clang.cfg +echo "--gcc-triple=%{_target_cpu}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang.cfg +echo "--gcc-triple=%{_target_cpu}-redhat-linux" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang++.cfg %endif #endregion