From 9fc9144a877520f2012a5e0d015304187ffd1e13 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 29 Jun 2023 08:49:53 +0200 Subject: [PATCH] Use gcc-toolset-13-gdb for gdb-add-index Resolves: rhbz#2188418 --- clang.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 2dd3033..a44d49c 100644 --- a/clang.spec +++ b/clang.spec @@ -2,6 +2,8 @@ # See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros %global toolchain clang +%global gts_version 13 + %bcond_with compat_build %bcond_without bundle_compat_lib %bcond_without check @@ -45,7 +47,7 @@ Name: %pkg_name Version: %{clang_version}%{?rc_ver:~rc%{rc_ver}} -Release: 4%{?dist} +Release: 5%{?dist} Summary: A C language family front-end for LLVM License: Apache-2.0 WITH LLVM-exception OR NCSA @@ -103,9 +105,11 @@ Patch201: 0001-clang-tools-extra-Make-test-dependency-on-LLVMHello-.patch # tools statically to some static libraries from LLVM, we # need to use libstdc++12 as well. So, use gcc-toolset-12 # to compile clang. +# TODO: Update to use gts_version. BuildRequires: gcc-toolset-12-gcc-c++ BuildRequires: gcc-toolset-12-annobin-plugin-gcc BuildRequires: gcc-toolset-12-libatomic-devel +BuildRequires: gcc-toolset-%{gts_version}-gdb BuildRequires: clang BuildRequires: cmake BuildRequires: ninja-build @@ -441,6 +445,10 @@ mv ../cmake-%{compat_ver}.src ../cmake %install +# Use newer GDB for gdb-add-index step, as system GDB can't handle the LTO debuginfo. +source scl_source enable gcc-toolset-%{gts_version} +export GDB=`which gdb` + %cmake_install %if %{with bundle_compat_lib} @@ -686,6 +694,9 @@ mv ./libclang-cpp.so.%{compat_maj_ver} "$compat_lib" %endif %changelog +* Thu Jun 29 2023 Nikita Popov - 16.0.1-5 +- Use gcc-toolset-13-gdb for gdb-add-index + * Fri Jun 02 2023 Nikita Popov - 16.0.1-4 - Build with LTO