mozilla/rust — pull request #10942 by neykov (2013-12-12 21:54:27+00:00)
Title: Compiler support for embedded targets running the Thumb instruction set.

* Add support for no operating system (bare-metal) - none OS;
* Add support for thumb* architecture family, i.e. thumbv7em;

The changes are for the compiler only. Std, Extra, etc. libraries can't be cross-compiled at this point therefore no changes to the build system are necessary to support the additional target.

Sample command to compile an executable for the target using a patched compiler:
```
rustc --target=thumbv7em-none-eabi --target-cpu=cortex-m4 main.rs \
-o blinky.elf -A dead_code -Z hard-float -Z debug-info \
--linker arm-none-eabi-gcc --link-args "-mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Tsys/stm32_flash.ld -lstm32f4"
```