scripts: a bit cleaner/safer gcc upgrade

This commit is contained in:
Rick Farina (Zero_Chaos) 2017-05-15 23:29:58 -04:00
parent 5e36fa5c31
commit a8aba53c52
No known key found for this signature in database
GPG key ID: A5DD1427DD11F94A

View file

@ -44,9 +44,14 @@ if [ -n "$(find /usr/include/python3.{3,4,5} -type f 2> /dev/null)" ]; then
emerge -1v --usepkg=n --buildpkg=y /usr/include/python3.{3,4,5}
fi
#taken from news item gcc-5-new-c++11-abi
if [ "$(gcc-config -c)" = "x86_64-pc-linux-gnu-5.4.0" ]; then
revdep-rebuild --library 'libstdc++.so.6' -- --buildpkg=y --usepkg=n --exclude gcc
#modified from news item gcc-5-new-c++11-abi
gcc_target="86_64-pc-linux-gnu-5.4.0"
if [ "$(gcc-config -c)" != "${gcc_target}" ]; then
if gcc-config -l | grep -q "${gcc_target}"; then
gcc-config "${gcc_target}"
. /etc/profile
revdep-rebuild --library 'libstdc++.so.6' -- --buildpkg=y --usepkg=n --exclude gcc
fi
fi
if [ -n "${clst_target}" ]; then
@ -65,10 +70,6 @@ if [ -n "${clst_target}" ]; then
echo "pentoo/pentoo kde mate" >> /etc/portage/package.use
emerge @changed-deps || safe_exit
emerge --buildpkg --usepkg --onlydeps --oneshot --deep --update --newuse --changed-use --newrepo pentoo/pentoo || safe_exit
#taken from news item gcc-5-new-c++11-abi
if [ "$(gcc-config -c)" = "x86_64-pc-linux-gnu-5.4.0" ]; then
revdep-rebuild --library 'libstdc++.so.6' -- --buildpkg=y --usepkg=n --exclude gcc
fi
etc-update --automode -5 || safe_exit
fi