best way to handle GCC version detection

Dimitry Andric dim at
Tue Jun 27 16:12:00 UTC 2017

On 27 Jun 2017, at 17:39, Aryeh Friedman <aryeh.friedman at> wrote:
> I have port I maintain that compiles fine under GCC 5 (or lower) but barfs
> on GCC 6.   A small modification will make it compile under 6 but the very
> same modification makes it incompatible with 5.   What is the best way to
> handle this and still allow USE_GCC=any ?

Something like:

#if __GNUC__ <= 5

could maybe work?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP
URL: <>

More information about the freebsd-ports mailing list