Blame SOURCES/gdb-ccache-workaround.patch

861f93
--- a/gdb/testsuite/gdb.base/macscp.exp
861f93
+++ b/gdb/testsuite/gdb.base/macscp.exp
861f93
@@ -33,6 +33,14 @@ if [test_compiler_info gcc*] {
861f93
     lappend options additional_flags=-g3
861f93
 }
861f93
 
861f93
+# Workaround ccache making lineno non-zero for command-line definitions.
861f93
+if {[find_gcc] == "gcc" && [file executable "/usr/bin/gcc"]} {
861f93
+    set result [catch "exec which gcc" output]
861f93
+    if {$result == 0 && [string first "/ccache/" $output] > -1} {
861f93
+	lappend options "compiler=/usr/bin/gcc"
861f93
+    }
861f93
+}
861f93
+
861f93
 # Generate the intermediate object file.  This is required by Darwin to
861f93
 # have access to the .debug_macinfo section.
861f93
 if  {[gdb_compile "${srcdir}/${subdir}/macscp1.c" "${objfile}" \