Subject: mk.conf & compiler flags
To: None <>
From: Dunric <>
List: netbsd-users
Date: 02/03/2005 02:18:50
It had to be zillion-times asked but no reliable information in NetBSD guide even in mailing lists found :(
Are there some rules how C/C++ compiler flags has to be properly set in /etc/mk.conf ?
NetBSD's kernel + userland are using COPTS, both CFLAGS and CXXFLAGS applies too. NetBSD's X11 on the other hand ignores COPTS completely - a bit confusing.
Pkgsrc ports are ignoring COPTS too, again CFLAGS & CXXFLAGS are used. There is another problem, because some ports define in CFLAGS some important options(defines,paths) without them compilation fails so I cann't replace it with my own :( When I add my options(+=), some builds are compiled in some cases with wild collision flags like "-mcpu=i386" ...
I just wish to rebuild whole system including packages with "-O2 -pipe -march=pentium3" in proper way.

Besides I still found NetBSD to be an _incredible good_ system, best I've ever met and used (Linux 4 years, FreeBSD 3/4 of year).