[pushed 1/2] [gdb/testsuite] Use shlib gdb_compile option in gdb.base/skip-solib.exp
Tom de Vries
tdevries@suse.de
Tue Mar 7 14:46:02 GMT 2023
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 | 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
}
base-commit: dfe30a41c8c1237f70a9cc31cc8cc90f1c1a46f6
--
2.35.3
More information about the Gdb-patches
mailing list