amd64: -O2 even with DEBUG

Andriy Gapon avg at FreeBSD.org
Fri Jul 26 08:28:35 UTC 2013


on 26/07/2013 10:51 Warner Losh said the following:
> 
> On Jul 26, 2013, at 12:14 AM, Andriy Gapon wrote:
>> I wonder why amd64 is distinguished to have -O2 in COPTFLAGS even when DEBUG is
>> defined.  For all other archs it's -O for that case.
>>
>> Perhaps, this was discussed / explained in the past, but I would appreciate it
>> being said again (or even written as a comment in kern.pre.mk).
> 
> I think you may have it wrong. Everybody gets -O2, except arm and mips which get -O for dodgy historical reasons...  At least for userland...  But I don't think that's what you are talking about.

Yes, I was talking about the kernel build.

> For the kernel, we get everybody having -O2, except powerpc (and except DEBUG).

I was talking about the DEBUG case specifically.

> Looking at the code for the latter, it sure looks to me to be a mistake. We should be setting _MINUS_O ala the powerpc case. And the -frename-registers looks misplaced to me as well...

Yes, that is exactly what concerned me.

-- 
Andriy Gapon


More information about the freebsd-arch mailing list