mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-23 22:52:23 +00:00
Merge pull request #666 from stilor/symlinks-gcc-libs
Add symlinks from the libraries' original location to the new one.
This commit is contained in:
commit
54a4975220
@ -759,6 +759,7 @@ do_gcc_for_build() {
|
|||||||
gcc_movelibs() {
|
gcc_movelibs() {
|
||||||
local multi_flags multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_index multi_count
|
local multi_flags multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_index multi_count
|
||||||
local gcc_dir dst_dir
|
local gcc_dir dst_dir
|
||||||
|
local rel
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
eval "${arg// /\\ }"
|
eval "${arg// /\\ }"
|
||||||
@ -779,6 +780,7 @@ gcc_movelibs() {
|
|||||||
dst_dir="${multi_root}/lib/${multi_os_dir}"
|
dst_dir="${multi_root}/lib/${multi_os_dir}"
|
||||||
fi
|
fi
|
||||||
CT_SanitizeVarDir dst_dir gcc_dir
|
CT_SanitizeVarDir dst_dir gcc_dir
|
||||||
|
rel=$( echo "${gcc_dir#${CT_PREFIX_DIR}/}" | sed 's#[^/]\{1,\}#..#g' )
|
||||||
|
|
||||||
ls "${gcc_dir}" | while read f; do
|
ls "${gcc_dir}" | while read f; do
|
||||||
case "${f}" in
|
case "${f}" in
|
||||||
@ -791,6 +793,7 @@ gcc_movelibs() {
|
|||||||
if [ -f "${gcc_dir}/${f}" ]; then
|
if [ -f "${gcc_dir}/${f}" ]; then
|
||||||
CT_DoExecLog ALL mkdir -p "${dst_dir}"
|
CT_DoExecLog ALL mkdir -p "${dst_dir}"
|
||||||
CT_DoExecLog ALL mv "${gcc_dir}/${f}" "${dst_dir}/${f}"
|
CT_DoExecLog ALL mv "${gcc_dir}/${f}" "${dst_dir}/${f}"
|
||||||
|
CT_DoExecLog ALL ln -sf "${rel}/${dst_dir#${CT_PREFIX_DIR}/}/${f}" "${gcc_dir}/${f}"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user