scripts/bootstrap: flatcar: use python3; add static-libs, openmp

This change explicitly calls python3 (instead of python) in pycmd
so portage commands work (as we ship python 2, too, and it's still
the default).

Also, 'static-libs' and 'opempn' are added to the
bootstrap emerge USE flags (stage 3 of the bootstrap-sh script,
which is run in stage 2 of the SDK catalyst bootstrapping process):
- 'static-libs' un-breaks the zlib build: zlib installed has this flag
   set and zlib requested per emerge command line in
   bootstrap.sh stage 3 needs this flag to prevent a slot conflict.
- 'openmp' is to honor requirements of newer versions of GCC and is
   added according to Gentoo guidelines published here:
   https://wiki.gentoo.org/wiki/User:Sakaki/Sakaki%27s_EFI_Install_Guide/Building_the_Gentoo_Base_System_Minus_Kernel#Gentoo_Bootstrap_Remix:_Progressing_from_Stage_1_to_Stage_2

Signed-off-by: Thilo Fromm <thilo@kinvolk.io>
This commit is contained in:
Thilo Fromm 2021-03-02 13:52:48 +01:00
parent f58e145ba8
commit 7172e40cd7

View File

@ -168,8 +168,8 @@ cleanup() {
}
pycmd() {
[[ ${DEBUG} = "1" ]] && echo /usr/bin/python -c "$@" > /dev/stderr
/usr/bin/python -c "$@"
[[ ${DEBUG} = "1" ]] && echo /usr/bin/python3 -c "$@" > /dev/stderr
/usr/bin/python3 -c "$@"
}
# TSTP messes ^Z of bootstrap up, so we don't trap it anymore.
@ -319,7 +319,7 @@ if [ ${BOOTSTRAP_STAGE} -le 1 ] ; then
echo -------------------------------------------------------------------------------
set_bootstrap_stage 2
fi
export USE="-* bootstrap ${ALLOWED_USE} ${BOOTSTRAP_USE}"
export USE="-* bootstrap ${ALLOWED_USE} ${BOOTSTRAP_USE} openmp static-libs"
# We can't unmerge headers which may or may not exist yet. If your
# trying to use nptl, it may be needed to flush out any old headers