diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-06-13 04:46:14 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-06-13 04:46:14 +0000 |
commit | f8c388dd58acab03310e04e3260dc2fb473c9f6a (patch) | |
tree | 0f0b06fc26ee9ce7bf617e2c0231d5d7347cb141 /eclass/toolchain.eclass | |
parent | Version bump. Fixing bug #95733. (diff) | |
download | gentoo-2-f8c388dd58acab03310e04e3260dc2fb473c9f6a.tar.gz gentoo-2-f8c388dd58acab03310e04e3260dc2fb473c9f6a.tar.bz2 gentoo-2-f8c388dd58acab03310e04e3260dc2fb473c9f6a.zip |
when unmerging a cross-compiler toolchain, try to clean up after ourselves
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r-- | eclass/toolchain.eclass | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index 9f59cd111161..bc57332743d1 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.167 2005/06/11 06:03:31 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.168 2005/06/13 04:46:14 vapier Exp $ HOMEPAGE="http://www.gnu.org/software/gcc/gcc.html" LICENSE="GPL-2 LGPL-2.1" @@ -817,8 +817,15 @@ gcc-compiler_pkg_postrm() { # the common libstdc++.la exists in the ${LIBPATH} of the gcc that we are # unmerging. if it does, that means this was a simple re-emerge. - # don't worry about cross-compile toolchains - is_crosscompile && return 0 + # clean up the cruft left behind by cross-compilers + if is_crosscompile ; then + if [[ -z $(ls "${ROOT}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then + rm -f "${ROOT}"/etc/env.d/gcc/config-${CTARGET} + rm -f "${ROOT}"/etc/env.d/??gcc-${CTARGET} + rm -f "${ROOT}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64} + fi + return 0 + fi # ROOT isnt handled by the script [[ ${ROOT} != "/" ]] && return 0 |