example COPTFLAGS

1 view
Skip to first unread message

Jan Stary

unread,
Jun 9, 2026, 6:21:45 AMJun 9
to freebsd-...@freebsd.org
This is wht the exampla make.conf says about COPTFLAGS
on my freshly installed 15.0-RELEASE:

# To compile just the kernel with special optimizations, you should use
# this instead of CFLAGS (which is not applicable to kernel builds anyway).
# There is very little to gain by using higher optimization levels, and doing
# so can cause problems.
#
#COPTFLAGS= -O -pipe

But leaving everything at default apparently uses -O2 -pipe
for the kernel build? Is the comment out of date then?

Jan


Dag-Erling Smørgrav

unread,
Jun 9, 2026, 7:10:16 AMJun 9
to Jan Stary, freebsd-...@freebsd.org
The example is outdated.

COPTFLAGS is used for the kernel. Everything else, including kernel
modules, uses CFLAGS.

DES
--
Dag-Erling Smørgrav - d...@FreeBSD.org

Reply all
Reply to author
Forward
0 new messages