]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
libctf: test: add lookup_link
authorNick Alcock <nick.alcock@oracle.com>
Fri, 26 Apr 2024 17:13:23 +0000 (18:13 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 17 May 2024 11:58:18 +0000 (12:58 +0100)
This .lk option lets you link the lookup program with extra libraries
in addition to -lctf.

libctf/
* testsuite/lib/ctf-lib.exp (run_lookup_test): Add lookup_link.

libctf/testsuite/lib/ctf-lib.exp

index 3df76198d669769d4662f5d0b2623836261a9d36..523a8c31e1e33601f1f0a16a16821ab7bee66e42 100644 (file)
@@ -100,6 +100,9 @@ proc compile_link_one_host_cc { src output additional_args } {
 #   link_flags:
 #      If set, extra flags to pass to the linker.
 #
+#   lookup_link:
+#       If set, extra libraries to link the lookup program with.
+#
 #   xfail: GLOB|PROC ...
 #      This test is expected to fail on a specified list of targets.
 #
@@ -137,6 +140,7 @@ proc run_lookup_test { name } {
     set shared "-shared"
     set opts(link) {}
     set opts(link_flags) {}
+    set opts(lookup_link) {}
     set opts(nonshared) {}
     set opts(lookup) {}
     set opts(name) {}
@@ -191,7 +195,7 @@ proc run_lookup_test { name } {
     }
 
     # Compile and link the lookup program.
-    set comp_output [prune_warnings [compile_link_one_host_cc $opts(lookup) "tmpdir/lookup" "libctf.la"]]
+    set comp_output [prune_warnings [compile_link_one_host_cc $opts(lookup) "tmpdir/lookup" "libctf.la $opts(lookup_link)"]]
 
     if { $comp_output != ""} {
        send_log "compilation of lookup program $opts(lookup) failed with <$comp_output>"