Commit Graph

443 Commits

Author SHA1 Message Date
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
Derek Straka fc9645c15b Merge pull request #60 from starlab-io/rust-upstream-notice
README updates
2016-08-01 15:46:02 -04:00
Doug Goldstein 69dd8a8ee3 README: update info about what works and doesn't 2016-07-30 15:36:30 -05:00
Doug Goldstein 1878ee9a1e README: remove stating that only ARM works 2016-07-30 15:34:48 -05:00
Doug Goldstein 095b0be0a6 README: add note about requiring upstream ref for patches
Add some notes about requiring patches to be submitted upstream as
issues or pull requests or a reason why they cannot be upstreamed.
2016-07-30 14:00:42 -05:00
Doug Goldstein 8ceb6a47d5 README: remove items from TODO that are done
We have a crates.io fetcher and the ability to build without network.
2016-07-30 13:57:05 -05:00
Derek Straka 2814eb8764 Merge pull request #58 from starlab-io/crate-fetch-for-master
add a custom fetcher for Cargo crates
2016-07-14 08:50:11 -04:00
Doug Goldstein a67fbf2223 rust-hello-world: convert to using cargo_util
Convert to using the newer cargo_util bbclass.
2016-07-12 16:33:02 -05:00
Doug Goldstein 49d94ef0a7 rustfmt: an example cargo build package
rustfmt is a Rust package to format Rust code. This package is being
used as an example of building a crate in Yocto with Cargo.
2016-07-12 16:33:02 -05:00
Doug Goldstein d947c2e40e cargo_util: simplified cargo bbclass for crates
The existing cargo class attempts to jump through a few hoops for
settings that are not necessarily with newer versions of cargo.
2016-07-12 16:33:02 -05:00
Doug Goldstein 85471f88e5 bitbake: add crate fetcher
This adds a handler for crate:// URLs and rewrites them to crates.io
https endpoint and handles properly unpacking the crate. This fixes #24.
2016-07-12 16:33:02 -05:00
Doug Goldstein d3ee1e59b6 Merge pull request #57 from tylerwhall/cleanup
Update Cargo, bbclass cleanup
2016-07-12 09:53:25 -05:00
Cody Schafer 1b78a65885 Update README.md
Fixes #55
2016-07-11 16:34:29 -04:00
Tyler Hall 310cc353a1 Put crate_hash and rpath in RUSTFLAGS for Cargo
RUSTFLAGS is used by Cargo and always passed to the compiler. Put our
non-standard crate_hash argument there because it is required for
reproducible builds.

Add the rpath option to avoid having to patch Cargo.toml for this and
remove the function that does so.

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
2016-07-11 15:15:04 -04:00
Tyler Hall 5b451ec4af classes/cargo: don't override PATCHTOOL
The referenced issue is fixed upstream

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
2016-07-11 15:15:00 -04:00
Tyler Hall 27ff9aea20 Move rust-bin fixups to rust.bbclass
This post-processing will need to be shared between rust-bin and
cargo-based recipes.

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
2016-07-11 15:14:57 -04:00
Tyler Hall 1f17e68d1e Move basic variables from rust-bin to rust class
rust-bin.bbclass now only contains what is necessary to build crates
using the rust compiler directly and rust.bbclass contains information
shared between rust-bin and cargo.

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
2016-07-11 15:14:53 -04:00
Tyler Hall 243fdbd72d cargo: update ssh2-rs dependency
This removes a dependency on winapi and is closer to the version cargo
would pick normally.

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
2016-07-11 15:14:49 -04:00
Tyler Hall 4e6b8b4eca cargo: update to 0.10.0
This notably adds support for the RUSTFLAGS environment variable.

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
2016-07-11 15:14:35 -04:00
Derek Straka 498ad2a6b9 Merge pull request #56 from starlab-io/libgit2-depend
libgit2: add a dependency on openssl
2016-07-01 10:43:14 -04:00
Doug Goldstein 8e0b263733 libgit2: add a dependency on openssl
If this dependency is missing its possible that openssl won't be built
before libgit2 is built and then we won't have git support over SSL
which leaves out a lot of git repos.
2016-06-30 08:28:22 -05:00
Cody Schafer 395cde5819 Merge pull request #50 from srwalter/rust-1.7-fixes
Several fixes for rust 1.7
2016-05-08 16:47:54 -04:00
Steven Walter 75c20f0bbc Upgrade snapshot to 2015-12-18
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.
2016-05-05 21:56:19 -04:00
Steven Walter 7b05b9c7f0 rustlib: install rlib's as well as .so's
This will allow clients to choose between static and dynamic linking
2016-05-05 21:56:19 -04:00
Steven Walter a74985c341 rust-bin.bbclass: allow to opt-out of prefer-dynamic
prefer-dynamic makes sense in many cases, but we needn't force recipes
to use it all the time.
2016-05-05 21:56:19 -04:00
Steven Walter 18c946267e libc-rs: upgrade to 0.2.5 2016-05-05 21:56:19 -04:00
Steven Walter 9a0ea9bf40 rust: allow building against musl libc on arm 2016-05-05 21:39:46 -04:00
Cody Schafer 8fe8fc5b7b Merge pull request #46 from starlab-io/fix-rust-build-jmesmon
Fix rust build
2016-04-12 20:31:45 -05:00
Doug Goldstein d477a68dba rust: set our release channel appropriately
We're always building a stable release so we should be setting our
release channel appropriately.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-04-11 09:33:43 -05:00
Doug Goldstein fe8b755da0 rust: remove --enable-debuginfo
Without this we cannot set 'eliminate-frame-pointer' in our target spec.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-04-11 09:33:43 -05:00
Doug Goldstein 825bf74a2e rust: update to the proper snapshot
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>
2016-04-11 09:33:43 -05:00
Doug Goldstein 5ced950596 rust: add missing 'ar' to target spec
We need to make sure we're using the cross compiling ar instead of the
system one.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-04-11 09:33:43 -05:00
Doug Goldstein b13e266124 rust: add support for x86 features
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>
2016-04-11 09:33:43 -05:00
Doug Goldstein ba16b5c39e rust: generate an appropriate cpu for targets
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>
2016-04-11 09:33:43 -05:00
Doug Goldstein 2fb76952f7 rust: fix target generation add 'has-elf-tls'
This field defaults to false but for all of our targets it should be
true.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-04-11 09:33:43 -05:00
Doug Goldstein 0fb90a149c rust: fix target generation add 'env'
This field defaults to the empty string but for all of our targets it
should be set to GNU.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-04-11 09:33:43 -05:00