mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-19 11:17:00 +00:00
Create ld.so.conf
Also a fix for CT_IterateMultilibs: it didn't pass multi_os_dir_gcc, so it only worked if the caller did *not* declare it as a local variable. Signed-off-by: Alexey Neyman <stilor@att.net>
This commit is contained in:
parent
b090e0f74d
commit
11b52ab6d7
@ -789,7 +789,7 @@ do_gcc_for_build() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gcc_movelibs() {
|
gcc_movelibs() {
|
||||||
local multi_flags multi_dir multi_os_dir 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
|
||||||
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
|
@ -1,5 +1,27 @@
|
|||||||
# This file contains crosstool-NG internal steps
|
# This file contains crosstool-NG internal steps
|
||||||
|
|
||||||
|
create_ldso_conf()
|
||||||
|
{
|
||||||
|
local multi_dir multi_os_dir multi_os_dir_gcc multi_root multi_flags multi_index multi_count multi_target
|
||||||
|
local b d
|
||||||
|
|
||||||
|
for arg in "$@"; do
|
||||||
|
eval "${arg// /\\ }"
|
||||||
|
done
|
||||||
|
|
||||||
|
CT_DoExecLog ALL mkdir -p "${multi_root}/etc"
|
||||||
|
for b in /lib /usr/lib /usr/local/lib; do
|
||||||
|
d="${b}/${multi_os_dir}"
|
||||||
|
CT_SanitizeVarDir d
|
||||||
|
echo "${d}" >> "${multi_root}/etc/ld.so.conf"
|
||||||
|
if [ "${multi_os_dir}" != "${multi_os_dir_gcc}" ]; then
|
||||||
|
d="${b}/${multi_os_dir_gcc}"
|
||||||
|
CT_SanitizeVarDir d
|
||||||
|
echo "${d}" >> "${multi_root}/etc/ld.so.conf"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# This step is called once all components were built, to remove
|
# This step is called once all components were built, to remove
|
||||||
# un-wanted files, to add tuple aliases, and to add the final
|
# un-wanted files, to add tuple aliases, and to add the final
|
||||||
# crosstool-NG-provided files.
|
# crosstool-NG-provided files.
|
||||||
@ -10,7 +32,14 @@ do_finish() {
|
|||||||
local gcc_version
|
local gcc_version
|
||||||
local exe_suffix
|
local exe_suffix
|
||||||
|
|
||||||
CT_DoStep INFO "Cleaning-up the toolchain's directory"
|
CT_DoStep INFO "Finalizing the toolchain's directory"
|
||||||
|
|
||||||
|
if [ "${CT_SHARED_LIBS}" = "y" ]; then
|
||||||
|
# Create /etc/ld.so.conf
|
||||||
|
CT_mkdir_pushd "${CT_BUILD_DIR}/build-create-ldso"
|
||||||
|
CT_IterateMultilibs create_ldso_conf create-ldso
|
||||||
|
CT_Popd
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${CT_STRIP_HOST_TOOLCHAIN_EXECUTABLES}" = "y" ]; then
|
if [ "${CT_STRIP_HOST_TOOLCHAIN_EXECUTABLES}" = "y" ]; then
|
||||||
case "$CT_HOST" in
|
case "$CT_HOST" in
|
||||||
|
@ -1750,13 +1750,14 @@ CT_IterateMultilibs() {
|
|||||||
dir_postfix=_${multi_dir//\//_}
|
dir_postfix=_${multi_dir//\//_}
|
||||||
dir_postfix=${dir_postfix%_.}
|
dir_postfix=${dir_postfix%_.}
|
||||||
CT_mkdir_pushd "${prefix}${dir_postfix}"
|
CT_mkdir_pushd "${prefix}${dir_postfix}"
|
||||||
$func multi_dir="${multi_dir}" \
|
$func multi_dir="${multi_dir}" \
|
||||||
multi_os_dir="${multi_os_dir}" \
|
multi_os_dir="${multi_os_dir}" \
|
||||||
multi_flags="${multi_flags}" \
|
multi_os_dir_gcc="${multi_os_dir_gcc}" \
|
||||||
multi_root="${multi_root}" \
|
multi_flags="${multi_flags}" \
|
||||||
multi_target="${multi_target}" \
|
multi_root="${multi_root}" \
|
||||||
multi_index="${multi_index}" \
|
multi_target="${multi_target}" \
|
||||||
multi_count="${#multilibs[@]}" \
|
multi_index="${multi_index}" \
|
||||||
|
multi_count="${#multilibs[@]}" \
|
||||||
"$@"
|
"$@"
|
||||||
CT_Popd
|
CT_Popd
|
||||||
multi_index=$((multi_index+1))
|
multi_index=$((multi_index+1))
|
||||||
@ -1819,7 +1820,7 @@ CT_SymlinkToolsMultilib()
|
|||||||
# Helper (iterator) for CT_MultilibFixupLDSO
|
# Helper (iterator) for CT_MultilibFixupLDSO
|
||||||
CT__FixupLDSO()
|
CT__FixupLDSO()
|
||||||
{
|
{
|
||||||
local multi_dir multi_os_dir multi_root multi_flags multi_index multi_count
|
local multi_dir multi_os_dir multi_root multi_flags multi_index multi_count multi_target
|
||||||
local binary
|
local binary
|
||||||
local ldso ldso_l ldso_f ldso_d ldso_u multilib_dir
|
local ldso ldso_l ldso_f ldso_d ldso_u multilib_dir
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user