Subject: Re: port-specific CFLAG
To: Dan McMahill <dmcmahill@netbsd.org>
From: Joachim Kuebart <kuebart@mathematik.uni-ulm.de>
List: tech-pkg
Date: 05/29/2004 10:03:01
On Fri, May 28, 2004 at 08:11:00PM -0400, Dan McMahill wrote:
> On Sat, May 29, 2004 at 12:16:19AM +0200, Joachim Kuebart wrote:
> > Hi all,
> > 
> > I noticed that the freetype2 package dumps core on alpha when used from
> > xpdf and compiled with -O2. With -O1, it works pretty well. Is there any
> > way to record this discovery in the package Makefile for future users?
> > 
> 
> yes.  See, for example, mail/imap-uw/Makefile which has
> 
> # reduce optimization level on alpha to avoid compiler bugs
> .if ${OPSYS} == "NetBSD"
> .  if ${MACHINE_ARCH} == "alpha"
> CPPFLAGS:=      ${CPPFLAGS:C/-O[0-9]*/-O/g}
> CFLAGS:=        ${CFLAGS:C/-O[0-9]*/-O/g}
> CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
> CONFIGURE_ENV+= CFLAGS="${CFLAGS}"
> .  endif
> .endif

Thanks Dan,

I send-pr'd this solution because "editing" compiler flags seems
more appropriate than Jeremy's suggestion that I can only see how
to replace or add compiler flags with and it's currently not
implemented on a port-by-port basis.

On a related question, I pkgview'd several packages and they seem
to be working fine, should I send-pr each one of them or is there
a leaner way of doing this?

> pkgsrc/doc/HACKS lists more examples.

Thanks for pointing this one out! I remember looking at it once but forgot
all about it. ;)

cu Jo

-- 
La perfection est atteinte non quand il ne reste rien à ajouter, mais quand
il ne reste rien à enlever.  (Antoine de Saint-Exupéry)