Merge pull request #31 from srwalter/aarch64-support

Support building for the ARMv8 (64-bit) architecture
This commit is contained in:
Cody Schafer
2016-02-02 12:13:27 -05:00
4 changed files with 14 additions and 2 deletions
+5 -1
View File
@@ -36,7 +36,11 @@ OVERLAP_DEPS = "${@get_overlap_deps(d)}"
# See https://github.com/rust-lang/rust/issues/19680
RUSTC_FLAGS += "-C prefer-dynamic"
rustlib="${libdir}/${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/lib"
rustlib_suffix="${TUNE_ARCH}${TARGET_VENDOR}-${TARGET_OS}/rustlib/${HOST_SYS}/lib"
# Native sysroot standard library path
rustlib_src="${prefix}/lib/${rustlib_suffix}"
# Host sysroot standard library path
rustlib="${libdir}/${rustlib_suffix}"
CRATE_NAME ?= "${@d.getVar('BPN', True).replace('-rs', '').replace('-', '_')}"
BINNAME ?= "${BPN}"
LIBNAME ?= "lib${CRATE_NAME}-rs"
+2
View File
@@ -33,6 +33,8 @@ def rust_base_triple(d, thing):
if arch.startswith("arm"):
if os.endswith("gnueabi"):
os += bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hf', '', d)
elif arch.startswith("aarch64"):
os = "linux-gnu"
elif arch.startswith("x86_64"):
os = "linux-gnu"
elif arch.startswith("i586"):
+6
View File
@@ -37,6 +37,12 @@ TARGET_POINTER_WIDTH[arm] = "32"
FEATURES[arm] = "+v6,+vfp2"
PRE_LINK_ARGS[arm] = "-Wl,--as-needed"
DATA_LAYOUT[aarch64] = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-n32:64-S128"
LLVM_TARGET[aarch64] = "aarch64-unknown-linux-gnu"
TARGET_ENDIAN[aarch64] = "little"
TARGET_POINTER_WIDTH[aarch64] = "64"
PRE_LINK_ARGS[aarch64] = "-Wl,--as-needed"
## x86_64-unknown-linux-gnu
DATA_LAYOUT[x86_64] = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
LLVM_TARGET[x86_64] = "x86_64-unknown-linux-gnu"
+1 -1
View File
@@ -9,7 +9,7 @@ DEPENDS += "virtual/${TARGET_PREFIX}rust"
RUSTLIB_DEP = ""
do_install () {
for f in ${STAGING_DIR_NATIVE}/${rustlib}/*.so; do
for f in ${STAGING_DIR_NATIVE}/${rustlib_src}/*.so; do
echo Installing $f
install -D -m 755 $f ${D}/${rustlib}/$(basename $f)
done