Convert rust to not use the shared source setup and instead use its own
extracted directory. Include the version info in the bitbake file so
that in the future we can support multiple versions via a
PREFERRED_VERSIONS variable.
Convert rust-llvm to not use the shared source setup and instead use its
own extracted directory. Include the version info in the bitbake file so
that in the future we can support multiple versions via a
PREFERRED_VERSIONS variable.
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.
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.
Rust does something fairly different than in 1.7. Instead of just
expecting the tarball to exist, it either expects an already extracted
and ready toolchain, or else it does everything itself.
To work with that, we'll always pass --use-local-rust to ./configure so
that bootstrap.py doesn't try to download anything. We'll either
download and setup a snapshot ourselves, or use the system rust, based
on PACKAGECONFIG[local-rust] as before
The August snapshot is no longer new enough for rust 1.7.0. Without the
update rust's build process still tries to download its own snapshot,
which rather defeats the point of this.
Rust 1.7.0 uses a snapshot from 2015-12-18 and not 2015-08-11. Without
this change Rust will fetch the snapshot during the build process which
will fail on Yocto builds that disable network outside of the fetch
phase.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
The existing feature parsing is specific to ARM so we need to add
support for x86. This is a little more generic since the variable we
parse is changed if we're building for the host, cross or actual target.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
This generates an appropriate CPU value for the targets. For ARM it
leaves the default of 'generic' since we build up all the different CPU
differences in the 'features' field but for x86/x86_64 we need to pass
an appropriate CPU value.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
The code previously wrote out a JSON file but used basic string handling
instead of the Python JSON library. Its cleaner to use the Python JSON
library.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Instead of patching in a disable ldconfig argument, just use the way
exposed by the rust-installer scripts to disable running ldconfig.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Since Rust 1.3.0
(rust-lang/rust@958d563825) it has been
unnecessary to provide the data layout in targets. Additionally the data
layouts in this repo created LLVM IR on x86_64 that was differing from
other x86_64 builds of Rust.
Signed-off-by: Doug Goldstein <cardoe@cardoe.com>