Commit Graph

443 Commits

Author SHA1 Message Date
Cody P Schafer 41800bdd99 rust.inc: ensure proper flags are given to rustllvm
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).
2016-09-25 02:30:46 -04:00
Cody P Schafer 9b8d884d6b rust.inc: start passing *FLAGS vars to compile
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.
2016-09-25 02:29:29 -04:00
Cody P Schafer 45d540de36 rust.inc: EXTRA_OEMAKE is now empty by default, drop our set
Since poky rev: f8520142c8a33fa9414314511fb01fbe79a2bf01, oe-core rev:
aeb653861a0ec39ea7a014c0622980edcbf653fa
2016-09-25 00:53:39 -04:00
Cody P Schafer 1cb0b64537 rust: remove duplicated TARGET_LLVM_* vars 2016-09-24 13:20:00 -04:00
Doug Goldstein 4eb46035c5 Merge pull request #79 from jmesmon/fix-same-target-host
rust-cross: fix build where TARGET_ARCH and HOST_ARCH are the same
2016-09-15 11:24:33 -05:00
Doug Goldstein a78d470ed2 Merge pull request #78 from jmesmon/fix-cargo-disable-static
cargo: avoid build failure due to --disable-static not being recognized
2016-09-15 11:14:48 -05:00
Cody P Schafer 237a22fd17 rust-cross: fix build where TARGET_ARCH and HOST_ARCH are the same
By copying exactly the target we intend to.

Fixes #77
2016-09-14 00:16:07 -04:00
Cody P Schafer e47bf14904 cargo: avoid build failure due to --disable-static not being recognized
Not sure why this is starting to affect cargo now, but let's fix it.
2016-09-13 23:28:31 -04:00
Cody Schafer 79166b9cf0 Merge pull request #75 from meta-rust/remove-dups
Remove recipe enhancements that were upstreamed
2016-09-06 16:17:14 -04:00
Steven Walter 34f213d162 Merge pull request #71 from srwalter/cargo-no-network
Update cargo support so that there truly is no network access
2016-09-05 18:45:14 -04:00
Steven Walter 2247ad36aa README.md: link to cargo-bitbake helper program
cargo-bitbake can be used to generate recipes for cargo-based rust
packages.
2016-09-05 18:40:42 -04:00
Steven Walter fbf59ed6a0 cargo.bbclass: replace with what was cargo_util.bbclass
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
2016-09-05 18:40:42 -04:00
Steven Walter e87b2d43b0 libstd-rs: use cargo_util_do_compile 2016-09-05 18:38:38 -04:00
Steven Walter f31f0c2257 libstd-rs: download dependent crates
Cargo was trying to download these itself before, which isn't allowed.
Use the crate fetcher to get our dependencies
2016-09-05 18:38:38 -04:00
Steven Walter 1059968d25 cargo: never contact the registry
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.
2016-09-05 18:38:38 -04:00
Steven Walter cb753fc536 cargo.inc: switch to cargo_util.bbclass
This does all the fetching through bitbake which allows it to be built
correctly in firewalled environments.
2016-09-05 18:38:35 -04:00
Cody Schafer 6902ea276a Merge pull request #72 from tylerwhall/compiler-rt-fix
compiler-rt: ensure -e is passed to make
2016-09-03 23:57:32 -04:00
Tyler Hall 8af5d4f7e9 compiler-rt: ensure -e is passed to make
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.
2016-09-03 19:42:56 -04:00
Steven Walter 08ac2819f8 lib/crate.py: update magic hash for new cargo 2016-09-03 10:35:52 -04:00
Steven Walter f89057c0af lib/crate.py: additionally populate a local registry
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.
2016-09-03 10:35:52 -04:00
Steven Walter 0c54b5727f cargo-snapshot.inc: update to a newer nightly build
Switch to a nightly that supports the source-replacement feature.  This
allows us to swap in our locally-fetched crates for upstream crates.io
2016-09-03 10:35:52 -04:00
Steven Walter 11f0c95763 cargo_util.bbclass: fix for native users
Building native packages with cargo means with need a native rust
compiler
2016-09-03 10:35:52 -04:00
Steven Walter c6ea2fe285 cargo_util.bbclass: support EXTRA_OECARGO_PATHS
With this we can convert the cargo-native recipe over to using
cargo_util instead of cargo.bbclass
2016-09-03 10:35:52 -04:00
Steven Walter c8e2b6166e cargo-snapshot.inc: use a date-specific downloadfilename
This allows the snapshot to be cached in a local mirror with a unique
name
2016-09-03 10:35:52 -04:00
Steven Walter 56ac849771 rust-cross: use base_libdir_native
This fixes rust-cross-aarch64 (and probably rust-cross-x86_64) since
those targets will use lib64 for cross but lib for native.
2016-09-03 10:35:04 -04:00
Steven Walter df07899855 Merge pull request #51 from srwalter/cross-compile-libstd
Replace rust-cross with a cross-compiled libstd
2016-09-03 10:33:44 -04:00
Steven Walter f6c7789c95 rust-cross: don't actually build a compiler
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.
2016-09-02 12:01:28 -04:00
Steven Walter e2d09d0362 libstd-rs: cross compile rust's runtime
This can replace rustlib, which just copies the binaries already
built by rust-cross.
2016-09-02 11:33:46 -04:00
Tyler Hall e3140137e5 cargo_util: pass RUSTFLAGS to cargo build 2016-08-30 18:08:57 -04:00
Tyler Hall d320edc05f cargo_util: install libraries
The final output of a crate may be a library along with one or more
executables. Install the libraries as well.
2016-08-30 18:08:57 -04:00
Tyler Hall 00429e037b cargo_util: make rustlibdir available
This is needed for install and potentially link paths.
2016-08-30 18:08:57 -04:00
Tyler Hall da71abbef1 cargo_util: prefix DEPENDS_append with space 2016-08-30 18:08:57 -04:00
Steven Walter 12725a2247 Merge pull request #68 from srwalter/sdl2-rs
Add recipes for using SDL2 from rust
2016-08-30 18:08:39 -04:00
Steven Walter 8d6c809833 Add recipes for sdl2-ttf-rs 2016-08-29 21:11:42 -04:00
Steven Walter cc5832d4be Add recipes for sdl2-rs 2016-08-29 21:11:42 -04:00
Steven Walter c4a8abed21 Add recipe for lazy-static 2016-08-29 21:11:42 -04:00
Steven Walter 62b3ed7895 Add recipes for num crate 2016-08-29 21:11:42 -04:00
Steven Walter c5978989a7 Add recipe for bitflags 2016-08-29 21:11:42 -04:00
Steven Walter 21c12a3c3b Merge pull request #67 from srwalter/rust-1.10.0
Upgrade rust to 1.10.0
2016-08-29 21:11:00 -04:00
Steven Walter 9864e47b14 Merge pull request #1 from tylerwhall/rust-1.10.0
cargo: update to 0.11.0
2016-08-28 23:18:07 -04:00
Tyler Hall 44bc6fd31f cargo: update to 0.11.0
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.
2016-08-28 23:05:27 -04:00
Steven Walter 5eeb74ed5e memchr-rs: upgrade to 0.1.11
The old version no longer builds against the newer libc package
2016-08-28 14:59:03 -04:00
Steven Walter 1df6619559 rand: upgrade to 0.3.14
Needed to build under 1.10.0
2016-08-28 14:58:14 -04:00
Steven Walter 02962e7c70 rustc-serialize: upgrade to 0.3.19
Needed to build under 1.10.0
2016-08-28 14:58:14 -04:00
Steven Walter 0a1d85272d Revert "rust: drop unnecessary data layout targets"
Rust 1.10.0 requires the data-layout field

This reverts commit d749cbb98a.
2016-08-28 14:58:14 -04:00
Steven Walter 3d0fab8860 Rework support for downloading the stage0 rustc
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
2016-08-28 14:58:14 -04:00
Steven Walter b708837c7c rust-llvm: skip unittests
These fail to build, apparently because some files do not include the
appropriate headers, e.g. <mutex> and <condition_variable>
2016-08-28 14:58:14 -04:00
Steven Walter ec3cbddb38 Rebase patches for 1.10.0 2016-08-28 14:57:48 -04:00
Derek Straka af571adabe libssh2: remove recipe append that is now in meta-openembedded
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-22 08:38:34 -04:00
Derek Straka b2e6f98f3e libgit2: remove recipe that is now in meta-openembedded
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-22 08:38:02 -04:00