Commit Graph

443 Commits

Author SHA1 Message Date
Tyler Hall 06f6aeaa79 rust-bin: set soname of shared objects
Poky will fail to automatically create RDEPENDS on shared objects
lacking a SONAME in the ELF.
2015-07-17 12:52:36 -04:00
Tyler Hall 837000f68a rust-bin: common code for building libs
Libraries that overlap with the standard library must have explicit
extern declarations. Without something like pkg-config where the
libraries can publish this info, it's easiest to just hard-code the list
of troublesome libraries.
2015-07-17 12:52:36 -04:00
Tyler Hall 8a6f084c66 rust-bin: prefer-dynamic
We control static/dynamic by only making one or the other available.
Apparently the default of prefer static causes duplicate symbols for the
standard library.
2015-07-17 12:52:36 -04:00
Tyler Hall a91af9bbae Add rust-bin class
This provides more defaults that aren't required for compiling with
rustc, but standardize the output for inclusion in a distro.

Things like
- Where to install libraries
- Stripping rustc note sections
- Optimization by default
2015-07-17 12:52:36 -04:00
Tyler Hall 709957b3b6 Add rustlib for publishing rust runtime 2015-07-17 12:52:36 -04:00
Cody Schafer 629aebb1c3 Merge pull request #9 from srwalter/disable-symbol-hashing
Disable symbol hashing
2015-07-17 12:12:18 -04:00
Cody P Schafer 736935d3f3 rust: correct rust-llvm deps 2015-07-15 15:49:03 -04:00
Steven Walter 29b5f6eadd rust: remove crate hash & metadata from symbol hashing
Rust's symbol hashes break sstate, because a subsequent build of the same
input hash may generate different symbol hashes.  This means that
packages that previously built against the "same" (from bitbake's
perspective) rustc would no longer run, and bitbake would not know to
rebuild them because the input hash is the same.  This is because the
crate metadata contains some data that differs from build-to-build.

This problem actually extends beyond the compiler to any arbitrary
crate, for the same reason.  If a crate in the middle of the dependency
chain had to be rebuilt, bitbake wouldn't realized that all its
dependencies have to be relink, and the dependent packages would fail
due to missing symbols.

Fortunately, bitbake's input hash makes this mechanism largely
unnecessary; any change to rust's source or configuration will cause
rustc and all dependencies to rebuild.  Therefore, it's safe to remove
crate metadata from the hashing.
2015-07-08 10:55:33 -04:00
Cody P Schafer de5b9d0cea rust-llvm: adjust to use BBCLASSEXTEND and the generic DEPENDS for some chance of class-target working 2015-07-07 17:13:52 -04:00
Steven Walter 3a57f02b1d rust: fix text relocations on i386
This patch is already applied upstream, so back-port it to 1.1.0.  These
relocations show up as a QA warning from bitbake
2015-07-07 15:02:06 -04:00
Cody P Schafer 25e2eaddc9 readme update: rust is no longer breaking cargo every other release, and we've completed some of the TODO items 2015-07-06 15:03:49 -04:00
Cody P Schafer 20a9c701f1 rust-llvm: avoid stripping symbols 2015-07-02 15:54:28 -04:00
Steven Walter 0df9a7b124 Merge 2af0e67983 into 6e9bc43cb8 2015-07-01 15:08:43 +00:00
Steven Walter 2af0e67983 rust.inc: use separately-built LLVM
This makes builds more efficient, in that we only have to rebuild llvm when llvm changes,
rather than every time rustc changes
2015-07-01 11:07:08 -04:00
Steven Walter 411f10502c rust-llvm-native: build LLVM in its own recipe
rust takes a painfully long time to build.  A non-trivial part of that
is building LLVM.  Fortuitiously, the LLVM component is common between
the -native compiler and all variants of the -cross compiler.  That
means we can build it once, and reuse the output for any flavor of rust.
That saves build time, and it utilizes bitbake's sstate more
efficiently.  It's win/win!
2015-07-01 11:07:08 -04:00
Tyler Hall 6ba4aebdce rust: enable debuginfo
This gets split out in do_package, so there's no harm in including it.
It is useful to be able to get debug info for the standard library by
installing the -dbg package.
2015-07-01 11:07:08 -04:00
Cody P Schafer 6e9bc43cb8 cargo: update 2015-06-29 11:21:26 -04:00
Cody P Schafer 6bcb69d4c0 cargo.bbclass: CARGO_TARGET_DIR gained a special meaning in cargo, rename to CARGO_TARGET_SUBDIR 2015-06-29 11:20:09 -04:00
Cody P Schafer a2ef8b117c fixup! rust 2015-06-29 10:33:17 -04:00
Cody P Schafer f55a0b69a1 rustc: add 1.1.0 & update -git 2015-06-26 15:10:14 -04:00
Cody P Schafer 61708ed85e cargo requires newer libgit2 2015-05-26 22:20:53 -04:00
Cody P Schafer 0112bb162a rust: remove no longer used flags 2015-05-26 22:20:53 -04:00
Cody P Schafer 8c4370d5f1 rust: support LINK_{} var 2015-05-26 22:20:53 -04:00
Cody P Schafer b54442aea8 cargo: update 2015-05-26 22:20:53 -04:00
Cody P Schafer ee6dbd5854 rust: update to modern version 2015-05-26 22:20:53 -04:00
Cody P Schafer cc7f43afae cargo: wire up bitbake to fetch cargo snapshot
This is based on Steven Walter's proposed commit "cargo.inc: use bitbake
to fetch the snapshot"
2015-05-26 22:20:53 -04:00
Cody P Schafer 27c6bdb2ce rust: add machinery to fetch the snapshot
This is based on Steven Walter's proposed change "rust-git.inc: use
bitbake to fetch the snapshot".
2015-05-26 22:20:53 -04:00
Cody P Schafer 75b3b171c1 rust: only depend on rust-native if we're using it for our build 2015-05-26 12:06:27 -04:00
Steven Walter 8e1a59dd22 rust.inc: fix depends 2015-05-26 12:06:27 -04:00
Cody P Schafer 457ded34de cargo: supply a CARGO_HOME variable to keep cargo contained inside bitbake control 2015-05-26 12:06:27 -04:00
Cody P Schafer d50952c452 update rustc to 2015-03-23
We need a git version of libgit2 again :(

Also fix the license complaints
2015-05-26 12:06:27 -04:00
Cody Schafer 6fc1459dce Merge pull request #4 from srwalter/fix-arm
Fixes for building rust-cross-arm
2015-04-28 17:22:03 -04:00
Steven Walter cb205800a6 rust.inc: fix ARM soft float
Use RUST_TARGET_SYS instead of hard-coding for hard-float
2015-04-17 16:23:48 -04:00
Steven Walter 8499521d54 rust.inc: include missing dependency on gcc-cross
-cross recipes do not automatically depend on gcc-cross, but rust
definitely needs it.
2015-04-17 08:49:16 -04:00
Cody P Schafer b67e85b0b2 Merge commit 'refs/pull/3/merge' of https://github.com/jmesmon/meta-rust 2015-03-12 14:15:38 -04:00
Paul Osborne 9a6d95f448 Merge 24f3b6d76b into 61b4d4c989 2015-03-11 05:27:06 +00:00
Paul Osborne 24f3b6d76b libgit2: dizzy: tell cmake to use ${AR} for the linker
This resolves https://github.com/jmesmon/meta-rust/issues/1.  This
change is only necessary for systems (like dizzy) that do not
contain poky commit 60d504b431fa7cdc6ded141def7ae18edb1834e5.

Without that commit or this change, do_compile for libgit2 would fail
with the following error:

    CMAKE_AR-NOTFOUND cr libgit2.a  ...
    Error running link command: No such file or directory

Signed-off-by: Paul Osborne <osbpau@gmail.com>
2015-03-11 00:26:26 -05:00
Paul Osborne 518c204b13 Merge 09ecda80af into 61b4d4c989 2015-03-11 05:12:59 +00:00
Paul Osborne 09ecda80af rust: replace pushd usage in rust do_install
In dizzy, the following error was encountered when running do_install
on the rust recipe:

    pushd: not found

According to the bitbake user manual, /bin/sh is used and bashisms
(like pushd) should be avoided.  In my case, /bin/sh turns out to
be zsh (with no extra configuration, so pushd is not present).

Signed-off-by: Paul Osborne <osbpau@gmail.com>
2015-03-11 00:10:58 -05:00
Cody P Schafer 61b4d4c989 bump cargo version 2015-03-10 13:31:57 -04:00
Cody P Schafer f9ddcfba1c libgit2 has a release version that works for us, use remove the -git version for now 2015-03-10 13:31:48 -04:00
Cody P Schafer b180bf996d rust fixups 2015-03-09 22:09:36 -04:00
Cody P Schafer 646ac09232 update cargo 2015-03-09 14:59:39 -04:00
Cody P Schafer 6c977f2436 update rust 2015-03-09 14:59:34 -04:00
Cody P Schafer 68f9ed6580 rust: update to 2015-03-09 2015-03-09 12:10:50 -04:00
Cody P Schafer aec0c0f007 final changes to fix rust installation 2015-03-02 16:43:54 -05:00
Cody P Schafer 27b6aeb22c rust: more changes 2015-03-02 13:38:25 -05:00
Cody P Schafer 5a09bd48bb rust-installer is naughty 2015-03-02 01:36:20 -05:00
Cody P Schafer b837ba36e1 cargo: more fixups 2015-03-02 01:20:29 -05:00
Cody P Schafer aefa26aba0 cargo fixups 2015-03-02 01:19:34 -05:00