Checking GCC version (Re: [Libreoffice-commits] core.git: configure.ac)

Lubos Lunak l.lunak at suse.cz
Fri Aug 9 04:18:30 PDT 2013


On Friday 09 of August 2013, Lionel Elie Mamane wrote:
>  configure.ac |    9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> New commits:
> commit 91ec774c9fff46af6800e75315561e86167fe5d1
> Author: Lionel Elie Mamane <lionel at mamane.lu>
> Date:   Fri Aug 9 10:28:51 2013 +0200
>
>     $CC --version is too unstructured
>
>     Give up and revert to "$CC -dumpversion".
>     Since by now no test now refers to patchlevel, make it unavailable in
> GCCVER so that nobody tries to use it.

 Seeing all these commits about checking GCC version, does it actually make 
sense to do such checks?

 Using hardcoded GCC version is not quite correct even only with GCC, as e.g. 
some distros backport fixes, but now that some of us use Clang, this is just 
plain wrong. Clang reports itself as GCC 4.2.1 when asked the GCC way, and 
given that there's no clear mapping between GCC and Clang versions, this 
cannot really be made better. E.g. just recently I noticed that I was geting 
no deprecation warnings, because there was something that required GCC newer 
than 4.3(?), and I had to replace it by a configure check. Given that there 
used to be more places like this, we almost don't actually use GCC version 
checks anymore, and when we do, it's probably broken the same way.

-- 
 Lubos Lunak
 l.lunak at suse.cz


More information about the LibreOffice mailing list