Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jul 2013 11:27:10 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        freebsd-arch@FreeBSD.org
Subject:   Re: amd64: -O2 even with DEBUG
Message-ID:  <51F232DE.5090707@FreeBSD.org>
In-Reply-To: <FEC550E9-75BB-4D7F-8833-8D98FB9BE976@bsdimp.com>
References:  <51F221D4.8040308@FreeBSD.org> <FEC550E9-75BB-4D7F-8833-8D98FB9BE976@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51F232DE.5090707>