Date: Mon, 18 Dec 2006 20:02:02 -0600 From: "Scot Hetzel" <swhetzel@gmail.com> To: "Ed Schouten" <ed@fxq.nl> Cc: ports@freebsd.org Subject: Re: How to properly check for GCC 4.1 in port Message-ID: <790a9fff0612181802t13b078f3g380df4e81fada2a2@mail.gmail.com> In-Reply-To: <20061218212213.GU1072@hoeg.nl> References: <20061218212213.GU1072@hoeg.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On 12/18/06, Ed Schouten <ed@fxq.nl> wrote: > Hello, > > I'm the maintainer for the net/totd port. This port doesn't compile with > GCC 4.1. The easiest fix is to add -Wno-pointer-sign to the CFLAGS. GCC > 3.4 doesn't allow this option. What's the nicest way to add a > conditional to the port Makefile to check for a GCC version? > One way to do it would be to add the following to the port: .if ${_GCCVERSION} >= 040100 CFLAGS+= -Wno-pointer-sign .endif After the ".include <bsd.port.mk>" or ".include <bsd.port.post.mk>". It doesn't work before the bsd.port.mk, or after the bsd.port.pre.mk. You may want to ask the port managers to move USE_GCC into the _PREMKINCLUDED section of bsd.ports.mk. Scot -- DISCLAIMER: No electrons were mamed while sending this message. Only slghtly bruised.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?790a9fff0612181802t13b078f3g380df4e81fada2a2>