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

next in thread | previous in thread | raw e-mail | index | archive | help

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.
>=20
> 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.

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

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...

Warner




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FEC550E9-75BB-4D7F-8833-8D98FB9BE976>