aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/gdb.base/break-interp.exp5
-rw-r--r--gdb/testsuite/gdb.base/prelink.exp6
-rw-r--r--gdb/testsuite/gdb.base/solib-nodir.exp3
-rw-r--r--gdb/testsuite/gdb.threads/tls-sepdebug.exp8
4 files changed, 8 insertions, 14 deletions
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp
index d7f84db..98f67ee 100644
--- a/gdb/testsuite/gdb.base/break-interp.exp
+++ b/gdb/testsuite/gdb.base/break-interp.exp
@@ -29,9 +29,8 @@ set binfile_lib ${binprefix}.so
set srcfile "${test}-main.c"
set srcfile_lib "${test}-lib.c"
-# Use -soname so that the new library gets copied by build_executable_own_libs.
-
-if {[gdb_compile_shlib ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} [list debug ldflags=-Wl,-soname,${test}.so]] != ""} {
+if {[build_executable "build library" ${binfile_lib} ${srcfile_lib} \
+ {debug shlib}] == -1} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/prelink.exp b/gdb/testsuite/gdb.base/prelink.exp
index 50f7367..6b4790e 100644
--- a/gdb/testsuite/gdb.base/prelink.exp
+++ b/gdb/testsuite/gdb.base/prelink.exp
@@ -29,10 +29,8 @@ set testfile "prelink"
set libsrcfile ${testfile}-lib.c
set libfile [standard_output_file ${testfile}.so]
-# Use -soname so that the new library gets copied by build_executable_own_libs.
-
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${libsrcfile}" "${libfile}" [list debug "ldflags=-Wl,-soname,[file tail ${libfile}]"]] != ""} {
- # If creating the shared library fails, maybe we don't have the right tools
+if {[build_executable "build library" ${libfile} ${libsrcfile} \
+ {debug shlib}] == -1} {
return -1
}
diff --git a/gdb/testsuite/gdb.base/solib-nodir.exp b/gdb/testsuite/gdb.base/solib-nodir.exp
index 625f06f..fe34396 100644
--- a/gdb/testsuite/gdb.base/solib-nodir.exp
+++ b/gdb/testsuite/gdb.base/solib-nodir.exp
@@ -36,7 +36,8 @@ set objfile [standard_output_file ${executable}.o]
set binfile [standard_output_file ${executable}]
# build the first test case
-if { [gdb_compile_shlib "${srcdir}/${subdir}/${srclibfile}" "${binlibfile}" [list debug ldflags=-Wl,-soname,${binlibfilebase}]] != ""
+if { [build_executable "build library" ${binlibfile} ${srclibfile} \
+ {debug shlib}] == -1
|| [gdb_gnu_strip_debug $binlibfile]
|| [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objfile}" object {debug}] != ""
|| [gdb_compile "${objfile} ${binlibfile}" "${binfile}" executable {}] != "" } {
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
index 182a3f2..14a0c45 100644
--- a/gdb/testsuite/gdb.threads/tls-sepdebug.exp
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
@@ -43,12 +43,8 @@ set binsharedfile [standard_output_file ${binsharedbase}]
# The compile flag -std=c11 is required because the test case uses
# 'thread_local' to indicate thread local storage. This is available
# as a macro starting in C11 and became a C-language keyword in C23.
-if { [gdb_compile_shlib \
- "${srcdir}/${subdir}/${srcsharedfile}" "${binsharedfile}" \
- [list debug \
- ldflags=-Wl,-soname=${binsharedbase} \
- additional_flags=-std=c11]] \
- != "" } {
+if { [build_executable "build library" ${binsharedfile} ${srcsharedfile} \
+ {debug shlib additional_flags=-std=c11}] == -1 } {
untested "Couldn't compile test library"
return -1
}