diff options
author | 2012-11-18 20:03:14 -0500 | |
---|---|---|
committer | 2012-11-18 20:03:14 -0500 | |
commit | 12a60e3fea8fe751f26d3153fbd940fad085038f (patch) | |
tree | 7957cb88b90bdbfd86eacbe567b47ab9987825da | |
parent | gcc-config: only handle default ABI libgcc_s with split /usr (diff) | |
download | gcc-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>
-rwxr-xr-x | gcc-config | 19 |
1 files changed, 12 insertions, 7 deletions
@@ -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 += $? )) |