Commit Graph

443 Commits

Author SHA1 Message Date
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
Cody P Schafer 2eafa1892d rust/tune: add missing + 2016-02-18 00:35:42 -05:00
Cody P Schafer 38c950b0a1 rust/tune: treat vfp as vfpv2 2016-02-18 00:32:38 -05:00
Cody P Schafer 898efb793c rust: llvm_features: += does string concat, use .append() 2016-02-17 21:50:42 -05:00
Cody P Schafer fa53e7a70d rust.inc: normalize to expanded 4 space tabs
I had previously mixed using hard tabs, 8 spaces, and 4 spaces (due to
editor defaulting to hard tabs and the occasional change to 4 spaces to
work on python code).

Try to avoid that with a vim modeline
2016-02-17 21:20:32 -05:00
Cody P Schafer 4b03af4190 security-flags: remove now defunct un-suffixed rust-cross package reference 2016-02-17 21:14:00 -05:00
Cody P Schafer 55ab1927d7 rust: better llvm feature choice based on TUNE_FEATURES 2016-02-16 10:43:29 -05:00
Derek Straka f2a16b4019 Merge 598bd26c2f into ec974e5e92 2016-02-14 18:00:03 +00:00
Derek Straka 598bd26c2f Add a new rust-cross package that will be different for each TARGET_ARCH
Signed-off-by: Derek Straka <derek@asterius.io>
2016-02-14 12:48:58 -05:00
Derek Straka 5aab7e99ae Add the llvm and new rust-cross to the set of items where PIE is disabled
Signed-off-by: Derek Straka <derek@asterius.io>
2016-02-14 12:48:51 -05:00
Cody P Schafer ec974e5e92 readme: add some clarification on my current practices 2016-02-04 12:40:51 -05:00
Cody P Schafer ce1881d08c rust: use a shared source location for all the packages needing the rustc source tree 2016-02-04 12:40:22 -05:00
Cody P Schafer a616547640 Merge commit 'refs/pull/33/head' of https://github.com/jmesmon/meta-rust 2016-02-03 20:09:12 -05:00
Cody P Schafer 4109f0cdd7 Merge branch 'master' of https://github.com/jmesmon/meta-rust into m-real 2016-02-03 16:20:59 -05:00
Cody P Schafer ec117587bc cargo: use new snapshot to avoid issue with version parsing
cargo issue: https://github.com/rust-lang/cargo/pull/2352

At the same time, fix our snapshot support & add a patch to disable
auto-download of snapshots to ensure we don't accidentally break it
again in the future.
2016-02-03 16:15:05 -05:00
Steven Walter 3a832dd439 rust: force crate hash to use bitbake input hash
This should eliminate the problems that have been seen when bitbake
rebuilds part of the rust stack (due to missing sstate) and ends up
getting hash mismatches.  Unlike rust's internally generated hash, ours
is guaranteed to be stable.
2016-02-03 11:30:56 -05:00
Cody Schafer ce73e1a6f2 Merge pull request #32 from srwalter/fix-prelink-crash
Fix prelink issue breaking .bss
2016-02-03 11:29:30 -05:00
Cody P Schafer 5dbe9be9a8 rust: switch to only supporting a single version at a time 2016-02-03 10:43:00 -05:00
Cody P Schafer b7200e623c remove old versions of rust 2016-02-03 10:37:32 -05:00
Tyler Hall 0ade0cc790 Fix prelink issue breaking .bss
The reason prelink seemed to break relocations in .bss is because the
.note.rustc section happened to be placed in front of .bss. Using
objcopy to strip the note renumbered the sections and the symbols in the
.dynsym section were pointing to the wrong section index, but only for
.bss. Prelink would skip updating these dyn entries because it thought
they were pointing to a section that didn't get relocated, like
.comment. In some cases the GOT was actually prelinked correctly, but
the dynamic linker at run time would modify it to point at the
non-prelinked address.

Removing the SHF_ALLOC flag from the section causes it to be placed at
the end of the executable where it can be safely removed.

This is still a hack to the compiler because I couldn't find any way to
get the section attributes to be correct using the high-level LLVM
interface.
2016-02-02 13:08:14 -05:00
Cody Schafer ba3486997a Merge pull request #31 from srwalter/aarch64-support
Support building for the ARMv8 (64-bit) architecture
2016-02-02 12:13:27 -05:00
Tyler Hall 483334f02b rust: aarch64 support 2016-02-02 11:40:25 -05:00
Tyler Hall aaaeaeed3f rustlib: libdir may be different between build and host
With multilib, we may want to install under lib64 but the rust libraries
get published in the build sysroot under the libdir for the build
machine which is usually just lib. Support these being different.
2016-02-02 11:40:25 -05:00
Cody Schafer f0ea28ae30 Merge pull request #30 from srwalter/update-rust-bin-bbclass
Update rust-bin.bbclass
2016-02-02 11:37:23 -05:00
Wes Lindauer 45d77b849f rust-bin.bbclass: Add empty do_configure
This prevents rust recipes that are missing clean rules from failing
when they are rebuilt.
2016-02-01 16:36:52 -05:00
Steven Walter ebe7fb0d8f rust-bin.bbclass: look for RUNPATH instead of RPATH
Poky 1.7 uses RPATH is now RUNPATH, so update our grep string appropriately.

Additionally, bitbake is having trouble with the automatic RDEPENDS on
rustlib.  Make it explicit for now.
2016-02-01 16:36:52 -05:00
Dan Dedrick 63cf611e65 rust-bin.bbclass: update path to cross output
poky 1.7 changes where it publishes cross output to so this recipe
needs to follow that. Unfortunately this path is defined in
cross.bbclass and we can't inherit that since we aren't cross.
2016-02-01 16:36:52 -05:00
Tyler Hall 302cca7529 rust-bin.bbclass: suffix rust libraries with -rs
Rust library names may have sonames that overlap with C/C++ libraries.
This causes bitbake to not be able to create the correct automatic
RDEPENDS between packages. The result is that dependencies may not get
automatically installed.

Add -rs to the file name and soname. The crate name remains the same,
and rust is not dependent on the file name to look up the crate inside
the library.
2016-02-01 16:36:52 -05:00
Cody Schafer 355863b528 Merge pull request #29 from srwalter/add-more-crates
Add more crates
2016-02-01 16:29:18 -05:00
Tyler Hall 34c36492db Don't build any rlibs
I've seen this error from the compiler:
    found possibly newer version of crate `regex_syntax` which
    `env_logger` depends on

This is probably because the rlib hashes are not deterministic, but I
can't reproduce non-deterministic hashes locally.

There have been lots of other types of errors caused by mixing rlibs and
dylibs in the same dependency chain, so let's try using only dylibs
until that's stable.
2016-02-01 20:54:20 +00:00