mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-23 14:41:31 +02:00
setup_board: make the gcc version stable by default
This is needed as part of transition to cros-workon. Crossdev has a -S option to install the current stable, which is the preferred future option, but would greatly complicate the logic. BUG=chromium-os:25338 TEST=setup_board --board=any --force, see it build the right one Change-Id: Ibb4fd18d122f69835eb471b2fa1a258c571dfdd1 Reviewed-on: https://gerrit.chromium.org/gerrit/14878 Tested-by: Zdenek Behan <zbehan@chromium.org> Commit-Ready: Zdenek Behan <zbehan@chromium.org> Reviewed-by: Zdenek Behan <zbehan@chromium.org>
This commit is contained in:
parent
dd7d7939e0
commit
03b28fcbcf
13
setup_board
13
setup_board
@ -48,7 +48,7 @@ DEFINE_boolean force $FLAGS_FALSE \
|
|||||||
"Force re-creating board root."
|
"Force re-creating board root."
|
||||||
DEFINE_string binutils_version "2.21-r3" \
|
DEFINE_string binutils_version "2.21-r3" \
|
||||||
"Version of binutils to use."
|
"Version of binutils to use."
|
||||||
DEFINE_string gcc_version "4.6.0-r13" \
|
DEFINE_string gcc_version "stable" \
|
||||||
"Version of gcc to use."
|
"Version of gcc to use."
|
||||||
DEFINE_string libc_version "2.11.1-r3" \
|
DEFINE_string libc_version "2.11.1-r3" \
|
||||||
"Version of libc to use."
|
"Version of libc to use."
|
||||||
@ -142,9 +142,14 @@ toolchain_needs_update() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Unmask any ebuilds previously masked by crossdev. crossdev will re-setup
|
# Unmask any ebuilds previously [un]masked by crossdev. crossdev will
|
||||||
# its masks appropriately the next time we run it.
|
# re-setup its masks appropriately the next time we run it.
|
||||||
sudo rm -f /etc/portage/package.mask/cross-$toolchain
|
sudo rm -f /etc/portage/package.{mask,keywords}/cross-$toolchain
|
||||||
|
|
||||||
|
if [ "$FLAGS_gcc_version" = "stable" ]; then
|
||||||
|
FLAGS_gcc_version=$(portageq best_visible / "cross-$toolchain/gcc"| \
|
||||||
|
sed -e "s,cross-$toolchain/gcc-,,")
|
||||||
|
fi
|
||||||
|
|
||||||
local flags="--pretend --quiet --update"
|
local flags="--pretend --quiet --update"
|
||||||
local pkgs
|
local pkgs
|
||||||
|
Loading…
x
Reference in New Issue
Block a user