endif()
if (NOT CLR_CMAKE_HOST_WIN32)
- # Ensure that awk is present
- find_program(AWK awk)
- if (AWK STREQUAL "AWK-NOTFOUND")
- message(FATAL_ERROR "AWK not found")
- endif()
-
# detect linker
set(ldVersion ${CMAKE_C_COMPILER};-Wl,--version)
execute_process(COMMAND ${ldVersion}
cmake_extra_defines="$cmake_extra_defines -DARM_SOFTFP=1"
fi
-cmake_command=$(command -v cmake)
+if ! cmake_command=$(command -v cmake); then
+ echo "CMake was not found in PATH."
+ exit 1
+fi
if [[ "$scan_build" == "ON" && -n "$SCAN_BUILD_COMMAND" ]]; then
cmake_command="$SCAN_BUILD_COMMAND $cmake_command"
if [[ -z "$majorVersion" ]]; then
# note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
if [[ "$compiler" == "clang" ]]; then versions=( 11 10 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
- elif [[ "$compiler" == "gcc" ]]; then versions=( 10 9 8 7 6 5 4.9 ); fi
+ elif [[ "$compiler" == "gcc" ]]; then versions=( 11 10 9 8 7 6 5 4.9 ); fi
for version in "${versions[@]}"; do
parts=(${version//./ })
+++ /dev/null
-#!/bin/sh
-
-# Licensed to the .NET Foundation under one or more agreements.
-# The .NET Foundation licenses this file to you under the MIT license.
-#
-# mdtool_gcc
-#
-#Abstract:
-# Generates dependencies for a makefile
-# (for gcc compilers)
-#
-
-str=`grep -n '#mdtool output goes here>' obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile`
-if [ "$str" = "" ] ; then
-#didn't find our placeholder string : don't change file
- echo mdtool_gcc : makefile not setup for mdtool : ignoring
- exit 0
-fi
-
-#truncate makefile to remove old dependencies
-sed /'#mdtool output goes here>'/q obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile > obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.final
-
-echo '#dependencies generated by mdtool_gcc :' >> obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.final
-echo >> obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.final
-# gcc -M generates make-friendly dependencies;
-# -MM ignores system includes (#include <file.h>)
-@CC@ @MDTOOL_CFLAGS@ $@ >> obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.depfromgcc
-#Prepend ../.. to the source's filename
-#with some sed magic, since gcc doesn't do it for us.
-sed 's#: \(.*\)$#: ../../\1#g' obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.depfromgcc > obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.aftersed
-cat obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.aftersed >> obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.final
-
-if [ "$?" = "0" ] ; then
- echo mdtool_gcc : dependencies generated
- # replace old makefile by new one.
- mv -f obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.final obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile
- rm -f obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.aftersed
- rm -f obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile.depfromgcc
- exit 0
-fi
-exit 1
-