aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgcc-config15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-config b/gcc-config
index dfc01d0..31a7f4a 100755
--- a/gcc-config
+++ b/gcc-config
@@ -783,6 +783,21 @@ switch_profile() {
find "${pkgconfdir}"/libgcj*.pc -xtype l -delete 2>/dev/null
done
+ # Only update the file if it already exists to allow us to
+ # walk it back if necessary by dropping it from clang-common.
+ # See bug #868639 for background.
+ if [[ -f "${EROOT}/etc/clang/gentoo-gcc-install.cfg" ]] ; then
+ local gcc_lib_path="$(get_lib_path)"
+ gcc_lib_path="${gcc_lib_path%%:*}"
+ cat > "${EROOT}/etc/clang/gentoo-gcc-install.cfg.tmp" <<-EOF
+ # This file is maintained by gcc-config.
+ # It is used to specify the selected GCC installation.
+ --gcc-install-dir="${gcc_lib_path}"
+ EOF
+
+ mv_if_diff "${EROOT}/etc/clang/gentoo-gcc-install.cfg.tmp" "${EROOT}/etc/clang/gentoo-gcc-install.cfg"
+ fi
+
prefix_copy_gcc_libs
handle_split_usr
: $(( envd_changed += $? ))