nativesdk: Implement cross canadian support

This addition closes #236 requesting the SDK support. The implementation
consists on a yet minimum set of worky functionality;

- Includes rustc, rustdoc and cargo.
- Includes libstd and accompanying lib archives for host and for target.
- Integrates with the standard environment setup script.
- Integrates configurations automatically build for target.

The supported build host is still AMD64 only.

Note that there's no need on introducing crosssdk package as the
official snapshot package serves same way as a non SDK build.

Possible future directions:

- Offline build:
	- Support pre-cached set of crates that can be vendored.
	- Support pre-filled cargo registry.
- Support further tools like cargo-fmt, cargo-clippy, GDB support and so
on.

Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
Anatol Belski
2021-02-13 21:15:40 +00:00
parent a4302679bb
commit 439dea8664
9 changed files with 673 additions and 349 deletions
+2 -1
View File
@@ -28,6 +28,7 @@ CARGO_DISABLE_BITBAKE_VENDORING ?= "0"
# Used by libstd-rs to point to the vendor dir included in rustc src
CARGO_VENDORING_DIRECTORY ?= "${CARGO_HOME}/bitbake"
CARGO_RUST_TARGET_CCLD ?= "${RUST_TARGET_CCLD}"
cargo_common_do_configure () {
mkdir -p ${CARGO_HOME}/bitbake
@@ -74,7 +75,7 @@ cargo_common_do_configure () {
# HOST_SYS
[target.${HOST_SYS}]
linker = "${RUST_TARGET_CCLD}"
linker = "${CARGO_RUST_TARGET_CCLD}"
EOF
if [ "${HOST_SYS}" != "${BUILD_SYS}" ]; then