diff options
author | Yao Qi <yao@codesourcery.com> | 2013-07-18 22:38:58 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-07-18 22:38:58 +0000 |
commit | a075c3e55bf3804e23d477ffa4f5f0fda58d5127 (patch) | |
tree | fcd8f696017b08ff05cca72d1db2005e4c9bcd5f | |
parent | faf786e66817bcfc5b6ead80cafe6acc3149df02 (diff) | |
download | gdb-a075c3e55bf3804e23d477ffa4f5f0fda58d5127.zip gdb-a075c3e55bf3804e23d477ffa4f5f0fda58d5127.tar.gz gdb-a075c3e55bf3804e23d477ffa4f5f0fda58d5127.tar.bz2 |
gdb/testsuite/
* lib/gdb.exp (gdb_compile_shlib): Pass the tail name of
$dest to link options if host is remote. Move the
generated file to $dest.a on host if host is remote.
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 18 |
2 files changed, 22 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 473c326..77b50fa 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2013-07-19 Yao Qi <yao@codesourcery.com> + + * lib/gdb.exp (gdb_compile_shlib): Pass the tail name of + $dest to link options if host is remote. Move the + generated file to $dest.a on host if host is remote. + 2013-07-18 Will Newton <will.newton@linaro.org> * gdb.threads/tls-nodebug.c: Call pthread_testcancel diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index fc9b071..70b797e 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2788,8 +2788,13 @@ proc gdb_compile_shlib {sources dest options} { if { ([istarget "*-*-mingw*"] || [istarget *-*-cygwin*] - || [istarget *-*-pe*])} { - lappend link_options "additional_flags=-Wl,--out-implib,${dest}.a" + || [istarget *-*-pe*]) } { + if { [is_remote host] } { + set name [file tail ${dest}] + } else { + set name ${dest} + } + lappend link_options "additional_flags=-Wl,--out-implib,${name}.a" } elseif [is_remote target] { # By default, we do not set the soname. This causes the linker # on ELF systems to create a DT_NEEDED entry in the executable @@ -2805,7 +2810,16 @@ proc gdb_compile_shlib {sources dest options} { if {[gdb_compile "${objects}" "${dest}" executable $link_options] != ""} { return -1 } + if { [is_remote host] + && ([istarget "*-*-mingw*"] + || [istarget *-*-cygwin*] + || [istarget *-*-pe*]) } { + set dest_tail_name [file tail ${dest}] + remote_upload host $dest_tail_name.a ${dest}.a + remote_file host delete $dest_tail_name.a + } } + return "" } # This is just like gdb_compile_shlib, above, except that it tries compiling |