Blame SOURCES/gdb-ccache-workaround.patch

475228
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
475228
From: Fedora GDB patches <invalid@email.com>
475228
Date: Fri, 27 Oct 2017 21:07:50 +0200
475228
Subject: gdb-ccache-workaround.patch
475228
475228
;; Workaround ccache making lineno non-zero for command-line definitions.
475228
;;=fedoratest: ccache is rarely used and it is even fixed now.
475228
475228
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
475228
--- a/gdb/testsuite/gdb.base/macscp.exp
475228
+++ b/gdb/testsuite/gdb.base/macscp.exp
475228
@@ -25,6 +25,14 @@ if { [test_compiler_info "gcc-*"] || [test_compiler_info "clang-*"] } {
475228
     lappend options additional_flags=-g3
475228
 }
475228
 
475228
+# Workaround ccache making lineno non-zero for command-line definitions.
475228
+if {[find_gcc] == "gcc" && [file executable "/usr/bin/gcc"]} {
475228
+    set result [catch "exec which gcc" output]
475228
+    if {$result == 0 && [string first "/ccache/" $output] > -1} {
475228
+	lappend options "compiler=/usr/bin/gcc"
475228
+    }
475228
+}
475228
+
475228
 # Generate the intermediate object file.  This is required by Darwin to
475228
 # have access to the .debug_macinfo section.
475228
 if  {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \