]> git.ipfire.org Git - thirdparty/u-boot.git/blobdiff - scripts/gcc-version.sh
Merge tag 'xilinx-for-v2024.04-rc1-v2' of https://source.denx.de/u-boot/custodians...
[thirdparty/u-boot.git] / scripts / gcc-version.sh
old mode 100644 (file)
new mode 100755 (executable)
index debecb5..11bb909
@@ -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