+2013-08-09 Doug Evans <dje@google.com>
+
+ * lib/future.exp (gdb_find_ldd): New proc.
+ * lib/prelink-support.exp (build_executable_own_libs): Call it.
+ Make "/usr/sbin/" in prelink path optional.
+
2013-08-09 Yao Qi <yao@codesourcery.com>
* gdb.trace/collection.exp (gdb_collect_args_test): Set
return [find_go]
}
+proc gdb_find_ldd {} {
+ global LDD_FOR_TARGET
+ if [info exists LDD_FOR_TARGET] {
+ set ldd $LDD_FOR_TARGET
+ } else {
+ set ldd "ldd"
+ }
+ return $ldd
+}
+
proc gdb_default_target_compile {source destfile type options} {
global target_triplet
global tool_root_dir
}
set binfile ${objdir}/${subdir}/${executable}
- set command "ldd $binfile"
+ set ldd [gdb_find_ldd]
+ set command "$ldd $binfile"
set test "ldd $executable"
set result [catch "exec $command" output]
verbose -log "result of $command is $result"
}
# Last line does miss the trailing \n. There can be multiple such messages
# as ARG may list multiple files.
- if {$result == 1 && [regexp {^(/usr/sbin/prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
+ if {$result == 1 && [regexp {^([^\r\n]*prelink[^\r\n]*: [^ ]* does not have .gnu.prelink_undo section\n?)*$} $output]} {
pass $test
return 1
} else {