From owner-freebsd-ports@FreeBSD.ORG Sat Oct 5 13:18:09 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 5B8D82E5 for ; Sat, 5 Oct 2013 13:18:09 +0000 (UTC) (envelope-from baptiste.daroussin@gmail.com) Received: from mail-wi0-x22d.google.com (mail-wi0-x22d.google.com [IPv6:2a00:1450:400c:c05::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E84032FA1 for ; Sat, 5 Oct 2013 13:18:08 +0000 (UTC) Received: by mail-wi0-f173.google.com with SMTP id hq15so2899365wib.0 for ; Sat, 05 Oct 2013 06:18:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=qbvoy8P1RzT5FLLs/uNhfL/KsqAfVsDywxSj+gLK4PU=; b=MSI5LI9kXFmm48JoAV2GRKOC2fY1D/tm3YmakkIp/EMiC3eC3+s5B8flInVbGKzzpw afxpB9JgoQ7BwcYFFf5jpzghy9jv89amcv2OErcT+Em+kzfQeI7ACcSavC7wilOCCWcc SlHMKfQsP0nWVmLclfDC5Te95XyXF6pIdosnzvfGjc6g9Vjr86N32qq2bJV4O8ZE9TOW lv919x0a9U2T/ThPf8UbSkeJVnORvPrzERLqslTTXWUD0wVrT71+s3JimTFvH93JNETl zclpEYO7Ay5zpos+R3kJlf6EY6Uy7TJf7ijiWKeB8yscSbJp66wiLUROAqGoS9v6FyUY RhaQ== X-Received: by 10.194.202.230 with SMTP id kl6mr17195789wjc.9.1380979086503; Sat, 05 Oct 2013 06:18:06 -0700 (PDT) Received: from ithaqua.etoilebsd.net (ithaqua.etoilebsd.net. [37.59.37.188]) by mx.google.com with ESMTPSA id i8sm19796280wiy.6.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 05 Oct 2013 06:18:05 -0700 (PDT) Sender: Baptiste Daroussin Date: Sat, 5 Oct 2013 15:18:03 +0200 From: Baptiste Daroussin To: Andras Horvath Subject: Re: ports / Makefile / check if default compiler is GCC and version is 4.2+ Message-ID: <20131005131803.GB77704@ithaqua.etoilebsd.net> References: <20131005144427.5e3aeb92@notebook.dell> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="St7VIuEGZ6dlpu13" Content-Disposition: inline In-Reply-To: <20131005144427.5e3aeb92@notebook.dell> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Oct 2013 13:18:09 -0000 --St7VIuEGZ6dlpu13 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 05, 2013 at 02:44:27PM +0200, Andras Horvath wrote: > Dear Members, >=20 > I'd like to ask your help. I'm a developer and maintainer of a port and I= intend to give different compile options for different compilers when buil= ding my software. I'm using the OpenMP feature of GCC that is available fro= m GCC version 4.2 and above. >=20 > I would like to know how I could determine in my Makefile whether the def= ault compiler is GCC and it's version is >=3D 4.2 ? >=20 > I'd like to go with the preffered standard way. >=20 > Does it make any sense to try to support GCC version lower than 4.2? If n= ot, I reckon it would be enough for me to check against GCC only without it= s version. If so, then would this be enough? : >=20 > .if ${CC} =3D=3D "gcc" >=20 >=20 It doesn't make sense, $[CC} =3D=3D "gcc" is not enough at all for that, if= you Some patches allowing to better play with different compilers is coming. regards, Bapt --St7VIuEGZ6dlpu13 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlJQEYsACgkQ8kTtMUmk6Ewm3wCffiOIWHSvS0AF6YDWJvPYzRNr VQAAoKE0BuB0iyyeXkQGl0TiU5R+YMKw =u4p/ -----END PGP SIGNATURE----- --St7VIuEGZ6dlpu13--