aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJacob Bachmeyer <jcb62281+dev@gmail.com>2020-06-22 18:24:10 -0500
committerJacob Bachmeyer <jcb62281+dev@gmail.com>2020-06-22 18:24:10 -0500
commit3a4313df675a83e598bcb8fcfacf8761fe997db5 (patch)
tree124f1a404952d819862e39818b97db4b6c136102 /lib
parent26de73569e64b6a0e37d35541032f205095fb7c6 (diff)
Fix up upstreamed GDB testsuite patches
Diffstat (limited to 'lib')
-rw-r--r--lib/target.exp13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/target.exp b/lib/target.exp
index 57f3b3a..627f07f 100644
--- a/lib/target.exp
+++ b/lib/target.exp
@@ -320,6 +320,7 @@ proc default_target_compile {source destfile type options} {
set libs ""
set compiler_type "c"
set compiler ""
+ set linker ""
set ldflags ""
set dest [target_info name]
@@ -547,6 +548,10 @@ proc default_target_compile {source destfile type options} {
}
}
+ if { $type eq "executable" && $linker ne "" } {
+ set compiler $linker
+ }
+
if { $compiler eq "" } {
if { [board_info $dest exists compiler] } {
set compiler [board_info $dest compiler]
@@ -566,7 +571,7 @@ proc default_target_compile {source destfile type options} {
if {$type eq "object"} {
if {$compiler_type eq "rust"} {
- append add_flags "--emit obj"
+ append add_flags " --emit obj"
} else {
append add_flags " -c"
}
@@ -577,7 +582,11 @@ proc default_target_compile {source destfile type options} {
}
if { $type eq "assembly" } {
- append add_flags " -S"
+ if {$compiler_type eq "rust"} {
+ append add_flags " --emit asm"
+ } else {
+ append add_flags " -S"
+ }
}
if {[board_info $dest exists cflags]} {