info-shared.exp: Replace libs=-ldl with shlib_load
authorSimon Marchi <simon.marchi@ericsson.com>
Tue, 24 Apr 2018 14:14:14 +0000 (10:14 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Tue, 24 Apr 2018 14:14:27 +0000 (10:14 -0400)
As reported in PR 23104, -ldl doesn't work on FreeBSD.  Replace it with
shlib_load, which adds the right flags for dynamic library loading based
on the current target platform.

The test still passes on Linux, and should now pass on FreeBSD, though I
did not test personally.

gdb/testsuite/ChangeLog:

PR gdb/23104
* gdb.base/info-shared.exp: Replace libs=-ldl with shlib_load.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/info-shared.exp

index d5e9429041300fa0135914b3e9a838bf49ba9a7e..cb8dd8012f3ba02bb0f439b2c709a27b8239991a 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-24  Simon Marchi  <simon.marchi@ericsson.com>
+
+       PR gdb/23104
+       * gdb.base/info-shared.exp: Replace libs=-ldl with shlib_load.
+
 2018-04-19  Richard Bunt  <richard.bunt@arm.com>
 
        * gdb.threads/multiple-successive-infcall.c: New test.
index 4ffcb1be7e319209a5826b636cc4a6a339d8c68f..f228f18eb55d6d3154464276c6a079707f734267 100644 (file)
@@ -43,7 +43,7 @@ if { [gdb_compile_shlib $srcfile_lib2 $binfile_lib2 \
 
 set cflags "$define1 $define2"
 if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
-         [list additional_flags=$cflags libs=-ldl]] } {
+         [list additional_flags=$cflags shlib_load]] } {
     return -1
 }
 
This page took 0.029399 seconds and 4 git commands to generate.