[AVR] Remove unnecessary arguments passed to the linker for GNU target
In general, linking with libc is not required, only libgcc is needed. As suggested in the code review, a better option for libc support is by building it into rust-lang/libc directly. This also removes the '-Os' argument to the linker, which is a NOP.
This commit is contained in:
parent
d785f9ba76
commit
53b940c74c
1 changed files with 3 additions and 4 deletions
|
@ -19,13 +19,12 @@ pub fn target(target_cpu: String) -> TargetResult {
|
|||
cpu: target_cpu.clone(),
|
||||
exe_suffix: ".elf".to_string(),
|
||||
linker: Some("avr-gcc".to_owned()),
|
||||
pre_link_args: vec![(
|
||||
LinkerFlavor::Gcc,
|
||||
vec!["-Os".to_owned(), format!("-mmcu={}", target_cpu)],
|
||||
pre_link_args: vec![(LinkerFlavor::Gcc,
|
||||
vec![format!("-mmcu={}", target_cpu)],
|
||||
)]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
late_link_args: vec![(LinkerFlavor::Gcc, vec!["-lc".to_owned(), "-lgcc".to_owned()])]
|
||||
late_link_args: vec![(LinkerFlavor::Gcc, vec!["-lgcc".to_owned()])]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
..super::freestanding_base::opts()
|
||||
|
|
Loading…
Reference in a new issue