From owner-freebsd-arch@FreeBSD.ORG Fri Jul 26 08:28:35 2013 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 03D8D812 for ; Fri, 26 Jul 2013 08:28:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4B1A42C14 for ; Fri, 26 Jul 2013 08:28:33 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA22689; Fri, 26 Jul 2013 11:28:31 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1V2dO3-000HeM-6w; Fri, 26 Jul 2013 11:28:31 +0300 Message-ID: <51F232DE.5090707@FreeBSD.org> Date: Fri, 26 Jul 2013 11:27:10 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130708 Thunderbird/17.0.7 MIME-Version: 1.0 To: Warner Losh Subject: Re: amd64: -O2 even with DEBUG References: <51F221D4.8040308@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jul 2013 08:28:35 -0000 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