aboutsummaryrefslogtreecommitdiff
path: root/lib/target.exp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/target.exp')
-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"