diff --git a/README.md b/README.md index 4fd7598..648e166 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,23 @@ ecosystem get their act together, you'll need to supply patches to the misbehaving packages. See `recipies/cargo/cargo_*.bb` for an example of how to do this. +## Cargo + +Cargo may not work with the latest rust. +You can either: + + - use the system cargo: + + CARGO_PROVIDED = "cargo-native" + ASSUME_PROVIDED += "${CARGO_PROVIDED}" + + - or have cargo use a rust snapshot + + PACKAGECONFIG_append_pn-cargo-native = " rust-snapshot" + +For now, we default to using the 'rust-snapshot' PACKAGECONFIG to avoid lots of +failures. + ## TODO - Include downloaded stage0 snapshot in `SRC_URI` diff --git a/conf/layer.conf b/conf/layer.conf index 61b3352..d65f443 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -7,8 +7,3 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend" BBFILE_COLLECTIONS += "rust-layer" BBFILE_PATTERN_rust-layer := "^${LAYERDIR}/" BBFILE_PRIORITY_rust-layer = "7" - -# cargo generally doesn't work with the latest rust. Default to using the -# system's own cargo for cargo-native. -#CARGO_PROVIDED = "cargo-native" -#ASSUME_PROVIDED += "${CARGO_PROVIDED}" diff --git a/recipes/cargo/cargo.inc b/recipes/cargo/cargo.inc index c0f10c4..da66aec 100644 --- a/recipes/cargo/cargo.inc +++ b/recipes/cargo/cargo.inc @@ -23,7 +23,7 @@ PV .= "+git${SRCPV}" S = "${WORKDIR}/git" B = "${S}" -PACKAGECONFIG ??= "" +# PACKAGECONFIG is set in .bb files PACKAGECONFIG[rust-snapshot] = "--local-rust-root=${B}/rustc" do_configure () { @@ -50,10 +50,6 @@ do_configure () { } do_compile () { - # env vars are used by gcc-rs - # HOST is set once we have this cargo, but we need to manually - # set it for the bootstrap. - export HOST="${BUILD_SYS}" oe_cargo_fix_env oe_runmake ARGS="--verbose" } diff --git a/recipes/cargo/cargo_git.bb b/recipes/cargo/cargo_git.bb index 11c602b..9833488 100644 --- a/recipes/cargo/cargo_git.bb +++ b/recipes/cargo/cargo_git.bb @@ -1,4 +1,6 @@ SRCREV_cargo = "e6abfbb959b363248ee03c731a67d2897dd061ce" +PACKAGECONFIG ??= "rust-snapshot" + require cargo.inc SRC_URI += " \ @@ -10,7 +12,10 @@ SRC_URI += " \ file://ssh2-rs/0001-Unconditionally-depend-on-openssl-sys.patch;patchdir=../ssh2-rs \ " -SRCREV_curl-rust = "6f4d66ed0bc5e71a0ea86a37f038f7c9f73dc3ae" +# 0.1.4 +#SRCREV_curl-rust = "6f4d66ed0bc5e71a0ea86a37f038f7c9f73dc3ae" +# 0.1.3 +SRCREV_curl-rust = "4517ee606c65bbe03e4ad4f661725eb80e667a69" SRCREV_ssh2-rs = "509a8459e466ffa4705a0c686b80ac80b499f5d5" SRCREV_FORMAT = "cargo_curl-rust_ssh2-rs" EXTRA_OECARGO_PATHS = "\ diff --git a/recipes/rust/rust_0.12.0+git.bb b/recipes/rust/rust_0.12.0+git.bb index a1b69e2..1e573c9 100644 --- a/recipes/rust/rust_0.12.0+git.bb +++ b/recipes/rust/rust_0.12.0+git.bb @@ -1,4 +1,6 @@ SRCREV = "71123902e17ad339649f33423995eac78da40e3c" +# pre-ascii reform +#SRCREV = "0201334439393bed205c1148bed425b80aab8c22" require rust-git.inc SRC_URI_append = "\