From 436d9a6593b582f0e03bc9209073b92b6ad69e80 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Mon, 17 Nov 2014 01:44:52 -0500 Subject: [PATCH] This is awful --- classes/internal-rust-cross.bbclass | 2 +- recipes/rust/rust.inc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/classes/internal-rust-cross.bbclass b/classes/internal-rust-cross.bbclass index e26f55e..ce0fa13 100644 --- a/classes/internal-rust-cross.bbclass +++ b/classes/internal-rust-cross.bbclass @@ -9,7 +9,7 @@ PN = "rust-cross-${TARGET_ARCH}" # The same value as ${TOOLCHAIN_OPTIONS}. We can't use that variable directly # here because cross.bblcass is "helpful" and blanks it out. -PRE_LINK_ARGS_PREPEND = "--sysroot=${STAGING_DIR_TARGET}" +TARGET_PRE_LINK_ARGS_PREPEND = "--sysroot=${STAGING_DIR_TARGET}" ## gcc-cross settings # INHIBIT_DEFAULT_DEPS = "1" diff --git a/recipes/rust/rust.inc b/recipes/rust/rust.inc index 67d4e39..a13f7f0 100644 --- a/recipes/rust/rust.inc +++ b/recipes/rust/rust.inc @@ -113,7 +113,8 @@ def rust_gen_target(d, thing, wd): features = d.getVarFlag('FEATURES', arch, True) or "" pre_link_args = (d.getVarFlag('PRE_LINK_ARGS', arch, True) or "").split() - pre_link_args.extend((d.getVar('PRE_LINK_ARGS_PREPEND', True) or "").split()) + if thing == 'TARGET': + pre_link_args.extend((d.getVar('TARGET_PRE_LINK_ARGS_PREPEND', True) or "").split()) o.write('''{{ "data-layout": "{}",