Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Jun 2017 18:11:49 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Aryeh Friedman <aryeh.friedman@gmail.com>
Cc:        FreeBSD Ports ML <freebsd-ports@freebsd.org>
Subject:   Re: best way to handle GCC version detection
Message-ID:  <507D01C5-ADE6-4078-A985-954598C0F363@FreeBSD.org>
In-Reply-To: <CAGBxaXnMReeW=-76W13dgMJ9gQCx7pr4Qi%2BxKEsQbsOgp75g=g@mail.gmail.com>
References:  <CAGBxaXnMReeW=-76W13dgMJ9gQCx7pr4Qi%2BxKEsQbsOgp75g=g@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_B71976AC-EBD7-4126-9A27-6D42225A029A
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii

On 27 Jun 2017, at 17:39, Aryeh Friedman <aryeh.friedman@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


--Apple-Mail=_B71976AC-EBD7-4126-9A27-6D42225A029A
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.30

iEYEARECAAYFAllSg8wACgkQsF6jCi4glqOEZACg097l+F64vVRb+2mBMhqplT56
0eQAn02R+eOfFkyMmhLVH6bfL20NHBay
=3DB8
-----END PGP SIGNATURE-----

--Apple-Mail=_B71976AC-EBD7-4126-9A27-6D42225A029A--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?507D01C5-ADE6-4078-A985-954598C0F363>