From owner-freebsd-arch@FreeBSD.ORG Fri Jul 26 07:51:28 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 9E1C7D6 for ; Fri, 26 Jul 2013 07:51:28 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 75C662A9E for ; Fri, 26 Jul 2013 07:51:28 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id ro12so1618203pbb.41 for ; Fri, 26 Jul 2013 00:51:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=FtWM4z044vQCgKVM6Fn5wdDufyqK8tX7a8ZhCDMtw8o=; b=TtMaUjilwuP8ZXWyaa7/3tg+pcVbNMpWMGOluQdp7gAe/XxpGYp5K/uHgGMo/A+MOU +JvvVlA1vZis3xyjnQUyOgs6T4Dnai5tbb/kqm5jkVzKUqNh0WHZkse9BghE8y4HcSX+ 4/grcyCCLsltoGvjDbG6NXzJ40jR1EYJqKRd7xYUJvyTFPubx3JYI6d8E38e+5ng7A5P 8mZx2HDlenzQ957qlBKHyXZoFPaBBlW4aLPPl4d82OUaJP8MmslzGYpXnsKk4GueJdAz QCymDJbaW+0G8cfEk8nA9cAHbXzE3HC++8AudGx5SVI1TBFrc1takTV+a4F6Mms8u9yF KxPA== X-Received: by 10.66.155.102 with SMTP id vv6mr17925652pab.89.1374825082435; Fri, 26 Jul 2013 00:51:22 -0700 (PDT) Received: from [10.0.0.214] ([65.50.222.210]) by mx.google.com with ESMTPSA id sp4sm58519414pbc.45.2013.07.26.00.51.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Jul 2013 00:51:21 -0700 (PDT) Sender: Warner Losh Subject: Re: amd64: -O2 even with DEBUG Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <51F221D4.8040308@FreeBSD.org> Date: Fri, 26 Jul 2013 00:51:19 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <51F221D4.8040308@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1085) X-Gm-Message-State: ALoCoQknFNhPuzSMMrS5lgVaESeY6iFoHgKzJONXaoExlP2Lx7ztVsvYVotkGcGCezLyZZsGrWnd 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 07:51:28 -0000 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