Subject: Re: LC040 mk.conf tuning
To: Joshua Coombs <jcoombs@gwi.net>
From: Frederick Bruckman <fredb@immanent.net>
List: port-mac68k
Date: 07/07/2003 10:42:48
On Mon, 7 Jul 2003, Joshua Coombs wrote:

> > The preferred way is to set COPTS, not CFLAGS. The COPTS will be added
> > to the CFLAGS. On current, you can put -msoft-float in CPUFLAGS, which
> > will be added as well.
>
> Hrmmm... using COPTS+=-msoft-float, I don't see it showing up durring pkg
> builds...  mayhaps I need both?

No, not for packages. I thought you were building NetBSD.

Setting CFLAGS and CXXFLAGS in the environment is your best bet for
packages, and even then they're not obeyed consistently. You often
have to look inside the package's makefiles to see if there's a
variable that's added to the compile flags, but not set to anything
significant, so then you can pass it in on make's command line. For
example, for packages that use "imake", you can do...,

  make CCOPTIONS="${CFLAGS}"

assuming CFLAGS is already set in the environment. That works for
NetBSD xsrc, too. Other possibilites are EXTRACFLAGS, OPTIMIZE,
DEBUGCFLAGS.  (You don't ever want to set CFLAGS itself that way,
because you'd likely end up overriding something you need to build
properly. Remember, setting a variable on make's command line
overrides any and all settings in the makefiles.)

I'be been kicking around the idea of adding proper support for
CPUFLAGS to pkgsrc, including renaming the resulting tarballs.
I guess we should probably set CCOPTIONS for imake packages, too.

Frederick