Cloning for GTS13 on RHEL8. [NOTE: There is no gcc-toolset-13-gdb component in bugzilla.] +++ This bug was initially created as a clone of Bug #2213228 +++ gdb carries a patch (in both fedora and rhel) which makes gdb-add-index use gdb.minimal: https://gitlab.com/redhat/centos-stream/rpms/gcc-toolset-13-gdb/-/blob/c9s/gdb-libexec-add-index.patch Contrary to the comment in the patch, this does not just default to gdb.minimal, but will always use it if present, even if a different gdb has been explicitly specified via $PATH or $GDB. gdb-add-index on LTO builds produced by Clang sometimes requires a newer gdb than the system version. We would like to make use of the gdb provided by gcc-toolset. However, this patch prevents us from specifying the newer gdb. It should be possible to fix this issue by adding the same " && ! which $GDB &>/dev/null" check as is present in the first part of the patch. --- Additional comment from Keith Seitz on 2023-06-09 16:03:35 UTC --- This patch has recently been rewritten, and is available in rawhide: https://src.fedoraproject.org/rpms/gdb/blob/rawhide/f/gdb-add-index.patch The most obvious change here is that the environment variable "GDB" is no longer ignored, and is used if set/valid. Would that suffice? I can mock up a test build for you, if you'd like to verify. Just let me know. Would we need this for RHEL8, too? --- Additional comment from Nikita Popov on 2023-06-12 09:28:42 UTC --- Thanks! This patch should work for us. I did the following in a mock environment: > source scl_source enable gcc-toolset-13 > vim /opt/rh/gcc-toolset-13/root/bin/gdb-add-index (and replace with the new script) > export GDB=/opt/rh/gcc-toolset-13/root/usr/bin/gdb > gdb-add-index build/BUILD/lldb-16.0.1.src/redhat-linux-build/bin/lldb-server And this worked without error. > Would we need this for RHEL8, too? Just RHEL 9 is enough for our purposes.
Manually updating Fixed In Version: because BZ Linker failed. Bugzilla still has no gcc-toolset-13-gdb component for RHEL8.
Verified with gcc-toolset-13-gdb-12.1-3.el8.