Commit Graph

372 Commits

Author SHA1 Message Date
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
Doug Goldstein
95af734ac1 rust: use Python JSON instead of string handling
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>
2016-04-11 09:33:43 -05:00
Doug Goldstein
8f25a92000 rust: drop duplicate variable assignment
prefix_for() and the deleted line are identical.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-04-11 09:33:43 -05:00
Doug Goldstein
91b165427c rust: use rust-installer's way of disabling ldconfig
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>
2016-04-11 09:33:43 -05:00
Doug Goldstein
5f701adec8 rust: fix bad line in patch
This needs to be properly escaped.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-04-11 09:33:43 -05:00
Doug Goldstein
8982df0b5c rust: drop adding --enable-new-dtags
--enable-new-dtags is the default since Rust 1.7.0 due to
rust-lang/rust#30378.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-04-11 09:33:43 -05:00
Doug Goldstein
d749cbb98a rust: drop unnecessary data layout targets
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>
2016-04-11 09:33:43 -05:00
Cody Schafer
f13ac9d48a Merge pull request #44 from starlab-io/rust-1.7.0
Update rust to version 1.7.0
2016-03-23 22:24:58 -04:00
Derek Straka
61d0ab2b9e Update the linker flags to include libssp
Signed-off-by: Derek Straka <derek@asterius.io>
2016-03-23 17:24:18 -04:00
Derek Straka
a8cd882676 Rebase patches for rust version 1.7.0
Signed-off-by: Derek Straka <derek@asterius.io>
2016-03-18 16:05:35 -04:00
Derek Straka
a5bb44819d Update rust sources to version 1.7.0
Signed-off-by: Derek Straka <derek@asterius.io>
2016-03-18 16:05:29 -04:00
Derek Straka
66c8aef3f2 Remove patch that is no longer required in rust 1.7.0
Signed-off-by: Derek Straka <derek@asterius.io>
2016-03-18 16:05:23 -04:00
Derek Straka
347947db41 Update cargo to 0.9.0
Signed-off-by: Derek Straka <derek@asterius.io>
2016-03-18 16:05:15 -04:00
Cody Schafer
d47b1578c7 Merge pull request #43 from starlab-io/move-recipes
Move the cargo and rust recipes from 'recipes' to 'recipes-devtools'
2016-02-19 22:12:29 -05:00
Cody Schafer
629b28637e Merge pull request #42 from starlab-io/fix-disable-static
Remove the '--disable-static' in the EXTRA_OECONF for all rust-like recipes
2016-02-19 22:11:55 -05:00
Derek Straka
e76332d732 Move the cargo and rust recipes from 'recipes' to 'recipes-devtools' 2016-02-19 19:11:43 -05:00
Derek Straka
94daa39193 Remove the '--disable-static' in the EXTRA_OECONF for all rust-like recipes 2016-02-19 10:34:00 -05:00
Cody Schafer
c4a3f15a8c Merge pull request #39 from starlab-io/fix-source-fetch
Allow the fetch to complete before attempting to patch
2016-02-18 22:46:39 -05:00
Derek Straka
a4d6b55448 Allow the fetch to complete before attempting to patch
Signed-off-by: Derek Straka <derek@asterius.io>
2016-02-18 17:23:36 -05:00
Derek Straka
99bb5f6e55 Use the shared source mechanism for the llvm patch 2016-02-18 17:23:31 -05:00
Cody Schafer
f634a72c3b Merge pull request #37 from starlab-io/fix-get-var-errors
Address parse errors while using getVar to calculate dependency information
2016-02-18 13:30:51 -05:00
Derek Straka
78e51cd7f4 Address parse errors while using getVar to calculate dependency information 2016-02-18 13:24:43 -05:00