Commit Graph

546 Commits

Author SHA1 Message Date
Doug Goldstein
dfa7dc1bad rust: drop link args from the target JSONs
The linker args have been moved into the Cargo configuration so there's
no need for them in the target spec files.
2016-11-23 14:15:17 -06:00
Doug Goldstein
5afc0cc471 cargo.bbclass: ensure extra RUSTFLAGS are properly passed
The RUSTFLAGS env var overrides the rustflags specified in the cargo
config so we need to take anything passed in the environment variable
and put it in the config.
2016-11-23 14:15:17 -06:00
Doug Goldstein
4e1bda643e cargo.bbclass: supply linker and link-args via rustflags
Supply the linker and the linker args via rustflags which should make it
not necessary to specify them via target JSONs. We explicitly cannot use
the RUSTFLAGS environment variable do to the way cargo parses arguments
and passes them to rustc.
2016-11-23 13:59:05 -06:00
Doug Goldstein
c98312fd1d cargo.bbclass: don't export variables 2016-11-23 11:42:00 -06:00
Doug Goldstein
f366cff864 cargo: change trivial verbose flag 2016-11-23 11:42:00 -06:00
Doug Goldstein
0827bc626b rust/rust-bin: move bits to rust-bin
Bits that are only used by the rust-bin bbclass should get moved there.
They aren't used by any recipe that includes the rust bbclass.
2016-11-23 11:25:57 -06:00
Derek Straka
b828ccaefe Merge pull request #115 from cardoe/remove-old-bits
Update compiler-rt build and remove commented out bits
2016-11-23 11:06:50 -05:00
Doug Goldstein
19cdae76b8 compiler-rt: pass only env needed
Build compiler-rt how upstream Rust does it and don't rely on the entire
environment being passed to the build process.
2016-11-22 11:55:36 -06:00
Doug Goldstein
87f67e6d86 remove a call to 'env'
For debugging people should really use 'bitbake -e rust' instead.
2016-11-22 11:53:43 -06:00
Doug Goldstein
f748246cae remove commented out bits 2016-11-22 11:53:43 -06:00
Derek Straka
d91d726db6 Merge pull request #114 from cardoe/factor-out-arch
Improve Rust triple generation
2016-11-22 12:50:32 -05:00
Doug Goldstein
957ede76f8 convert to real Rust triples properly
This should fix conversion to real Rust triples for musl targets, for
i686 targets and possibly others.
2016-11-21 16:22:41 -06:00
Doug Goldstein
5d60f12957 rust-triples: simplify vendor gathering
We don't need to look up the vendor since it will always be unknown.
2016-11-21 16:22:41 -06:00
Doug Goldstein
0b6b45fbca break the triples logic into its own class
This is so we can use the Rust triples in Cargo builds and other places
in addition to the Rust build.
2016-11-21 16:22:38 -06:00
Doug Goldstein
7645b9b331 RUSTC_ARCHFLAGS: build for the proper system triple
Change to build for the machine we are building for when compiling rust
code and not the compiler itself. See #109.
2016-11-21 14:55:54 -06:00
Cody Schafer
0c266200ad Merge pull request #112 from jmesmon/issue-template
github: add issue template to encourage reporting meta-rust version
2016-11-17 11:40:40 -05:00
Cody P Schafer
d2373244b8 github: add issue template to encourage reporting meta-rust version
I don't think we really need much structure, but in many cases
establishing the version of meta-rust which contains the issue is very
helpful in resolving it.

This makes it so the issue-reporter is at least given a field which
asks for the version.
2016-11-16 11:42:46 -05:00
Derek Straka
0530d30808 Merge pull request #107 from cardoe/drop-patch
rust: drop bindir/libdir patch
2016-11-10 11:05:03 -05:00
Doug Goldstein
e4d37ce4f1 rust: drop bindir/libdir patch
I'm honestly not sure what this patch does since everything appears to
build the same with and without it. I did a `tree` of the sysroots and
images and I don't see any file differences. Something like this used to
be necessary in Gentoo but I dropped it a few releases back.
2016-11-09 14:28:12 -06:00
Derek Straka
82bf763c76 Merge pull request #106 from cardoe/more-updates
More updates
2016-11-09 15:22:12 -05:00
Doug Goldstein
489fe195e0 rust: derive the stage0 toolchain from the build env
The host system where things are being built really should control what
toolchain is used for stage0. This in theory should improve #23 but I'm
not sure how to specify a hash per host sys.
2016-11-09 08:11:08 -06:00
Doug Goldstein
ed62ea5176 rust: drop local-rust PACKAGECONFIG
This drops the ability to supply your own rust through the PACKAGECONFIG
local-rust option. This isn't tested and we really need to better expand
support for build arches. At the same time this simplifies how the rust
stage0 snapshot is extracted and used by the build system.
2016-11-09 08:11:07 -06:00
Doug Goldstein
8673659f6a rust: convert snapshot to common include
Create a common include that can be used by everything that depends on
the Rust source. Including stage0 bits and hashes of the source
tarballs.
2016-11-07 16:27:03 -06:00
Doug Goldstein
75f4549859 pin dependencies of Rust packages on the same ver
Pin the versions of different Rust component packages to the same
version to ensure smooth upgrades. Not sure how to hook the compiler
together with the shared library. Likely rust-cross will need to provide
some kind of dependency to make this happen.
2016-11-07 16:14:00 -06:00
Doug Goldstein
91319e80f8 rust: include version info for patches
To allow for multiple versions in the future we need to include the
version info for the patches.
2016-11-07 16:14:00 -06:00
Derek Straka
d0663639a0 Merge pull request #105 from cardoe/cmake-llvm
convert rust-llvm to be built with cmake
2016-11-06 19:55:40 -05:00
Doug Goldstein
3b28ddab2b rust-llvm: fix up generated packages
Avoid issues with non-native builds by splitting up the packages a
little closer to how they should be while still leaving the main package
containing everything Rust uses. This makes it possible to build
rust-llvm for the target, hopefully improving issue #81.
2016-11-04 13:13:08 -05:00
Doug Goldstein
404cbe3dcc rust-llvm: cmake build bits from openswitch
Grabbed this chunk from
http://git.openswitch.net/cgit/openswitch/ops-build/tree/yocto/openswitch/meta-foss-openswitch/recipes-core/llvm/llvm.inc
The cmake.bbclass that poky ships with does not generate the proper
values for native builds so this is necessary to fix that up.
2016-11-04 13:13:08 -05:00
Doug Goldstein
ea888066a3 rust-llvm: convert to cmake build
Future versions of LLVM require cmake to build so it will be easier to
prove that out on a known good build and to allow future versions to use
this as common code.
2016-11-04 13:13:08 -05:00
Derek Straka
e0e7b6cefe Merge pull request #104 from cardoe/fix-data-layout
rust: fix LLVM data layouts for Rust 1.10
2016-11-04 13:20:05 -04:00
Derek Straka
ae7122c7e6 Merge pull request #103 from cardoe/small-cleanups
Small cleanups
2016-11-04 08:22:49 -04:00
Doug Goldstein
ce9949725c rust: strip whitespace from features
This whitespace in here causes rust to not be happy with the features
and throw warnings about a feature such as ' +sse3' being unsupported
when '+sse3' works just fine. Amazingly will cause rustc to abort when
you try to resolve the features to valid configs with the `--print` arg
to rustc.
2016-11-03 17:05:41 -05:00
Doug Goldstein
bef7c3f07e rust: fix LLVM data layouts for Rust 1.10
The data layout changed for Rust 1.10. I noticed this because I got a
crash when using rust-native to build rust. The assertion that hit was
saying data layout mismatch and caused me to check the values in the
Rust sources.
2016-11-03 16:31:21 -05:00
Doug Goldstein
8f809476c0 add build/ and poky/ to ignore
Since we have some helper scripts to build poky in the top level here
for testing then we should ignore build/ and poky/
2016-11-03 14:56:22 -05:00
Doug Goldstein
ea040ab01d build: make the default machine x86_64 2016-11-03 14:56:22 -05:00
Doug Goldstein
101e818ec5 fetch: ensure we default to a Yocto branch
Instead of a funky git error let's default to the master branch and let
the user know that we made that choice for them.
2016-11-03 14:56:22 -05:00
Doug Goldstein
6db046c19d rust-llvm: combine do_install_append()
There were two different do_install_append()'s and they didn't check for
errors so this improves that situation.
2016-11-03 14:56:22 -05:00
Derek Straka
e77fbb7f08 Merge pull request #101 from cardoe/drop-shared-src
Drop shared source directory
2016-11-02 12:30:03 -04:00
Doug Goldstein
a97f66224a drop files supporting shared source 2016-11-01 15:37:47 -05:00
Doug Goldstein
2536080e0b libstd-rs: stop using shared source
Convert libstd-rs to not use the shared source setup and instead use
its own extracted directory. Include the version info in the bitbake
file so that in the future we can support multiple versions via a
PREFERRED_VERSIONS variable.
2016-11-01 15:37:47 -05:00
Doug Goldstein
1f903865b4 compiler-rt: stop using shared source
Convert compiler-rt to not use the shared source setup and instead use
its own extracted directory. Include the version info in the bitbake
file so that in the future we can support multiple versions via a
PREFERRED_VERSIONS variable.
2016-11-01 15:12:16 -05:00
Doug Goldstein
7f7b3cd652 rust: stop using shared source
Convert rust to not use the shared source setup and instead use its own
extracted directory. Include the version info in the bitbake file so
that in the future we can support multiple versions via a
PREFERRED_VERSIONS variable.
2016-11-01 13:00:35 -05:00
Doug Goldstein
a1ca1ed06d rust-llvm: stop using shared source
Convert rust-llvm to not use the shared source setup and instead use its
own extracted directory. Include the version info in the bitbake file so
that in the future we can support multiple versions via a
PREFERRED_VERSIONS variable.
2016-10-31 22:30:47 -05:00
Derek Straka
c5b53736b7 Merge pull request #96 from cardoe/ci
Jenkins CI
2016-10-31 08:37:07 -04:00
Derek Straka
d716587c26 add Jenkinsfile to test each PR and branch commits
This includes a basic test that attempts to compile the rustfmt crate.
Ensures that the workspace is always removed at the end of the build. It
utilizes available caches to speed up the build process and parallelizes
the build across i386, x86_64, arm32, and arm64 targets.

Signed-off-by: Derek Straka <derek@asterius.io>
2016-10-30 19:41:53 -05:00
Doug Goldstein
1622af812d add a basic build script for testing
This script can be extended in the future but it uses the containerize
script to ensure we run inside of a working build environment. This
script can be extended to build additional targets for testing.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-10-30 10:07:11 -05:00
Doug Goldstein
52cbdd3b24 add Yocto config files so we can build
So that we can use the meta-rust layer as the final layer with some
configuration (for the purposes of testing). These configs should be not
used by actual end users.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-10-30 10:07:06 -05:00
Doug Goldstein
a2c1575132 helper script to fetch down dependent layers
meta-rust has some layers it depends on and this script ensures it
fetches them down appropriately so that the poky directory can be used
as the source.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-10-30 10:07:01 -05:00
Doug Goldstein
8262f3ac0f containerize script for a Yocto build env
The containerize script fetches down a Docker container and wires up the
current directory inside so that you can use a known good environment
for compiling Yocto that has all the dependencies.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2016-10-30 10:06:55 -05:00
Cody Schafer
bf2c4ada41 Merge pull request #92 from meta-rust/rust-upstream-notice
update case of OpenEmbedded to match upstream
2016-10-03 00:11:38 -04:00