@@ -, +, @@ --- gcc-config | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) --- a/gcc-config +++ a/gcc-config @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 1999-2012 Gentoo Foundation +# Copyright 2002-2019 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # Format of /etc/env.d/gcc/: @@ -281,40 +281,39 @@ mv_if_diff() { } handle_split_usr() { - # We need to make sure that libgcc_s.so / libunwind.so make it into /lib. + # We need to make sure that libgcc_s.so makes it into /lib. # On many systems (x86/amd64/etc...), this will probably never matter, # but on other systems (arm/mips/etc...), this is quite critical. # http://bugs.gentoo.org/60190 # # The funky move magic is required for proper updating of in-use files. - # + + # Gentoo Prefix systems don't "boot", so no need to handle split-/usr. + [[ -n ${EPREFIX} ]] && return 0 + # We use the same ordering logic as mentioned in the MY_LDPATH setup. # We get the libs from the latest version available. local LDPATH - eval $(grep -h '^LDPATH=' "${GCC_ENV_D}"/${CHOST}-* | tail -1) LDPATH=${LDPATH%%:*} # If /usr isn't a sep mount, then don't bother with linking stuff. if ln "${ROOT}/${LDPATH}/libgcc.a" "${EROOT}"/lib/.gcc.config.$$ 2>/dev/null ; then rm -f "${EROOT}"/lib/.gcc.config.$$ - if [[ -n $(find "${EROOT}"/lib*/lib{gcc_s,unwind}{.so*,*dylib} 2>/dev/null) ]] ; then + if [[ -n $(find "${EROOT}"/lib*/libgcc_s{.so*,*dylib} 2>/dev/null) ]] ; then # If we previously had stuff in /, make sure ldconfig gets re-run. - rm -f "${EROOT}"/lib*/lib{gcc_s,unwind}{.so*,*dylib} + rm -f "${EROOT}"/lib*/libgcc_s{.so*,*dylib} return 1 fi return 0 fi - # Gentoo Prefix systems don't "boot", so no need to handle split-/usr - [[ -n ${EPREFIX} ]] && return 0 - # Only bother with this stuff for the native ABI. We assume the user # doesn't have critical binaries for non-native ABIs which is fair. local gcclib local libdir="${EROOT}${GENTOO_LIBDIR}" mkdir -p "${libdir}"/.gcc.config.new || return 0 # !?!?! - for gcclib in gcc_s unwind ; do + for gcclib in gcc_s ; do # This assumes that we always have the .so symlink, # but for now, that should be safe ... for gcclib in "${ROOT}${LDPATH}"/lib${gcclib}.so.* ; do --