aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacob Bachmeyer <jcb62281+dev@gmail.com>2020-06-22 18:25:30 -0500
committerJacob Bachmeyer <jcb62281+dev@gmail.com>2020-06-22 18:25:30 -0500
commita641e4899fbde3cfe8e0611542be2742818adc12 (patch)
tree1f260f467c04dbbfa4d18e3f4511b166081a2762 /lib
parent3a4313df675a83e598bcb8fcfacf8761fe997db5 (diff)
downloaddejagnu-a641e4899fbde3cfe8e0611542be2742818adc12.zip
dejagnu-a641e4899fbde3cfe8e0611542be2742818adc12.tar.gz
dejagnu-a641e4899fbde3cfe8e0611542be2742818adc12.tar.bz2
Add "linker=" option to target_compile to support testing
Diffstat (limited to 'lib')
-rw-r--r--lib/target.exp12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/target.exp b/lib/target.exp
index 627f07f..30f6eb3 100644
--- a/lib/target.exp
+++ b/lib/target.exp
@@ -312,15 +312,15 @@ proc default_target_compile {source destfile type options} {
}
set early_flags ""
- # linker_opts_order is one of "sources-then-flags", "flags-then-sources".
- # The order matters for things like -Wl,--as-needed. The default is to
- # preserve existing behavior.
- set linker_opts_order "sources-then-flags"
set add_flags ""
set libs ""
set compiler_type "c"
set compiler ""
set linker ""
+ # linker_opts_order is one of "sources-then-flags", "flags-then-sources".
+ # The order matters for things like -Wl,--as-needed. The default is to
+ # preserve existing behavior.
+ set linker_opts_order "sources-then-flags"
set ldflags ""
set dest [target_info name]
@@ -445,6 +445,10 @@ proc default_target_compile {source destfile type options} {
regsub "^compiler=" $i "" tmp
set compiler $tmp
}
+ if {[regexp "^linker=" $i]} {
+ regsub "^linker=" $i "" tmp
+ set linker $tmp
+ }
if {[regexp "^early_flags=" $i]} {
regsub "^early_flags=" $i "" tmp
append early_flags " $tmp"