mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 04:56:58 +02:00
It is not clear why this was forked originally. One reason was to avoid the sys-apps/lsb-release dependency, but it probably wasn't just that. It seems likely that the upstream package did not support cross targets at the time. Now it does. It appears that LTO was previously enabled by us following Gentoo rather than through an explicit decision. They now disable it by default, so we do likewise. It previously used "fat" LTO, which makes Rust especially slow to build and reportedly made rustc slower than with "thin" LTO! There seems little benefit in using thin LTO given that we rebuild Rust almost as much as the packages that use it, plus we don't enable LTO anywhere else. We still avoid rustdoc to keep the size down using INSTALL_MASK. This isn't as good as not building it in the first place, but this alone isn't worth keeping a fork. Cross targets are now handled via the admittedly experimental RUST_CROSS_TARGETS support. This has been in place for a while, and I think it is fairly widely used now. If it does disappear, it would almost certainly be for something even better. This also updates Rust from 1.80.0 to 1.80.1. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
26 lines
754 B
Bash
26 lines
754 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
source /tmp/chroot-functions.sh
|
|
source /tmp/toolchain_util.sh
|
|
|
|
ln -vsfT "$(portageq get_repo_path / coreos-overlay)/coreos/user-patches" \
|
|
/etc/portage/patches
|
|
|
|
echo "Double checking everything is fresh and happy."
|
|
run_merge -uDN --with-bdeps=y world
|
|
|
|
echo "Setting the default Python interpreter"
|
|
eselect python update
|
|
|
|
echo "Building cross toolchain for the SDK."
|
|
configure_crossdev_overlay / /usr/local/portage/crossdev
|
|
|
|
for cross_chost in $(get_chost_list); do
|
|
echo "Building cross toolchain for ${cross_chost}"
|
|
PKGDIR="$(portageq envvar PKGDIR)/crossdev" \
|
|
install_cross_toolchain "${cross_chost}" ${clst_myemergeopts}
|
|
done
|
|
|
|
PKGDIR="$(portageq envvar PKGDIR)/crossdev" install_cross_rust ${clst_myemergeopts}
|