diff options
author | Bryan Hundven <bryanhundven@gmail.com> | 2015-04-07 12:13:18 -0700 |
---|---|---|
committer | Bryan Hundven <bryanhundven@gmail.com> | 2015-04-07 12:13:18 -0700 |
commit | f54c5f674f618f0b57974857865d1e7b8e5a3916 (patch) | |
tree | 6a766a1e30d6b8f3f492e46c35a218cec5d8efc5 /scripts/build/cc | |
parent | 95ef22033ecebabcd696d829a4e34c6b09e073d7 (diff) | |
parent | 586e30f7267fd284b89a0b4419dc5b97a40d3b0f (diff) | |
download | crosstool-ng-f54c5f674f618f0b57974857865d1e7b8e5a3916.tar.gz crosstool-ng-f54c5f674f618f0b57974857865d1e7b8e5a3916.tar.bz2 crosstool-ng-f54c5f674f618f0b57974857865d1e7b8e5a3916.zip |
Merge pull request #64 from jpf91/fixSymlink
Only create ${CT_TARGET}-cc${ext} symlink if ${CT_TARGET}-gcc exists
Diffstat (limited to 'scripts/build/cc')
-rw-r--r-- | scripts/build/cc/gcc.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index 500c9e73..835aea06 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -492,7 +492,9 @@ do_cc_core_backend() { # check whether compiler has an extension file="$( ls -1 "${prefix}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )" [ -z "${file}" ] || ext=".${file##*.}" - CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}" + if [ -f "${prefix}/bin/${CT_TARGET}-gcc${ext}" ]; then + CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${prefix}/bin/${CT_TARGET}-cc${ext}" + fi if [ "${CT_MULTILIB}" = "y" ]; then if [ "${CT_CANADIAN}" = "y" -a "${mode}" = "baremetal" \ @@ -884,7 +886,9 @@ do_cc_backend() { # check whether compiler has an extension file="$( ls -1 "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )" [ -z "${file}" ] || ext=".${file##*.}" - CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}" + if [ -f "${CT_PREFIX_DIR}/bin/${CT_TARGET}-gcc${ext}" ]; then + CT_DoExecLog ALL ln -sfv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}" + fi if [ "${CT_MULTILIB}" = "y" ]; then if [ "${CT_CANADIAN}" = "y" ]; then |