From patchwork Tue Mar 8 02:23:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 8528661 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 69ABAC0554 for ; Tue, 8 Mar 2016 02:26:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9CF0F201C0 for ; Tue, 8 Mar 2016 02:26:56 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AC61020155 for ; Tue, 8 Mar 2016 02:26:55 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1ad7JX-0006gz-Lb; Tue, 08 Mar 2016 02:23:59 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1ad7JV-0006gg-UG for xen-devel@lists.xen.org; Tue, 08 Mar 2016 02:23:58 +0000 Received: from [85.158.137.68] by server-8.bemta-3.messagelabs.com id 56/EA-04050-DB73ED65; Tue, 08 Mar 2016 02:23:57 +0000 X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-3.tower-31.messagelabs.com!1457403835!27556544!1 X-Originating-IP: [209.85.161.194] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 61347 invoked from network); 8 Mar 2016 02:23:56 -0000 Received: from mail-yw0-f194.google.com (HELO mail-yw0-f194.google.com) (209.85.161.194) by server-3.tower-31.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 8 Mar 2016 02:23:56 -0000 Received: by mail-yw0-f194.google.com with SMTP id p65so112084ywb.3 for ; Mon, 07 Mar 2016 18:23:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cardoe.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=y+xNKO5uQt60wR8F2J8Mx2TJnea1hlzaVE5EPQpf3bQ=; b=JmT0GX3MKEt3dAyLn3IatrNMMBdcjQUenC8JAN9R9Z2UtHwAGzQ6C8B+DWp/p657Gm JQ1nfHNiL+/2QhceSHO+2BiajLEVUq3g4TF5lL21KewPF3rZjkR8r2pYiYJSn7sPesEn 4kcb66+ukwmXGs3/yQzb9GOJybHtnVCsYIFQE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=y+xNKO5uQt60wR8F2J8Mx2TJnea1hlzaVE5EPQpf3bQ=; b=ACSx4U7RHCf6tqNGIEXvFaUa8X0mu/WyIJISfe2M3TSdTm1rqZp6yCuKJc7VvouB7I ABG10pS2eHrxY87VPrbHbM13S8tCEShQ7M4WgEw6LDAve+6lTsLvEkmlEh3cwFW80Qbz ahj6VYhqwaArHwu8ZwymGTbWxB8MZTNW5BTI36TojuC7KxBwC4nQIhDVSZ8xITLPZqKZ NI2VBukFDZ6BZZsXM6UC9lYrSEnrkCBXQC9mxrTk6Q1OyZxnFevr0m8hR4kk7O62RofT fjP0+XoU6yilNBaBbBwfYOp4u+0y2Fh3Tl+STxbFLQTM+u8GUuYG9NKR1QyfoV/SNqOC uWxA== X-Gm-Message-State: AD7BkJJ8tj9ZW/+bh/bcW+3L8Dl8tH9aYK0sgXndvhE3rEgC2v9GgjUJmmt8oqq28EOleg== X-Received: by 10.129.88.136 with SMTP id m130mr13473688ywb.81.1457403835431; Mon, 07 Mar 2016 18:23:55 -0800 (PST) Received: from swanson.lan (c-68-46-196-185.hsd1.al.comcast.net. [68.46.196.185]) by smtp.gmail.com with ESMTPSA id x129sm429092ywd.19.2016.03.07.18.23.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 07 Mar 2016 18:23:54 -0800 (PST) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Mon, 7 Mar 2016 20:23:40 -0600 Message-Id: <1457403820-2949-2-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.4.10 In-Reply-To: <1457403820-2949-1-git-send-email-cardoe@cardoe.com> References: <1457403820-2949-1-git-send-email-cardoe@cardoe.com> Cc: Ian Jackson , Doug Goldstein , Wei Liu , Stefano Stabellini Subject: [Xen-devel] [PATCH 2/2] tools: detect appropriate debug optimization level X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_BL_SPAMCOP_NET, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The build should not use -O0 as that results in miscompilations. There have been a few instances on the ML where users were told to switch from -O0 to -O1 or -O2 or to set debug=n and their issue went away. The preferred route should be to use -Og if its available, otherwise use -O1 which is the default. This change undoes the change from -O1 to -O0 in 1166ecf781b1016eaa61f8d5ba4fb1fde9d599b6. Signed-off-by: Doug Goldstein --- CC: Ian Jackson CC: Stefano Stabellini CC: Wei Liu --- tools/Rules.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/Rules.mk b/tools/Rules.mk index 9ef0b47..ae6b01f 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -137,7 +137,8 @@ SHLIB_libxenvchan = $(SHDEPS_libxenvchan) -Wl,-rpath-link=$(XEN_LIBVCHAN) ifeq ($(debug),y) # Disable optimizations and enable debugging information for macros -CFLAGS += -O0 -g3 +$(call cc-option-add,CFLAGS,CC,-Og) +CFLAGS += -g3 # But allow an override to -O0 in case Python enforces -D_FORTIFY_SOURCE=. PY_CFLAGS += $(PY_NOOPT_CFLAGS) endif