How to properly check for GCC 4.1 in port
Scot Hetzel
swhetzel at gmail.com
Mon Dec 18 18:29:04 PST 2006
On 12/18/06, Ed Schouten <ed at 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.
More information about the freebsd-ports
mailing list