From d1c3e49ac2c48ec049112fcd8f7d4532bec23a2f Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Thu, 13 Nov 2014 02:27:29 -0500 Subject: [PATCH] triplet hacks --- classes/rust.bbclass | 18 +--- recipes/cargo/cargo_2014-11-06.bb | 1 + recipes/rust/rust.inc | 140 +++++++++++++++++++++++------- 3 files changed, 109 insertions(+), 50 deletions(-) diff --git a/classes/rust.bbclass b/classes/rust.bbclass index fca7137..1a066b3 100644 --- a/classes/rust.bbclass +++ b/classes/rust.bbclass @@ -1,20 +1,6 @@ -def rust_triple(arch, vendor, os, d): - if arch.startswith("arm"): - vendor = "-unknown" - if os.endswith("gnueabi"): - os += bb.utils.contains('TUNE_FEATURES', 'callconvention-hard', 'hf', '', d) - elif arch.startswith("x86_64"): - vendor = "-unknown" - if os == "linux": - os = "linux-gnu" - return arch + vendor + '-' + os - -RUST_TARGET_SYS = "${@rust_triple('${TARGET_ARCH}','${TARGET_VENDOR}','${TARGET_OS}', d)}" -RUST_BUILD_SYS = "${@rust_triple('${BUILD_ARCH}','${BUILD_VENDOR}','${BUILD_OS}', d)}" -RUST_HOST_SYS = "${@rust_triple('${HOST_ARCH}','${HOST_VENDOR}','${HOST_OS}', d)}" RUSTC = "rustc" -RUSTC_ARCHFLAGS += "--target=${RUST_TARGET_SYS} -C linker=${TARGET_PREFIX}gcc\\ ${TARGET_CC_ARCH}" +RUSTC_ARCHFLAGS += "--target=target" # BUILD_LDFLAGS @@ -55,11 +41,9 @@ oe_cargo_config () { cat >.cargo/config <>.cargo/config - cat >>.cargo/config <