-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auto merge of #20980 : richo/rust/final-power, r=alexcrichton
Originally, this was going to be discussed and revisted, however I've been working on this for months, and a rebase on top of master was about 1 flight's worth of work so I just went ahead and did it. This gets you as far as being able to target powerpc with, eg: LD_LIBRARY_PATH=./x86_64-unknown-linux-gnu/stage2/lib/ x86_64-unknown-linux-gnu/stage2/bin/rustc -C linker=powerpc-linux-gnu-gcc --target powerpc-unknown-linux-gnu hello.rs Would really love to get this out before 1.0. r? @alexcrichton
- Loading branch information
Showing
26 changed files
with
364 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# powerpc-unknown-linux-gnu configuration | ||
CROSS_PREFIX_powerpc-unknown-linux-gnu=powerpc-linux-gnu- | ||
CC_powerpc-unknown-linux-gnu=$(CC) | ||
CXX_powerpc-unknown-linux-gnu=$(CXX) | ||
CPP_powerpc-unknown-linux-gnu=$(CPP) | ||
AR_powerpc-unknown-linux-gnu=$(AR) | ||
CFG_LIB_NAME_powerpc-unknown-linux-gnu=lib$(1).so | ||
CFG_STATIC_LIB_NAME_powerpc-unknown-linux-gnu=lib$(1).a | ||
CFG_LIB_GLOB_powerpc-unknown-linux-gnu=lib$(1)-*.so | ||
CFG_LIB_DSYM_GLOB_powerpc-unknown-linux-gnu=lib$(1)-*.dylib.dSYM | ||
CFG_CFLAGS_powerpc-unknown-linux-gnu := -m32 $(CFLAGS) | ||
CFG_GCCISH_CFLAGS_powerpc-unknown-linux-gnu := -Wall -Werror -g -fPIC -m32 $(CFLAGS) | ||
CFG_GCCISH_CXXFLAGS_powerpc-unknown-linux-gnu := -fno-rtti $(CXXFLAGS) | ||
CFG_GCCISH_LINK_FLAGS_powerpc-unknown-linux-gnu := -shared -fPIC -ldl -pthread -lrt -g -m32 | ||
CFG_GCCISH_DEF_FLAG_powerpc-unknown-linux-gnu := -Wl,--export-dynamic,--dynamic-list= | ||
CFG_GCCISH_PRE_LIB_FLAGS_powerpc-unknown-linux-gnu := -Wl,-whole-archive | ||
CFG_GCCISH_POST_LIB_FLAGS_powerpc-unknown-linux-gnu := -Wl,-no-whole-archive | ||
CFG_DEF_SUFFIX_powerpc-unknown-linux-gnu := .linux.def | ||
CFG_LLC_FLAGS_powerpc-unknown-linux-gnu := | ||
CFG_INSTALL_NAME_powerpc-unknown-linux-gnu = | ||
CFG_EXE_SUFFIX_powerpc-unknown-linux-gnu = | ||
CFG_WINDOWSY_powerpc-unknown-linux-gnu := | ||
CFG_UNIXY_powerpc-unknown-linux-gnu := 1 | ||
CFG_PATH_MUNGE_powerpc-unknown-linux-gnu := true | ||
CFG_LDPATH_powerpc-unknown-linux-gnu := | ||
CFG_RUN_powerpc-unknown-linux-gnu=$(2) | ||
CFG_RUN_TARG_powerpc-unknown-linux-gnu=$(call CFG_RUN_powerpc-unknown-linux-gnu,,$(2)) | ||
CFG_GNU_TRIPLE_powerpc-unknown-linux-gnu := powerpc-unknown-linux-gnu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Copyright 2012 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.pre_link_args.push("-m32".to_string()); | ||
|
||
Target { | ||
data_layout: "E-S8-p:32:32-f64:32:64-i64:32:64-f80:32:32-n8:16:32".to_string(), | ||
llvm_target: "powerpc-unknown-linux-gnu".to_string(), | ||
target_endian: "big".to_string(), | ||
target_pointer_width: "32".to_string(), | ||
arch: "powerpc".to_string(), | ||
target_os: "linux".to_string(), | ||
options: base, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.