Merge pull request #34 from flatcar-linux/dongsu/merge-flatcar-master-edge-2019-12-03

Merge flatcar-master to flatcar-master-edge 2019-12-03
This commit is contained in:
Dongsu Park 2019-12-09 14:46:38 +01:00 committed by GitHub
commit 84ff847d5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -35,6 +35,11 @@ build_target_toolchain() {
# --root is required because run_merge overrides ROOT=
PORTAGE_CONFIGROOT="$ROOT" \
run_merge -u --root="$ROOT" --sysroot="$ROOT" "${TOOLCHAIN_PKGS[@]}"
export clst_myemergeopts="$( echo "$clst_myemergeopts" | sed -e 's/--newuse//' )"
PORTAGE_CONFIGROOT="$ROOT" \
run_merge --root="$ROOT" --sysroot="$ROOT" dev-lang/rust
}
configure_crossdev_overlay / /tmp/crossdev

View File

@ -324,6 +324,15 @@ install_cross_toolchain() {
else
$sudo emerge "${emerge_flags[@]}" \
"cross-${cross_chost}/gdb" "${cross_pkgs[@]}"
if [ "${cross_chost}" = aarch64-cros-linux-gnu ]; then
# Here we need to take only the binary packages from the toolchain builds
# because the standard Rust packages don't include the arm64 cross target.
# Building from source is ok because the cross-compiler got installed.
FILTERED="$(echo $PORTAGE_BINHOST | tr ' ' '\n' | grep toolchain | xargs echo)"
# If no aarch64 folder exists, try to remove any existing Rust packages.
[ ! -d /usr/lib/rust-*/rustlib/aarch64-unknown-linux-gnu ] && ($sudo emerge -C dev-lang/rust || true)
$sudo PORTAGE_BINHOST="$FILTERED" emerge "${emerge_flags[@]}" dev-lang/rust
fi
fi
# Setup environment and wrappers for our shiny new toolchain