diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> | 2019-09-04 21:29:58 +0200 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-09-05 07:28:11 +0100 |
commit | ff954c6b20686d490d1382f90d2a4d64754bb18e (patch) | |
tree | 8b05886cc0723765359836e07c9351597ffe8ecd /gcc-config | |
parent | gcc-config: clarify why libunwind.so* is needed at all (diff) | |
download | gcc-config-ff954c6b20686d490d1382f90d2a4d64754bb18e.tar.gz gcc-config-ff954c6b20686d490d1382f90d2a4d64754bb18e.tar.bz2 gcc-config-ff954c6b20686d490d1382f90d2a4d64754bb18e.zip |
gcc-config: During initial clean-up, delete only libunwind.so.7*, but not other files matching libunwind.so*.
libunwind.so belongs to sys-libs/libunwind.
libunwind.so.7* is copied by gcc-config (only on ia64) from active version of sys-devel/gcc.
libunwind.so.8* belong to sys-libs/libunwind since 1.0.1 version released on 2011-09-11.
[slyfox@: sumplified 'return' statement]
Bug: https://bugs.gentoo.org/667020
Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Diffstat (limited to 'gcc-config')
-rwxr-xr-x | gcc-config | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -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/: @@ -286,7 +286,7 @@ handle_split_usr() { # but on other systems (arm/mips/etc...), this is quite critical. # http://bugs.gentoo.org/60190 # - # Note: libunwind.so is is a DT_NEEDED dependency only on ia64 systems + # Note: libunwind.so.7 is a DT_NEEDED dependency only on ia64 systems # where libunwind.so.7 is provided by gcc itself, see: # https://bugs.gentoo.org/667020 # https://bugs.gentoo.org/693252 @@ -306,12 +306,15 @@ handle_split_usr() { # 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 + local lib old_libs=0 saved_nullglob=$(shopt -p nullglob) + shopt -s nullglob + for lib in "${EROOT}"/lib*/libgcc_s{.so*,*dylib} "${EROOT}"/lib*/libunwind.so.7* ; do # If we previously had stuff in /, make sure ldconfig gets re-run. - rm -f "${EROOT}"/lib*/lib{gcc_s,unwind}{.so*,*dylib} - return 1 - fi - return 0 + rm -f "${lib}" + old_libs=1 + done + ${saved_nullglob} + return ${old_libs} fi # Only bother with this stuff for the native ABI. We assume the user |