Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for the crosstool-ng Raspberry Pi 2 toolchain #30948

Merged
merged 1 commit into from
Jan 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions mk/cfg/armv7-unknown-linux-gnueabihf.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# armv7-unknown-linux-gnueabihf configuration
CROSS_PREFIX_armv7-unknown-linux-gnueabihf=armv7-unknown-linux-gnueabihf-
CC_armv7-unknown-linux-gnueabihf=gcc
CXX_armv7-unknown-linux-gnueabihf=g++
CPP_armv7-unknown-linux-gnueabihf=gcc -E
AR_armv7-unknown-linux-gnueabihf=ar
CFG_LIB_NAME_armv7-unknown-linux-gnueabihf=lib$(1).so
CFG_STATIC_LIB_NAME_armv7-unknown-linux-gnueabihf=lib$(1).a
CFG_LIB_GLOB_armv7-unknown-linux-gnueabihf=lib$(1)-*.so
CFG_LIB_DSYM_GLOB_armv7-unknown-linux-gnueabihf=lib$(1)-*.dylib.dSYM
CFG_JEMALLOC_CFLAGS_armv7-unknown-linux-gnueabihf := -D__arm__ $(CFLAGS)
CFG_GCCISH_CFLAGS_armv7-unknown-linux-gnueabihf := -Wall -g -fPIC -D__arm__ $(CFLAGS)
CFG_GCCISH_CXXFLAGS_armv7-unknown-linux-gnueabihf := -fno-rtti $(CXXFLAGS)
CFG_GCCISH_LINK_FLAGS_armv7-unknown-linux-gnueabihf := -shared -fPIC -g
CFG_GCCISH_DEF_FLAG_armv7-unknown-linux-gnueabihf := -Wl,--export-dynamic,--dynamic-list=
CFG_LLC_FLAGS_armv7-unknown-linux-gnueabihf :=
CFG_INSTALL_NAME_ar,-unknown-linux-gnueabihf =
CFG_EXE_SUFFIX_armv7-unknown-linux-gnueabihf :=
CFG_WINDOWSY_armv7-unknown-linux-gnueabihf :=
CFG_UNIXY_armv7-unknown-linux-gnueabihf := 1
CFG_LDPATH_armv7-unknown-linux-gnueabihf :=
CFG_RUN_armv7-unknown-linux-gnueabihf=$(2)
CFG_RUN_TARG_armv7-unknown-linux-gnueabihf=$(call CFG_RUN_armv7-unknown-linux-gnueabihf,,$(2))
RUSTC_FLAGS_armv7-unknown-linux-gnueabihf := -C target-feature=+v7,+vfp2,+neon
RUSTC_CROSS_FLAGS_armv7-unknown-linux-gnueabihf :=
CFG_GNU_TRIPLE_armv7-unknown-linux-gnueabihf := armv7-unknown-linux-gnueabihf
31 changes: 31 additions & 0 deletions src/librustc_back/target/armv7_unknown_linux_gnueabihf.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2016 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, TargetOptions};

pub fn target() -> Target {
let base = super::linux_base::opts();
Target {
llvm_target: "armv7-unknown-linux-gnueabihf".to_string(),
target_endian: "little".to_string(),
target_pointer_width: "32".to_string(),
arch: "arm".to_string(),
target_os: "linux".to_string(),
target_env: "gnueabihf".to_string(),
target_vendor: "unknown".to_string(),

options: TargetOptions {
features: "+v7,+vfp2,+neon".to_string(),
cpu: "cortex-a7".to_string(),
.. base
}
}
}

1 change: 1 addition & 0 deletions src/librustc_back/target/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ impl Target {
powerpc64le_unknown_linux_gnu,
arm_unknown_linux_gnueabi,
arm_unknown_linux_gnueabihf,
armv7_unknown_linux_gnueabihf,
aarch64_unknown_linux_gnu,
x86_64_unknown_linux_musl,

Expand Down