meta-rust has some layers it depends on and this script ensures it
fetches them down appropriately so that the poky directory can be used
as the source.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
The containerize script fetches down a Docker container and wires up the
current directory inside so that you can use a known good environment
for compiling Yocto that has all the dependencies.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
rustllvm ships some c++ code that we need to ensure is built with the
flags we want. Abuse an existing variable to make this happen.
This should fix our issues with the libstdc++ cxx11 abi (_GLIBCXX_USE_CXX11_ABI).
When rust's build system builds llvm itself, it uses these flags. Avoid
them interfering with other things by cleaning their usage out of the
platform cfg mk file.
The old cargo.bbclass had no users in meta-rust and had lots of
problems (not least of which was lots of duplicated lines with
cargo_util.bbclass). Delete the old cargo.bbclass and replace it
entirely wiht cargo_util
It's forbidden to access the network during the build phase in bitbake.
Since this version of cargo does not yet support source-replacement, we
must patch out the behavior instead.
OE-Core rev aeb653861a0ec39ea7a014c0622980edcbf653fa (between jethro and
krogoth) removed -e from the default flags in EXTRA_OEMAKE. Without
this, the makefile will default to gcc for CC.
The local registry is a more future-proof way to prevent cargo from
accessing the network during the build. Unfortunately, this is only
used during the build of cargo-native for now. The snapshot used while
building cargo-native supports using a local registry ("source
replacement") however the version of cargo supported by rust 1.10 does
not.
Until we can build a new-enough version of cargo that supports
source-replacement, we'll have to patch cargo directly to prevent it
from accessing the network. Once we do have a new-enough cargo, we can
stop populating cargo_home/registry and only create cargo_registry.
Instead of building a full compiler, we can use rust-native to
cross-compile. All we need is a cross-compiled standard library, which
libstd-rs builds, and a compiler spec file. rust-cross is now just used
to generate the json spec file for cross-compiling, which is naturally
much faster.
This is the compatible version shipped with Rust 1.10.0. Use the git
hash from the release TOML file so there is no ambiguity.
Update git2 and curl dependencies and patches to match those in
Cargo.lock.