aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-11-18 20:03:14 -0500
committerMike Frysinger <vapier@gentoo.org>2012-11-18 20:03:14 -0500
commit12a60e3fea8fe751f26d3153fbd940fad085038f (patch)
tree7957cb88b90bdbfd86eacbe567b47ab9987825da /gcc-config
parentgcc-config: only handle default ABI libgcc_s with split /usr (diff)
downloadgcc-config-12a60e3fea8fe751f26d3153fbd940fad085038f.tar.gz
gcc-config-12a60e3fea8fe751f26d3153fbd940fad085038f.tar.bz2
gcc-config-12a60e3fea8fe751f26d3153fbd940fad085038f.zip
gcc-config: clean up libgcj pc files better
We need to clean up libgcj when switching to versions that do not have gcj support enabled. We should also clean up all broken symlinks that might be orphaned due to the unmerging of older versions. URL: http://bugs.gentoo.org/430932 Reported-by: Arfrever Frehtes Taifersar Arahesis <arfrever.fta@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'gcc-config')
-rwxr-xr-xgcc-config19
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc-config b/gcc-config
index 0445335..0406f95 100755
--- a/gcc-config
+++ b/gcc-config
@@ -422,14 +422,19 @@ switch_profile() {
ln -sf ${CC_COMP} "${GCC_ENV_D}/.NATIVE"
# Relocate random crap
- if [[ -e ${ROOT}/usr/${GENTOO_LIBDIR}/pkgconfig/libgcj-${CC_COMP_VERSION}.pc ]] ; then
- local mver=${CC_COMP_VERSION:0:3}
- for x in "" "-${mver}" ; do
- x="${ROOT}/usr/lib/pkgconfig/libgcj${x}.pc"
+ local pkgconfdir="${ROOT}/usr/${GENTOO_LIBDIR}/pkgconfig"
+ local mver=${CC_COMP_VERSION:0:3}
+ for x in "" "-${mver}" ; do
+ x="${pkgconfdir}/libgcj${x}.pc"
+ if [[ -e ${pkgconfdir}/libgcj-${CC_COMP_VERSION}.pc ]] ; then
+ ln -sf libgcj-${CC_COMP_VERSION}.pc "${x}"
+ else
+ # Maybe we selected a version that lacks gcj support.
rm -f "${x}"
- ln -s libgcj-${CC_COMP_VERSION}.pc "${x}"
- done
- fi
+ fi
+ done
+ # Clean out anything left over from older versions. #430932
+ find "${pkgconfdir}"/libgcj*.pc -xtype l -delete 2>/dev/null
handle_split_usr
: $(( envd_changed += $? ))