diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-04-12 18:56:42 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-08-09 09:19:14 +0200 |
commit | 409e6a2e0b89eab82e79b0cd122062f47c6c7afb (patch) | |
tree | 5bc98b3da0e3f8b1328928831cd55af2aaf2fe94 /configure.ac | |
parent | 8716aa29fe4b4309fec71ef6a21ccbdd1f3b7f9e (diff) |
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
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 56ad78b3a9c5..546fab91aa2e 100644 --- a/configure.ac +++ b/configure.ac @@ -2929,7 +2929,7 @@ dnl Test the gcc version dnl =================================================================== if test "$GCC" = "yes"; then 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 }'` GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` |