COPTFLAGS (not?) only for compiling the kernel?

Giorgos Keramidas keramida at ceid.upatras.gr
Fri May 14 11:50:48 PDT 2004


On 2004-05-13 23:29, platanthera <platanthera at web.de> wrote:
> [/etc/make.conf]
> ...
> # 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= [whatever]
> ...
>
> just the kernel... sounds like COPTFLAGS setting should not effect world or
> port builds, but apparently it does.
> Or do I misunderstand something?

Yes, you do.  But I'm sure that you will find the make.conf(5) manpage
very informative and useful.  Especially the following parts:

|     The following list provides a name and short description for variables
|     that are used for all builds, or are used by the makefiles for things
|     other than builds. [...]
|
|     CFLAGS        (str) Controls the compiler setting when compiling C code.
|                   Optimization levels above -O (-O2, ...) are not supported.
|
|     [...]
|
|     The following list provides a name and short description for variables
|     that are only used doing a kernel build: [...]
|
|     COPTFLAGS     (str) Controls the compiler settings when building the ker-
|                   nel.  Optimization levels above [-O (-O2, ...)] are not

I hope this helps a bit.

- Giorgos



More information about the freebsd-questions mailing list