diff options
author | 2022-11-10 16:45:48 +0100 | |
---|---|---|
committer | 2023-01-05 00:16:31 +0000 | |
commit | d245197378818f66c978d4427b6d0d81fbfaefc6 (patch) | |
tree | 1130eb0be9ebe012dbcc5db8bae256ef9e9c2b51 | |
parent | Read LIBDIR with portageq from EROOT instead of hardcoding the / value (diff) | |
download | gcc-config-d245197378818f66c978d4427b6d0d81fbfaefc6.tar.gz gcc-config-d245197378818f66c978d4427b6d0d81fbfaefc6.tar.bz2 gcc-config-d245197378818f66c978d4427b6d0d81fbfaefc6.zip |
gcc-config: Use relative paths for liblto and cc symlink targetsv2.10
That way, for ROOT different than / (like /build/amd64-usr) these
symlinks won't dangle after chrooting into ROOT.
Bug: https://bugs.gentoo.org/880977
Signed-off-by: Krzesimir Nowak <knowak@microsoft.com>
Closes: https://github.com/gentoo/gcc-config/pull/2
Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-x | gcc-config | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -345,7 +345,7 @@ update_wrappers() { # But create our own ${CTARGET}-cc in /usr/bin to avoid fallbacks # to the symlinks LLVM creates (sys-devel/clang-toolchain-symlinks). # bug #872416. - atomic_ln "${EROOT}usr/bin/${CTARGET}-gcc" "${EROOT}usr/bin" "${CTARGET}-cc" + atomic_ln "${CTARGET}-gcc" "${EROOT}usr/bin" "${CTARGET}-cc" # handle the canonical cpp wrapper if ! is_cross_compiler ; then @@ -813,11 +813,12 @@ switch_profile() { # Update LTO plugin for GCC. Supported as of binutils 2.25. local BFD_PLUGINS_DIR local LIBLTO_PLUGIN - LIBLTO_PLUGIN="${EROOT}usr/libexec/gcc/${CTARGET}/${CC_COMP_VERSION}/liblto_plugin.so" if is_cross_compiler; then BFD_PLUGINS_DIR="${EROOT}usr/${CHOST}/${CTARGET}/binutils-bin/lib/bfd-plugins" + LIBLTO_PLUGIN="../../../../../libexec/gcc/${CTARGET}/${CC_COMP_VERSION}/liblto_plugin.so" else BFD_PLUGINS_DIR="${EROOT}usr/${CHOST}/binutils-bin/lib/bfd-plugins" + LIBLTO_PLUGIN="../../../../libexec/gcc/${CTARGET}/${CC_COMP_VERSION}/liblto_plugin.so" fi mkdir -p "${BFD_PLUGINS_DIR}" ln -sf "${LIBLTO_PLUGIN}" "${BFD_PLUGINS_DIR}" |