diff --git a/ChangeLog b/ChangeLog index 3c45036..8bc1dde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2020-06-22 Jacob Bachmeyer + + * lib/target.exp (default_target_compile): Actually use internal + option for separate linker provided for Go language support. This + seems to have been accidentally omitted from Tom Tromey's patches. + (default_target_compile): Ensure that "--emit obj" is spaced from + previous item when used to compile Rust. Use "--emit asm" instead + of "-S" when generating assembly from Rust sources. + 2020-06-20 Jacob Bachmeyer * doc/dejagnu.texi (Libgloss): Update menu. 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]} {