From e6d50a88669cf4efd3b1604d3fd78bb409579bc1 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Wed, 19 Nov 2014 01:51:35 -0500 Subject: [PATCH] Fix HOST flags --- ...get-add-default-target.json-path-libdir-rust-targ.patch | 6 +++--- recipes/rust/rust.inc | 7 +++++++ recipes/rust/rust_0.12.0+2014-11-18.bb | 1 - 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/recipes/rust/files/0030-Target-add-default-target.json-path-libdir-rust-targ.patch b/recipes/rust/files/0030-Target-add-default-target.json-path-libdir-rust-targ.patch index 3dc7c1c..4f77593 100644 --- a/recipes/rust/files/0030-Target-add-default-target.json-path-libdir-rust-targ.patch +++ b/recipes/rust/files/0030-Target-add-default-target.json-path-libdir-rust-targ.patch @@ -1,4 +1,4 @@ -From b0b65f8b4c660b21b92ce2743fe2b03b310927b0 Mon Sep 17 00:00:00 2001 +From 302d94ff44c5a6bda5a40fa02304d583cc1a73b5 Mon Sep 17 00:00:00 2001 From: Cody P Schafer Date: Tue, 18 Nov 2014 01:40:21 -0500 Subject: [PATCH] Target: add default target.json path: $libdir/rust/targets @@ -42,7 +42,7 @@ index 72a9f23..d6ccae7 100644 let default_sysroot = match sopts.maybe_sysroot { Some(_) => None, diff --git a/src/librustc_back/target/mod.rs b/src/librustc_back/target/mod.rs -index d7b4285..27ad897 100644 +index d7b4285..af9d7b1 100644 --- a/src/librustc_back/target/mod.rs +++ b/src/librustc_back/target/mod.rs @@ -291,7 +291,7 @@ impl Target { @@ -61,7 +61,7 @@ index d7b4285..27ad897 100644 - let paths = os::split_paths(target_path.as_slice()); - // FIXME 16351: add a sane default search path? + let mut paths = os::split_paths(target_path.as_slice()); -+ paths.push(sysroot.join_many([env!("CFG_LIBDIR_RELATIVE"), "rust", "targets"])); ++ paths.push(sysroot.join_many(&[env!("CFG_LIBDIR_RELATIVE"), "rust", "targets"])); for dir in paths.iter() { let p = dir.join(path.clone()); diff --git a/recipes/rust/rust.inc b/recipes/rust/rust.inc index d6aed59..6770363 100644 --- a/recipes/rust/rust.inc +++ b/recipes/rust/rust.inc @@ -47,6 +47,13 @@ TARGET_ENDIAN[i586] = "little" TARGET_WORD_SIZE[i586] = "32" 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}" + # XXX: BITBAKE-BUG: these used to be set via a function, but that caused bitbake to error on # users of these variables without any backtrace or error message other than # "failed" (of some form or another). Probably an issue with bitbake attempting diff --git a/recipes/rust/rust_0.12.0+2014-11-18.bb b/recipes/rust/rust_0.12.0+2014-11-18.bb index 0df5272..dcd2e8b 100644 --- a/recipes/rust/rust_0.12.0+2014-11-18.bb +++ b/recipes/rust/rust_0.12.0+2014-11-18.bb @@ -3,7 +3,6 @@ require rust-git.inc SRC_URI_append = "\ file://0001-platform.mk-avoid-choking-on-i586.patch \ - file://0005-CFG_CFLAGS-is-only-used-for-jemalloc-rename-all-uses.patch \ file://0007-mk-rt-compiler_rt-pass-LDFLAGS-from-CFG_GCCISH_LINK_.patch \ file://0020-Support-bindir.patch \ file://0021-Remember-relative-libdir-and-bindir-from-build-time.patch \