Blame SOURCES/gdb-ccache-workaround.patch

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