From 61b4ec17b723923f2ca24fa91ee5e18af490874a Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Thu, 21 Nov 2024 17:08:58 -0800 Subject: [PATCH] Default to DWARF-4 Related: RHEL-57465 --- llvm.spec | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/llvm.spec b/llvm.spec index 294191c..ef27cab 100644 --- a/llvm.spec +++ b/llvm.spec @@ -177,7 +177,7 @@ #region main package Name: %{pkg_name_llvm} Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Low Level Virtual Machine License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -1261,9 +1261,19 @@ echo "%%clang%{maj_ver}_resource_dir %%{_prefix}/lib/clang/%{maj_ver}" >> %{buil # Install config file for clang %if %{maj_ver} >=18 +%global cfg_file_content --gcc-triple=%{_target_cpu}-redhat-linux + +%if %{defined rhel} && 0%{?rhel} < 10 +%global cfg_file_content %{cfg_file_content} -gdwarf-4 -g0 +%endif + +%if %{defined gts_version} +%global cfg_file_content %{cfg_file_content} --gcc-install-dir=/opt/rh/gcc-toolset-%{gts_version}/root/usr +%endif + mkdir -p %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/ -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 +echo " %{cfg_file_content}" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang.cfg +echo " %{cfg_file_content}" >> %{buildroot}%{_sysconfdir}/%{pkg_name_clang}/%{_target_platform}-clang++.cfg %endif #endregion CLANG installation @@ -2432,6 +2442,9 @@ fi #region changelog %changelog +* Fri Nov 22 2024 Tom Stellard - 19.1.3-2 +- Default to DWARF-4 + * Sat Nov 16 2024 Tom Stellard - 19.1.3-1 - 19.1.3 Release