Date: Fri, 19 Sep 2014 10:56:50 -0400 (EDT) From: Benjamin Kaduk <kaduk@MIT.EDU> To: "O. Hartmann" <ohartman@zedat.fu-berlin.de> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org> Subject: Re: src.conf: CFLAGS/COPTFLAGS inconsistency Message-ID: <alpine.GSO.1.10.1409191052580.21571@multics.mit.edu> In-Reply-To: <20140919150029.1f27e490.ohartman@zedat.fu-berlin.de> References: <20140919150029.1f27e490.ohartman@zedat.fu-berlin.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 19 Sep 2014, O. Hartmann wrote:
> 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.
Sorry, I don't think I understand what you're trying to say in these two
pragraphs. What does "defined COPTFLAGS in /etc/src.conf accordingly"
mean?
Likewise, what does " CFLAGS set, either in make.conf, or src.conf or
mutual exclusive" mean?
It may be best to give concrete examples of make.conf/src.conf settings
pairs, and the observed behavior.
> It seems to me that it s not possible to separate cleanly CFLAGS and COPTFLAGS for
> userland/ports and kernel-only related compilations as described in the man page.
BTW,
COPTFLAGS (str) Controls the compiler settings when building the ker-
nel. Optimization levels above [-O (-O2, ...)] are not
guaranteed to work.
Note the last sentence.
-Ben
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.GSO.1.10.1409191052580.21571>
