[rfc] a few kern.mk and bsd.sys.mk related changes

Pan Tsu inyaoo at gmail.com
Sat May 28 16:08:16 UTC 2011


Alexander Best <arundel at freebsd.org> writes:

> On Fri May 27 11, Alexander Best wrote:
>> On Fri May 27 11, Warner Losh wrote:
>> > These look generally good.  Just one thing I had a question on:
>> > 
>> >  #
>> > +# Enable FreeBSD kernel-specific printf format specifiers. Also instruct gcc to
>> > +# enable some diagnostics, which make it easier to pinpoint tinderbox failures.
>> > +CFLAGS+=	-fformat-extensions -fdiagnostics-show-option
>> > +
>> > 
>> > Does this put sand in the gears of clang support?
>
> i've improved the above comment so as to note that clang won't be affected by
> -fdiagnostics-show-option. the new patch is available here:
>
> http://people.freebsd.org/~arundel/patches/kern.mk-bsy.sys.mk.patch
>
> another "issue" i've come across is the fact that on amd64, -O2 is always being
> set, no matter, if debugging is enabled or disabled. i think amd64 should also
> (just like all the other archs) be using -O, when debugging was enabled.

Any reason a kernel with symbols (DEBUG) *must* be pessimized to -O1 level?
Looking at r140606 it's not clear how symbols are related to a bump
from -O1 to -O2 for non-amd64 archs. And -RELEASE kernels since at least
6.0R have `makeoptions DEBUG=-g' uncommented in GENERIC.

> changing this is quite easy. so if people think this is something worth
> changing i can integrate it into my existing patch.


More information about the freebsd-toolchain mailing list