[Libreoffice-commits] core.git: configure.ac

Lionel Elie Mamane lionel at mamane.lu
Fri Aug 9 00:20:03 PDT 2013


 configure.ac |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 409e6a2e0b89eab82e79b0cd122062f47c6c7afb
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Fri Apr 12 18:56:42 2013 +0200

    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

diff --git a/configure.ac b/configure.ac
index 56ad78b..546fab9 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 }'`
 


More information about the Libreoffice-commits mailing list