From f748246caea8da57677bd1eda4e18948ed27aa78 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 22 Nov 2016 10:56:20 -0600 Subject: [PATCH 1/3] remove commented out bits --- classes/rust.bbclass | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/classes/rust.bbclass b/classes/rust.bbclass index 0809186..e4fb677 100644 --- a/classes/rust.bbclass +++ b/classes/rust.bbclass @@ -31,18 +31,6 @@ DEPENDS_append = " ${@rust_base_dep(d)} patchelf-native" # -L${STAGING_BASE_LIBDIR_NATIVE} \ #" -RUST_PATH_NATIVE = "${STAGING_LIBDIR_NATIVE}:${STAGING_BASE_LIBDIR_NATIVE}" - -## Note: the 'rustlib' element of this was a workaround rustc forgetting the -## libdir it was built with. It now remembers so this should be unneeded -#RUST_PATH_NATIVE .= ":${STAGING_LIBDIR_NATIVE}/${TARGET_SYS}/rustlib/${TARGET_SYS}/lib" - -# FIXME: set based on whether we are native vs cross vs buildsdk, etc -#export RUST_PATH ??= "${RUST_PATH_NATIVE}" - -## This is builtin to rustc with the value "$libdir/rust/targets" -# RUST_TARGET_PATH = "foo:bar" - oe_runrustc () { bbnote ${RUSTC} ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@" "${RUSTC}" ${RUSTC_ARCHFLAGS} ${RUSTC_FLAGS} "$@" From 87f67e6d8616bc8d10ffa51920b01c17bba08236 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 22 Nov 2016 10:56:54 -0600 Subject: [PATCH 2/3] remove a call to 'env' For debugging people should really use 'bitbake -e rust' instead. --- recipes-devtools/rust/rust.inc | 1 - 1 file changed, 1 deletion(-) diff --git a/recipes-devtools/rust/rust.inc b/recipes-devtools/rust/rust.inc index ab35d85..db4dcde 100644 --- a/recipes-devtools/rust/rust.inc +++ b/recipes-devtools/rust/rust.inc @@ -415,7 +415,6 @@ do_configure () { rust_runmake () { echo "COMPILE ${PN}" "$@" - env # CFLAGS, LDFLAGS, CXXFLAGS, CPPFLAGS are used by rust's build for a # wide range of targets (not just TARGET). Yocto's settings for them will From 19cdae76b81af6e7448433090fb1b9f974004d74 Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Tue, 22 Nov 2016 11:55:36 -0600 Subject: [PATCH 3/3] compiler-rt: pass only env needed Build compiler-rt how upstream Rust does it and don't rely on the entire environment being passed to the build process. --- recipes-devtools/rust/compiler-rt_1.10.0.bb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes-devtools/rust/compiler-rt_1.10.0.bb b/recipes-devtools/rust/compiler-rt_1.10.0.bb index 9958bd9..b5e570d 100644 --- a/recipes-devtools/rust/compiler-rt_1.10.0.bb +++ b/recipes-devtools/rust/compiler-rt_1.10.0.bb @@ -12,13 +12,14 @@ require rust-source-${PV}.inc S = "${WORKDIR}/rustc-${PV}/src/compiler-rt" -# Pick up $CC from the environment -EXTRA_OEMAKE += "-e" - do_compile () { oe_runmake -C ${S} \ ProjSrcRoot="${S}" \ ProjObjRoot="${B}" \ + CC="${CC}" \ + AR="${AR}" \ + RANLIB="${RANLIB}" \ + CFLAGS="${CFLAGS}" \ TargetTriple=${HOST_SYS} \ triple-builtins }