Commit Graph

428 Commits

Author SHA1 Message Date
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
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
Doug Goldstein 15bb60780a Merge pull request #66 from meta-rust/random-number-backport
rust: add a backport fix to use /dev/urandom in cases where the random pool isn't yet initialized
2016-08-18 20:04:05 -04:00
Derek Straka 344fd5eec5 rust: add a backport fix to use /dev/urandom in cases where the random pool isn't yet initialized
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-18 13:18:38 -04:00
Cody Schafer 8dae8b4f85 Merge pull request #64 from jmesmon/cody/fix-S-removal-in-unpack
rustc: fix use of shared source for new poky/oe-core which wipes ${S}
2016-08-15 14:23:30 -04:00
Cody P Schafer 487205331b rustc: fix use of shared source for new poky/oe-core which wipes ${S}
The oe-core/poky change 'base.bbclass wipe ${S} before unpacking
source' (poky: a56fb90dc3805494eeaf04c60538425e8d52efc5, oe-core:
eccae514b71394ffaed8fc45dea7942152a334a1) wipes ${S} in do_unpack prior
to unpacking. This breaks our shared source as we set ${S} to the shared
location, and don't actually unpack anything (the result is we try to
build rustc without any source code, which fails predictably)

Avoid this by clearing do_unpack[cleandirs].

At the same time take pieces of gcc-shared-source.inc and note how & why
we differ from how gcc operates.

This is a bit of a hack, and only happens to work because we know the
exact method that do_unpack uses to clear ${S}, and using python()
happens to get called at the "right time".
2016-08-10 00:58:09 -04:00
Doug Goldstein 64074c9e55 Merge pull request #63 from starlab-io/rust-cleanup
Miscellaneous cleanups for support recipes
2016-08-04 08:35:42 -05:00
Derek Straka 7c494d94f0 rust: resolve issues with conflicted linking between host and target libs
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-03 07:31:19 -04:00
Derek Straka 03b4c9086e libgit2: update to version 0.24.1
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-02 12:40:06 -04:00
Derek Straka 7519c8a6b3 libgit2: remote support for outdated version of the library
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-02 10:51:32 -04:00
Derek Straka 01f7eb256b libgit2: remove support for git version of the library
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-02 10:51:09 -04:00
Derek Straka b139bbc514 libgit2: remove obsolete items from common inc
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-02 10:49:55 -04:00
Derek Straka 0992dbb4bc remove duplicate license that already exists in meta-oe
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-02 10:48:55 -04:00
Derek Straka 210642776c add a gitignore for pyc files
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-02 10:45:23 -04:00
Derek Straka 46cb45b44d curl: remote unneeded bbappend
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-02 10:45:23 -04:00
Derek Straka e83b706e8e zlib: remove unneeded bbappend
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-02 10:45:23 -04:00
Derek Straka 1f42bdc679 cargo_util: ensure directory exists prior to the file touch
Signed-off-by: Derek Straka <derek@asterius.io>
2016-08-02 10:45:23 -04:00