[m-rev.] for review: Make gcc and clang version checks more robust.
Julien Fischer
jfischer at opturion.com
Wed Dec 20 14:54:52 AEDT 2023
On Tue, 19 Dec 2023, Peter Wang wrote:
> {x86_64,i686}-w64-mingw32-gcc -dumpfullversion on Debian 12
> reports "12-win32", which the MERCURY_GCC_VERSION macro failed
> to parse, as it expected a minor version to be present.
Really? Whose idea was that?!? That isn't the documented behaviour
of that option.
> m4/mercury.m4:
> In the MERCURY_GCC_VERSION macro:
> - simplify calling $CC -dumpfullversion or $CC -dumpversion
> - trim any suffix following a hyphen in the raw gcc version output
> - set major/minor/patchlevel fields containing anything
> other than a sequence of decimal digits to "u"
> - use $() syntax for command substitutions
>
> Modify the MERCURY_CLANG_VERSION macro in a similar way.
That's fine.
Julien.
More information about the reviews
mailing list