public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Use shlib gdb_compile option in gdb.base/skip-solib.exp
@ 2023-03-07 14:45 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-03-07 14:45 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e06f6174c01db6eb9533beb2121daaaf01a49d6a

commit e06f6174c01db6eb9533beb2121daaaf01a49d6a
Author: Tom de Vries <tdevries@suse.de>
Date:   Tue Mar 7 15:45:47 2023 +0100

    [gdb/testsuite] Use shlib gdb_compile option in gdb.base/skip-solib.exp
    
    In test-case gdb.base/skip-solib.exp the linking against a shared library is
    done manually:
    ...
    if {[gdb_compile "${binfile_main}.o" "${binfile_main}" executable \
            [list debug "additional_flags=-L$testobjdir" \
                 "additional_flags=-l${test}" \
                 "ldflags=-Wl,-rpath=$testobjdir"]] != ""} {
    ...
    
    Instead, use the shlib gdb_compile option such that we simply have:
    ...
            [list debug shlib=$binfile_lib]] != ""} {
    ...
    
    Tested on x86_64-linux.

Diff:
---
 gdb/testsuite/gdb.base/skip-solib.exp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/gdb/testsuite/gdb.base/skip-solib.exp b/gdb/testsuite/gdb.base/skip-solib.exp
index 3cdb455bb59..f01196c3fed 100644
--- a/gdb/testsuite/gdb.base/skip-solib.exp
+++ b/gdb/testsuite/gdb.base/skip-solib.exp
@@ -51,9 +51,7 @@ if {[gdb_compile "${srcdir}/${subdir}/${srcfile_main}" "${binfile_main}.o" \
 
 set testobjdir [standard_output_file {}]
 if {[gdb_compile "${binfile_main}.o" "${binfile_main}" executable \
-	 [list debug "additional_flags=-L$testobjdir" \
-	      "additional_flags=-l${test}" \
-	      "ldflags=-Wl,-rpath=$testobjdir"]] != ""} {
+	 [list debug shlib=$binfile_lib]] != ""} {
     return -1
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-07 14:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-07 14:45 [binutils-gdb] [gdb/testsuite] Use shlib gdb_compile option in gdb.base/skip-solib.exp Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).