1
2
3
4
5
6
local version
version=${1:-[.0-9]*}
$build_dir/chroot.sh /bin/bash -l -c '
eval "$(emerge --info | grep "^CHOST=")"
gcc-config $(gcc-config -l | gawk "\$2 ~ /$CHOST-'$version'$/{print \$2}" | sort -r | head -1)
'