Subject: Re: C compiler flags
To: Ricardo Cervera Navarro <>
From: Matthias Scheler <>
List: pkgsrc-users
Date: 11/19/2006 18:53:36
On Tue, Nov 14, 2006 at 12:08:49AM +0100, Ricardo Cervera Navarro wrote:
> I am using:
> CFLAGS+=-O2 -march=athlon
> in my /etc/mk.conf.

I'm sorry but that is wrong.

1.) Please do *not* modify "CFLAGS" in "/etc/mk.conf". You will cause
    various build failures.
2.) Please do *not* try to enforce using "-O2". There are packages which
    build without optimization by purpose. It is default under NetBSD for
    all the packages where this optimization level is known to work

The correct setting is:

COPTS=	-march=athlon

Or you could use the "cpuflags" package.

	Kind regards

Matthias Scheler