]> git.lizzy.rs Git - rust.git/commitdiff
auto merge of #11700 : bharrisau/rust/thumb, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 21 Jan 2014 19:26:13 +0000 (11:26 -0800)
committerbors <bors@rust-lang.org>
Tue, 21 Jan 2014 19:26:13 +0000 (11:26 -0800)
To build for the cortex-M series ARM processors LLC needs to be told to build for the thumb instruction set. There are two ways to do this, either with the triple "thumb\*-\*-\*" or with -march=thumb (which just overrides the triple anyway). I chose the first way.

The following will fail because the local cc doesn't know what to do with -mthumb.
````
rustc test.rs --lib --target thumb-linux-eab
error: linking with `cc` failed: exit code: 1
note: cc: error: unrecognized command line option ‘-mthumb’
````

Changing the linker works as expected.
````
rustc test.rs --lib --target thumb-linux-eabi --linker arm-none-eabi-gcc
````

Ideally I'd have the triple thumb-none-eabi, but adding a new OS looks like much more work (and I'm not familiar enough with what it does to know if it is needed).

1  2 
src/librustc/driver/driver.rs

Simple merge