diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-02-14 03:59:11 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2016-02-14 05:06:36 +0530 |
| commit | 6d0d6088b4d0cceab4c821cba9329f0944461806 (patch) | |
| tree | cc9334c5008c8d97214a2631af3ca002a6f17ed8 /src/librustc_back/target | |
| parent | 34d95f498c805c6ae00d2aa085887a8ab11401ea (diff) | |
| parent | d3ca33fc6eadba8ddd8b87c7dd4b1def9f294a5d (diff) | |
| download | rust-6d0d6088b4d0cceab4c821cba9329f0944461806.tar.gz rust-6d0d6088b4d0cceab4c821cba9329f0944461806.zip | |
Rollup merge of #31629 - petevine:master, r=alexcrichton
This PR should make it easier to create a baseline x86 compiler as well as make cross-compilation possible through a separate set of rlibs. Plus, a few Linux distributions (e.g. Debian) have voiced interest in having this target available.
Diffstat (limited to 'src/librustc_back/target')
| -rw-r--r-- | src/librustc_back/target/i586_unknown_linux_gnu.rs | 28 | ||||
| -rw-r--r-- | src/librustc_back/target/mod.rs | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/librustc_back/target/i586_unknown_linux_gnu.rs b/src/librustc_back/target/i586_unknown_linux_gnu.rs new file mode 100644 index 00000000000..42d5674a2c8 --- /dev/null +++ b/src/librustc_back/target/i586_unknown_linux_gnu.rs @@ -0,0 +1,28 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use target::Target; + +pub fn target() -> Target { + let mut base = super::linux_base::opts(); + base.cpu = "pentium".to_string(); + base.pre_link_args.push("-m32".to_string()); + + Target { + llvm_target: "i586-unknown-linux-gnu".to_string(), + target_endian: "little".to_string(), + target_pointer_width: "32".to_string(), + arch: "x86".to_string(), + target_os: "linux".to_string(), + target_env: "gnu".to_string(), + target_vendor: "unknown".to_string(), + options: base, + } +} diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs index 95b7c2e3f07..a868178b14f 100644 --- a/src/librustc_back/target/mod.rs +++ b/src/librustc_back/target/mod.rs @@ -89,6 +89,7 @@ macro_rules! supported_targets { supported_targets! { ("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu), ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), + ("i586-unknown-linux-gnu", i586_unknown_linux_gnu), ("mips-unknown-linux-gnu", mips_unknown_linux_gnu), ("mipsel-unknown-linux-gnu", mipsel_unknown_linux_gnu), ("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu), |
