scripts/build/cc/gcc.sh
branch1.6
changeset 1931 875abab986ac
parent 1484 c5451809efdb
     1.1 --- a/scripts/build/cc/gcc.sh	Wed Aug 19 19:44:45 2009 +0200
     1.2 +++ b/scripts/build/cc/gcc.sh	Tue Apr 20 11:39:13 2010 +0200
     1.3 @@ -246,7 +246,10 @@
     1.4  
     1.5      # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
     1.6      # to call the C compiler with the same, somewhat canonical name.
     1.7 -    CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${core_prefix_dir}/bin/${CT_TARGET}"-cc
     1.8 +    # check whether compiler has an extension
     1.9 +    file="$( ls -1 "${core_prefix_dir}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )"
    1.10 +    [ -z "${file}" ] || ext=".${file##*.}"
    1.11 +    CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc${ext}" "${core_prefix_dir}/bin/${CT_TARGET}-cc${ext}"
    1.12  
    1.13      CT_EndStep
    1.14  }
    1.15 @@ -354,7 +357,10 @@
    1.16  
    1.17      # Create a symlink ${CT_TARGET}-cc to ${CT_TARGET}-gcc to always be able
    1.18      # to call the C compiler with the same, somewhat canonical name.
    1.19 -    CT_DoExecLog ALL ln -sv "${CT_TARGET}"-gcc "${CT_PREFIX_DIR}/bin/${CT_TARGET}"-cc
    1.20 +    # check whether compiler has an extension
    1.21 +    file="$( ls -1 "${CT_TARGET}/bin/${CT_TARGET}-gcc."* 2>/dev/null || true )"
    1.22 +    [ -z "${file}" ] || ext=".${file##*.}"
    1.23 +    CT_DoExecLog ALL ln -sv "${CT_TARGET}-gcc${ext}" "${CT_PREFIX_DIR}/bin/${CT_TARGET}-cc${ext}"
    1.24  
    1.25      CT_EndStep
    1.26  }