[gdb/testsuite] Use shlib gdb_compile option in gdb.base/skip-solib.exp
authorTom de Vries <tdevries@suse.de>
Tue, 7 Mar 2023 14:45:47 +0000 (15:45 +0100)
committerTom de Vries <tdevries@suse.de>
Tue, 7 Mar 2023 14:45:47 +0000 (15:45 +0100)
commite06f6174c01db6eb9533beb2121daaaf01a49d6a
treec54a1256e7ecc401c94ef085d286f7f6fccb9cfe
parentdfe30a41c8c1237f70a9cc31cc8cc90f1c1a46f6
[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.
gdb/testsuite/gdb.base/skip-solib.exp