25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

make-binaries: Don't use non-prefixed cross tools

Omit the directory that contains cross compilation tools without
"$target-" prefix from the PATH.  Having it in the path might lead to
problems when native tools are needed during cross compilation.  For
actual cross compilation, the prefixed tools should always be used
anyway.
This commit is contained in:
Holger Weiss 2023-10-03 17:56:27 +02:00
parent 86465c418d
commit a3f4a05b0c

View File

@ -724,16 +724,7 @@ build_rel()
local target_dst_tar="$rel_name-$rel_vsn-linux-$libc-$arch.tar.gz"
local saved_path="$PATH"
#
# The "$ct_prefix_dir/$target/$target/bin" directory contains cross
# compilation tools without "$target-" prefix. We add it to the PATH,
# just in case tools are called without prefix somewhere. However, we
# try to use the prefixed tools everywhere, so it should be possible to
# omit this directory from the path if desired. See also:
#
# https://stackoverflow.com/a/24243789
#
export PATH="$ct_prefix_dir/$target/bin:$ct_prefix_dir/$target/$target/bin:$PATH"
export PATH="$ct_prefix_dir/$target/bin:$PATH"
export CC="$target-gcc"
export CXX="$target-g++"
export CPP="$target-cpp"