Skip to content

Commit

Permalink
scripts: cc-version: mention it is the C compiler
Browse files Browse the repository at this point in the history
Since we have a Rust compiler too, be clear on what compiler
we are talking about.

Signed-off-by: Miguel Ojeda <[email protected]>
  • Loading branch information
ojeda committed Jan 14, 2022
1 parent c8eb092 commit 9efd368
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/cc-version.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
#
# Print the compiler name and its version in a 5 or 6-digit form.
# Print the C compiler name and its version in a 5 or 6-digit form.
# Also, perform the minimum version check.

set -e

# Print the compiler name and some version components.
get_compiler_info()
# Print the C compiler name and some version components.
get_c_compiler_info()
{
cat <<- EOF | "$@" -E -P -x c - 2>/dev/null
#if defined(__clang__)
Expand All @@ -32,7 +32,7 @@ get_canonical_version()

# $@ instead of $1 because multiple words might be given, e.g. CC="ccache gcc".
orig_args="$@"
set -- $(get_compiler_info "$@")
set -- $(get_c_compiler_info "$@")

name=$1

Expand All @@ -52,7 +52,7 @@ ICC)
min_version=$($min_tool_version icc)
;;
*)
echo "$orig_args: unknown compiler" >&2
echo "$orig_args: unknown C compiler" >&2
exit 1
;;
esac
Expand All @@ -62,7 +62,7 @@ min_cversion=$(get_canonical_version $min_version)

if [ "$cversion" -lt "$min_cversion" ]; then
echo >&2 "***"
echo >&2 "*** Compiler is too old."
echo >&2 "*** C compiler is too old."
echo >&2 "*** Your $name version: $version"
echo >&2 "*** Minimum $name version: $min_version"
echo >&2 "***"
Expand Down

0 comments on commit 9efd368

Please sign in to comment.