Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Jan 2006 13:13:45 +1100
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        freebsd-stable@freebsd.org
Subject:   CFLAGS vs COPTFLAGS for building kernel modules
Message-ID:  <20060120021345.GG25397@cirb503493.alcatel.com.au>

next in thread | raw e-mail | index | archive | help
/usr/share/examples/etc/make.conf v1.265.2.1 states:

# 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

Unfortunately, it seems that kernel modules are build with CFLAGS
rather than COPTFLAGS.  This is somewhat embarrassing when CFLAGS
includes options that don't work in the kernel but aren't explicitly
disabled (eg -msse3).  My make-foo isn't up to quickly isolating the
problem.

-- 
Peter Jeremy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060120021345.GG25397>