From owner-freebsd-ports@freebsd.org Tue Jun 27 16:12:00 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA3F6D8912B for ; Tue, 27 Jun 2017 16:12:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 90D51703C2 for ; Tue, 27 Jun 2017 16:12:00 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from [IPv6:2001:470:7a58::6d32:3606:9326:9078] (unknown [IPv6:2001:470:7a58:0:6d32:3606:9326:9078]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 03054325C7; Tue, 27 Jun 2017 18:11:56 +0200 (CEST) From: Dimitry Andric Message-Id: <507D01C5-ADE6-4078-A985-954598C0F363@FreeBSD.org> Content-Type: multipart/signed; boundary="Apple-Mail=_B71976AC-EBD7-4126-9A27-6D42225A029A"; protocol="application/pgp-signature"; micalg=pgp-sha1 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: best way to handle GCC version detection Date: Tue, 27 Jun 2017 18:11:49 +0200 In-Reply-To: Cc: FreeBSD Ports ML To: Aryeh Friedman References: X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 16:12:00 -0000 --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 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--