Redid how compiler-rt is built by using the Rust makefiles to build it
instead of compiler-rt's build system. Rust itself deviated from using
compiler-rt's build system and provided their own rules requiring the
source tree to be configured to use them.
Since we no longer use shared source we can modify the source directory
as we build. This drops another patch we need to build and simplifies
the addition of Rust 1.12.1 in #97.
I'm honestly not sure what this patch does since everything appears to
build the same with and without it. I did a `tree` of the sysroots and
images and I don't see any file differences. Something like this used to
be necessary in Gentoo but I dropped it a few releases back.
This drops the ability to supply your own rust through the PACKAGECONFIG
local-rust option. This isn't tested and we really need to better expand
support for build arches. At the same time this simplifies how the rust
stage0 snapshot is extracted and used by the build system.
This whitespace in here causes rust to not be happy with the features
and throw warnings about a feature such as ' +sse3' being unsupported
when '+sse3' works just fine. Amazingly will cause rustc to abort when
you try to resolve the features to valid configs with the `--print` arg
to rustc.
The data layout changed for Rust 1.10. I noticed this because I got a
crash when using rust-native to build rust. The assertion that hit was
saying data layout mismatch and caused me to check the values in the
Rust sources.
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.
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.
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.
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
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>