aboutsummaryrefslogtreecommitdiff
path: root/scripts/gcc-version.sh
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-07-14 20:10:34 -0400
committerTom Rini <trini@konsulko.com>2021-07-14 20:10:34 -0400
commitc11f5abce84f630c92304683d5bde3204c5612c4 (patch)
tree29f4a7db27669fac1ea7b7eb8821b5440b09af0d /scripts/gcc-version.sh
parenteae8c7c33829c3bd25a792600c1fe6ed842a1ddc (diff)
parent963fde31559f50ceb4f5965f00d79f8747a9d217 (diff)
Merge branch '2021-07-14-build-and-host-updates'
- Resync Kbuild with the v4.20 Linux Kernel release - Update checkpatch.pl - Assorted other tooling updates
Diffstat (limited to 'scripts/gcc-version.sh')
-rwxr-xr-xscripts/gcc-version.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/gcc-version.sh b/scripts/gcc-version.sh
index debecb5561..11bb909845 100755
--- a/scripts/gcc-version.sh
+++ b/scripts/gcc-version.sh
@@ -1,4 +1,5 @@
#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
#
# gcc-version [-p] gcc-command
#
@@ -22,10 +23,10 @@ if [ ${#compiler} -eq 0 ]; then
exit 1
fi
-MAJOR=$(echo __GNUC__ | $compiler -E -xc - | tail -n 1)
-MINOR=$(echo __GNUC_MINOR__ | $compiler -E -xc - | tail -n 1)
+MAJOR=$(echo __GNUC__ | $compiler -E -x c - | tail -n 1)
+MINOR=$(echo __GNUC_MINOR__ | $compiler -E -x c - | tail -n 1)
if [ "x$with_patchlevel" != "x" ] ; then
- PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -xc - | tail -n 1)
+ PATCHLEVEL=$(echo __GNUC_PATCHLEVEL__ | $compiler -E -x c - | tail -n 1)
printf "%02d%02d%02d\\n" $MAJOR $MINOR $PATCHLEVEL
else
printf "%02d%02d\\n" $MAJOR $MINOR