Merge pull request #30 from marineam/toolchain

Build cross toolchain
This commit is contained in:
Michael Marineau 2013-07-10 11:42:35 -07:00
commit 25f91de8e6
3 changed files with 37 additions and 7 deletions

View File

@ -54,7 +54,7 @@ cat <<EOF
target: stage4
pkgcache_path: $BINPKGS
stage4/packages: dev-python/setuptools dev-vcs/git app-arch/pbzip2 net-misc/curl app-admin/sudo app-shells/bash-completion sys-devel/crossdev coreos-base/hard-host-depends
stage4/fsscript: ${SCRIPT_ROOT}/lib/catalyst_stage4.sh
stage4/fsscript: ${SCRIPT_ROOT}/lib/catalyst_sdk_stage4.sh
EOF
catalyst_stage_default
}

View File

@ -0,0 +1,36 @@
#!/bin/bash
source /tmp/chroot-functions.sh
# Build cross toolchains
# crossdev only does full bootstraps so if all of the packages are already
# installed (i.e. we are updating an existing stage4) then use emerge
for cross_chost in x86_64-cros-linux-gnu; do
echo "Installing toolchain for ${cross_chost}"
cross_pkgs=( cross-${cross_chost}/{binutils,gcc,gdb,glibc,linux-headers} )
cross_bootstrap=0
for pkg in "${cross_pkgs[@]}"; do
if ! portageq match / "$pkg" | grep .; then
cross_bootstrap=1
break
fi
done
if [[ "${cross_bootstrap}" -eq 1 ]]; then
crossdev --ov-output "/usr/local/portage/crossdev" \
--portage "${clst_myemergeopts}" \
--env 'FEATURES=splitdebug' \
--stable --ex-gdb --stage4 \
--target "${cross_chost}" || exit 1
else
# Still run --init-target to ensure config is correct
crossdev --ov-output "/usr/local/portage/crossdev" \
--env 'FEATURES=splitdebug' \
--stable --ex-gdb --init-target \
--target "${cross_chost}" || exit 1
run_merge -u "${cross_pkgs[@]}"
fi
done
echo "Double checking everything is fresh and happy."
run_merge -uDN --with-bdeps=y world

View File

@ -1,6 +0,0 @@
#!/bin/bash
source /tmp/chroot-functions.sh
echo "Double checking everything is fresh and happy."
run_merge -uDN --with-bdeps=y world