diff --git a/classes/internal-rust-cross.bbclass b/classes/internal-rust-cross.bbclass index 3c16510..23c7df8 100644 --- a/classes/internal-rust-cross.bbclass +++ b/classes/internal-rust-cross.bbclass @@ -12,6 +12,11 @@ PN = "rust-cross-${TARGET_ARCH}" # here because cross.bblcass is "helpful" and blanks it out. #TARGET_PRE_LINK_ARGS_append = " --sysroot=${STAGING_DIR_TARGET}" +# FIXME: the only way to convince cargo to include the rpath is via editing +# Config.toml, and doing that safely requires us to write actual patches +HOST_PRE_LINK_ARGS_append = " -Wl,-rpath=${libdir}" +BUILD_PRE_LINK_ARGS_append = " -Wl,-rpath=${libdir}" + # We need the same thing for the calls to the compiler when building the runtime crap TARGET_CC_ARCH_append = " --sysroot=${STAGING_DIR_TARGET}" diff --git a/recipes/cargo/cargo_2014-12-02.bb b/recipes/cargo/cargo_2014-12-02.bb index e72f3f9..508e8a1 100644 --- a/recipes/cargo/cargo_2014-12-02.bb +++ b/recipes/cargo/cargo_2014-12-02.bb @@ -22,5 +22,3 @@ EXTRA_OECARGO_PATHS = "\ ${WORKDIR}/gcc-rs \ ${WORKDIR}/ssh2-rs \ " - - diff --git a/recipes/rust/rust.inc b/recipes/rust/rust.inc index 0943056..9aa1e15 100644 --- a/recipes/rust/rust.inc +++ b/recipes/rust/rust.inc @@ -49,10 +49,10 @@ PRE_LINK_ARGS[i586] = "-Wl,--as-needed -m32" # XXX: for some reason bitbake sets BUILD_* & TARGET_* but uses the bare # variables for HOST. Alias things to make it easier for us. -HOST_LDFLAGS ??= "${LDFLAGS}" -HOST_CFLAGS ??= "${CFLAGS}" -HOST_CXXFLAGS ??= "${CXXFLAGS}" -HOST_CPPFLAGS ??= "${CPPFLAGS}" +HOST_LDFLAGS ?= "${LDFLAGS}" +HOST_CFLAGS ?= "${CFLAGS}" +HOST_CXXFLAGS ?= "${CXXFLAGS}" +HOST_CPPFLAGS ?= "${CPPFLAGS}" # XXX: BITBAKE-BUG: *_PRE_LINK_ARGS used to be set via function invocation, but # that caused bitbake to error on users of these variables without any