Lines 1-5
Link Here
|
1 |
#!/bin/bash |
1 |
#!/bin/bash |
2 |
# Copyright 1999-2012 Gentoo Foundation |
2 |
# Copyright 2002-2019 Gentoo Authors |
3 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# Distributed under the terms of the GNU General Public License v2 |
4 |
|
4 |
|
5 |
# Format of /etc/env.d/gcc/: |
5 |
# Format of /etc/env.d/gcc/: |
Lines 286-292
handle_split_usr() {
Link Here
|
286 |
# but on other systems (arm/mips/etc...), this is quite critical. |
286 |
# but on other systems (arm/mips/etc...), this is quite critical. |
287 |
# http://bugs.gentoo.org/60190 |
287 |
# http://bugs.gentoo.org/60190 |
288 |
# |
288 |
# |
289 |
# Note: libunwind.so is is a DT_NEEDED dependency only on ia64 systems |
289 |
# Note: libunwind.so.7 is a DT_NEEDED dependency only on ia64 systems |
290 |
# where libunwind.so.7 is provided by gcc itself, see: |
290 |
# where libunwind.so.7 is provided by gcc itself, see: |
291 |
# https://bugs.gentoo.org/667020 |
291 |
# https://bugs.gentoo.org/667020 |
292 |
# https://bugs.gentoo.org/693252 |
292 |
# https://bugs.gentoo.org/693252 |
Lines 306-317
handle_split_usr() {
Link Here
|
306 |
# If /usr isn't a sep mount, then don't bother with linking stuff. |
306 |
# If /usr isn't a sep mount, then don't bother with linking stuff. |
307 |
if ln "${ROOT}/${LDPATH}/libgcc.a" "${EROOT}"/lib/.gcc.config.$$ 2>/dev/null ; then |
307 |
if ln "${ROOT}/${LDPATH}/libgcc.a" "${EROOT}"/lib/.gcc.config.$$ 2>/dev/null ; then |
308 |
rm -f "${EROOT}"/lib/.gcc.config.$$ |
308 |
rm -f "${EROOT}"/lib/.gcc.config.$$ |
309 |
if [[ -n $(find "${EROOT}"/lib*/lib{gcc_s,unwind}{.so*,*dylib} 2>/dev/null) ]] ; then |
309 |
local lib old_libs=0 saved_nullglob=$(shopt -p nullglob) |
|
|
310 |
shopt -s nullglob |
311 |
for lib in "${EROOT}"/lib*/libgcc_s{.so*,*dylib} "${EROOT}"/lib*/libunwind.so.7* ; do |
310 |
# If we previously had stuff in /, make sure ldconfig gets re-run. |
312 |
# If we previously had stuff in /, make sure ldconfig gets re-run. |
311 |
rm -f "${EROOT}"/lib*/lib{gcc_s,unwind}{.so*,*dylib} |
313 |
rm -f "${lib}" |
312 |
return 1 |
314 |
old_libs=1 |
313 |
fi |
315 |
done |
314 |
return 0 |
316 |
${saved_nullglob} |
|
|
317 |
[[ ${old_libs} == 1 ]] && return 1 || return 0 |
315 |
fi |
318 |
fi |
316 |
|
319 |
|
317 |
# Only bother with this stuff for the native ABI. We assume the user |
320 |
# Only bother with this stuff for the native ABI. We assume the user |
318 |
- |
|
|