best way to handle GCC version detection

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


On 27 Jun 2017, at 17:39, Aryeh Friedman <aryeh.friedman at gmail.com> 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
   ...foo...
#else
   ...bar...
#endif

could maybe work?

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20170627/718ef93f/attachment.sig>


More information about the freebsd-ports mailing list