Subject: Re: pkg/31092: Python-2.3.5 Solaris
To: None <gnats-bugs@netbsd.org>
From: grant beattie <grant@NetBSD.org>
List: pkgsrc-bugs
Date: 09/01/2005 10:06:30
On Wed, Aug 31, 2005 at 01:37:02PM +0000, Gilles Dauphin wrote:

>  You are true :) Solaris and gcc specific.
>  The patch may be :
>  
>  +.if ${OPSYS} == "SunOS" && ${CC} == "gcc" 
>  +#workaround for bug with Solaris/gcc : __builtin_huge_val is a func. in that 
>  case, but  not declare as in Solaris header.
>  +CONFIGURE_ARGS+=       OPT="${CFLAGS} -D\"Py_HUGE_VAL=__builtin_huge_val()\""
>  +.else
>   CONFIGURE_ARGS+=       OPT="${CFLAGS}"
>  +.endif
>  
>  
>  Is my fix valid ?

yes, something like that. for brevity it can be written as:

.include "../../mk/compiler.mk"

.if !empty(CC_VERSION:Mgcc*)
CFLAGS.SunOS+=		-D\"Py_HUGE_VAL=__builtin_huge_val()\"
.endif