sys-devel/gcc-apple: don't switch to this compiler, it's old
authorFabian Groffen <grobian@gentoo.org>
Tue, 12 Jun 2018 16:23:46 +0000 (18:23 +0200)
committerFabian Groffen <grobian@gentoo.org>
Tue, 12 Jun 2018 16:23:55 +0000 (18:23 +0200)
Package-Manager: Portage-2.3.40, Repoman-2.3.9

sys-devel/gcc-apple/gcc-apple-4.2.1_p5666-r2.ebuild

index fca27fefaa43fa935f213a8080c992e69ba90aa4..1b20668b569d27b727fd646d374c503d9f771d4b 100644 (file)
@@ -352,8 +352,8 @@ src_install() {
 }
 
 pkg_postinst() {
-       # beware this also switches when it's on another branch version of GCC
-       gcc-config ${CTARGET}-${GCC_VERS}
+       # only activate this compiler if nothing else is activated
+       gcc-config -c >& /dev/null || gcc-config ${CTARGET}-${GCC_VERS}
 }
 
 pkg_postrm() {