Kaydet (Commit) 409e6a2e authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

gcc -dumpversion has only MAJOR.MINOR, not MAJOR.MINOR.PATCHLEVEL

At least, for gcc 4.7 on Debian. OTOH, gcc --version outputs
(on its first line)
gcc-4.7.real (Debian 4.7.2-5) 4.7.2

so use that. Hopefully will work across systems & distros.

(gcc-4.7.real is probably just argv[0],
 because diversion from hardening-wrapper)

Change-Id: I94ea73628d8aac107e3ada1dc5a63e51e79ccdb2
üst 8716aa29
...@@ -2929,7 +2929,7 @@ dnl Test the gcc version ...@@ -2929,7 +2929,7 @@ dnl Test the gcc version
dnl =================================================================== dnl ===================================================================
if test "$GCC" = "yes"; then if test "$GCC" = "yes"; then
AC_MSG_CHECKING([the GCC version]) AC_MSG_CHECKING([the GCC version])
_gcc_version=`$CC -dumpversion` _gcc_version=`$CC --version|head -n1|sed 's/^.* //g'`
_gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment