mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-18 10:46:26 +00:00
cc/gcc: Ensure value of ext is always set
The "ext" variable is set with the file extension of executable binaries for a given platform. To improve tidiness, this patch ensures the variable is always set even when there is no file path. Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
This commit is contained in:
parent
d824983203
commit
d10a4318ac
@ -707,7 +707,7 @@ do_gcc_core_backend() {
|
||||
# to call the C compiler with the same, somewhat canonical name.
|
||||
# check whether compiler has an extension
|
||||
file="$( ls -1 "${prefix}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )"
|
||||
[ -z "${file}" ] || ext=".${file##*.}"
|
||||
[ -z "${file}" ] && ext="" || ext=".${file##*.}"
|
||||
if [ -f "${prefix}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then
|
||||
CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
|
||||
fi
|
||||
@ -1258,7 +1258,7 @@ do_gcc_backend() {
|
||||
# to call the C compiler with the same, somewhat canonical name.
|
||||
# check whether compiler has an extension
|
||||
file="$( ls -1 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}."* 2>/dev/null || true )"
|
||||
[ -z "${file}" ] || ext=".${file##*.}"
|
||||
[ -z "${file}" ] && ext="" || ext=".${file##*.}"
|
||||
if [ -f "${CT_PREFIX_DIR}/bin/${CT_TARGET}-${CT_CC}${ext}" ]; then
|
||||
CT_DoExecLog ALL ln -sfv "${CT_TARGET}-${CT_CC}${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user