mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-18 10:46:26 +00:00
Pass original multi_os_dir to iterator.
This is needed for callbacks that use that directory to look inside GCC internal directories, e.g. moving the libraries. This broke when I made libexpat for target honor ${CT_SHARED_LIBS}. Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
53758f34ef
commit
b1ac2e7a7d
@ -787,8 +787,9 @@ gcc_movelibs() {
|
|||||||
eval "${arg// /\\ }"
|
eval "${arg// /\\ }"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Move only files, directories are for other multilibs
|
# Move only files, directories are for other multilibs. We're looking inside
|
||||||
gcc_dir="${CT_PREFIX_DIR}/${CT_TARGET}/lib/${multi_os_dir}"
|
# GCC's directory structure, thus use unmangled multi_os_dir that GCC reports.
|
||||||
|
gcc_dir="${CT_PREFIX_DIR}/${CT_TARGET}/lib/${multi_os_dir_gcc}"
|
||||||
if [ ! -d "${gcc_dir}" ]; then
|
if [ ! -d "${gcc_dir}" ]; then
|
||||||
# GCC didn't install anything outside of sysroot
|
# GCC didn't install anything outside of sysroot
|
||||||
return
|
return
|
||||||
|
@ -1561,6 +1561,7 @@ CT_KconfigDeleteOption() {
|
|||||||
# multi_flags CFLAGS for this multilib
|
# multi_flags CFLAGS for this multilib
|
||||||
# multi_dir GCC internal library location for the multilib
|
# multi_dir GCC internal library location for the multilib
|
||||||
# multi_os_dir OS library location for the multilib
|
# multi_os_dir OS library location for the multilib
|
||||||
|
# multi_os_dir_gcc Same as multi_os_dir, preserved from GCC output
|
||||||
# multi_root Sysroot for this multilib
|
# multi_root Sysroot for this multilib
|
||||||
# multi_target Target tuple, either as reported by GCC or by our guesswork
|
# multi_target Target tuple, either as reported by GCC or by our guesswork
|
||||||
# multi_count Total number of multilibs
|
# multi_count Total number of multilibs
|
||||||
@ -1572,7 +1573,7 @@ CT_IterateMultilibs() {
|
|||||||
local func="${1}"
|
local func="${1}"
|
||||||
local prefix="${2}"
|
local prefix="${2}"
|
||||||
local -a multilibs
|
local -a multilibs
|
||||||
local multi_dir multi_os_dir multi_root multi_flags multi_index multi_target
|
local multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_flags multi_index multi_target
|
||||||
local root_suffix
|
local root_suffix
|
||||||
local dir_postfix
|
local dir_postfix
|
||||||
|
|
||||||
@ -1617,6 +1618,9 @@ CT_IterateMultilibs() {
|
|||||||
# will work. If not, we'll supply both multi_root/multi_os_dir (which will
|
# will work. If not, we'll supply both multi_root/multi_os_dir (which will
|
||||||
# likely break later, e.g. while building final GCC with C++ support). But,
|
# likely break later, e.g. while building final GCC with C++ support). But,
|
||||||
# we've done all we can.
|
# we've done all we can.
|
||||||
|
# We do supply original multi_os_dir for consumers that need to look inside
|
||||||
|
# GCC's directories (e.g. to locate the libraries), under the name of
|
||||||
|
# multi_os_dir_gcc.
|
||||||
multi_flags=$( echo "${multilib#*;}" | sed -r -e 's/@/ -/g;' )
|
multi_flags=$( echo "${multilib#*;}" | sed -r -e 's/@/ -/g;' )
|
||||||
multi_dir="${multilib%%;*}"
|
multi_dir="${multilib%%;*}"
|
||||||
multi_os_dir=$( "${CT_TARGET}-gcc" -print-multi-os-directory ${multi_flags} )
|
multi_os_dir=$( "${CT_TARGET}-gcc" -print-multi-os-directory ${multi_flags} )
|
||||||
@ -1640,6 +1644,7 @@ CT_IterateMultilibs() {
|
|||||||
multi_flags=$( echo "${multilib#*;}" | sed -r -e 's/@/ -/g;' )
|
multi_flags=$( echo "${multilib#*;}" | sed -r -e 's/@/ -/g;' )
|
||||||
multi_dir="${multilib%%;*}"
|
multi_dir="${multilib%%;*}"
|
||||||
multi_os_dir=$( "${CT_TARGET}-gcc" -print-multi-os-directory ${multi_flags} )
|
multi_os_dir=$( "${CT_TARGET}-gcc" -print-multi-os-directory ${multi_flags} )
|
||||||
|
multi_os_dir_gcc="${multi_os_dir}"
|
||||||
multi_root=$( "${CT_TARGET}-gcc" -print-sysroot ${multi_flags} )
|
multi_root=$( "${CT_TARGET}-gcc" -print-sysroot ${multi_flags} )
|
||||||
multi_target=$( "${CT_TARGET}-gcc" -print-multiarch ${multi_flags} )
|
multi_target=$( "${CT_TARGET}-gcc" -print-multiarch ${multi_flags} )
|
||||||
root_suffix="${multi_root#${CT_SYSROOT_DIR}}"
|
root_suffix="${multi_root#${CT_SYSROOT_DIR}}"
|
||||||
|
Loading…
Reference in New Issue
Block a user