Bug 193768 - src.conf/make.conf: CFLAGS/COPTFLAGS inconsistency
Summary: src.conf/make.conf: CFLAGS/COPTFLAGS inconsistency
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-19 12:59 UTC by O. Hartmann
Modified: 2015-11-10 12:59 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2014-09-19 12:59:33 UTC
man make.conf states, that COPTFLAGS is used for building/compiling the kernel
(exclusively). The question arises: are kernel modules NOT kernel or are they kernel?

The problem I face is that with optimization level -O3 loader.efi gets miscompiled and a
UEFI laptop stops/reject booting. To avoid other interference, I defined COPTFLAGS
in /etc/src.conf accordingly, but leave CFLAGS?=-O3 in /etc/make.conf for compilation of
regular ports and the rest of the OS.

I can observe that with CFLAGS set, either in make.conf, or src.conf or mutual exclusive,
the CFLAGS is ALWAYS incorporated when kernel stuff like modules and even the loader.efi
is built! I consider this inconsitent, since loader.efi is definitely kernel related
stuff as well as modules.