mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-20 17:12:55 +00:00
cc/gcc: fix cc symlink when executables have an extension
When building a cross-compiler for a host which depends on file extensions the symlink for cc was not installed correctly Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com> [Yann E. MORIN: style fixes, enhancements, code prettying] Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
parent
8116e283fa
commit
a6da1aa63a
@ -262,7 +262,10 @@ do_cc_core() {
|
||||
|
||||
# Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
|
||||
# to call the C compiler with the same, somewhat canonical name.
|
||||
CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${core_prefix_dir}/bin/${CT_TARGET}"-cc
|
||||
# check whether compiler has an extension
|
||||
file="$( ls -1 "${core_prefix_dir}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )"
|
||||
[ -z "${file}" ] || ext=".${file##*.}"
|
||||
CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc${ext}" "${core_prefix_dir}/bin/${CT_TARGET}-cc${ext}"
|
||||
|
||||
CT_EndStep
|
||||
}
|
||||
@ -390,7 +393,10 @@ do_cc() {
|
||||
|
||||
# Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
|
||||
# to call the C compiler with the same, somewhat canonical name.
|
||||
CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${CT_PREFIX_DIR}/bin/${CT_TARGET}"-cc
|
||||
# check whether compiler has an extension
|
||||
file="$( ls -1 "${CT_TARGET}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )"
|
||||
[ -z "${file}" ] || ext=".${file##*.}"
|
||||
CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}"
|
||||
|
||||
CT_EndStep
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user