Skip to content

Commit

Permalink
make-binaries: Don't use non-prefixed cross tools
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
weiss committed Oct 3, 2023
1 parent ed87cd1 commit c92a79a
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions tools/make-binaries
Original file line number Diff line number Diff line change
Expand Up @@ -437,16 +437,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"
Expand Down

0 comments on commit c92a79a

Please sign in to comment.