Blame SOURCES/gdb-libexec-add-index.patch

7bc85d
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
7bc85d
From: Fedora GDB patches <invalid@email.com>
7bc85d
Date: Fri, 27 Oct 2017 21:07:50 +0200
7bc85d
Subject: gdb-libexec-add-index.patch
7bc85d
7bc85d
;; Fix gdb-headless /usr/bin/ executables (BZ 1390251).
7bc85d
;;=fedora
7bc85d
7bc85d
diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
7bc85d
--- a/gdb/contrib/gdb-add-index.sh
7bc85d
+++ b/gdb/contrib/gdb-add-index.sh
7bc85d
@@ -21,6 +21,11 @@
7bc85d
 GDB=${GDB:=gdb}
7bc85d
 OBJCOPY=${OBJCOPY:=objcopy}
7bc85d
 
7bc85d
+GDB2=/usr/libexec/gdb
7bc85d
+if test -x $GDB2 && ! which $GDB &>/dev/null; then
7bc85d
+    GDB=$GDB2
7bc85d
+fi
7bc85d
+
7bc85d
 myname="${0##*/}"
7bc85d
 
7bc85d
 dwarf5=""