Subject: Re: port-specific CFLAG
To: Joachim Kuebart <kuebart@mathematik.uni-ulm.de>
From: Dan McMahill <dmcmahill@netbsd.org>
List: tech-pkg
Date: 05/28/2004 20:11:00
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

pkgsrc/doc/HACKS lists more examples.

-Dan

--