From patchwork Fri May 29 10:56:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 49160 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2F509218E7 for ; Fri, 29 May 2015 11:01:39 +0000 (UTC) Received: by lani11 with SMTP id i11sf19328436lan.3 for ; Fri, 29 May 2015 04:01:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id :mime-version:content-type:content-transfer-encoding:cc:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=C/Gg2T/O3dC1TAhS795YTDDs9SvP36jl6zMKzgrN/ho=; b=SFYp//yHgXWloaFMfCunYdsfZj/imjdk7pxSlPgFIuoUM/wGAvWZ4G+l3Em3AxAmBd t2a2ANzkeOZIAzn4g9n22EjDpSmGrgUa//yW/5YgrGU1NAQulp+P5vVOVfkDKE3oY5u4 YMXp/21zRfz3US5mWERkl6umVHWr7H4KC3SkcRSgMyVat4VsfpDp+AZi5+yy3l0bphV2 EB7z2mur4/4ESddYgWED3m24MjMrKbalS0sus841V8O+JXMjTMvVsXVsMZoNJ/ZDjcqK dmX+880bct6SBgZc87Vwh21tYb/mA/Rpp/QD+N2UxbBFyq8XUKZY4WcigmXpj3TqYMEN G2HA== X-Gm-Message-State: ALoCoQnwka6hGR3PCEWt8URXgvo7eXIhcb2Tk8/NmJ1kANh5264pVtk3DNRGGoxAfXUek0KXVWAf X-Received: by 10.180.11.101 with SMTP id p5mr2450890wib.3.1432897297894; Fri, 29 May 2015 04:01:37 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.36.227 with SMTP id t3ls329938laj.72.gmail; Fri, 29 May 2015 04:01:37 -0700 (PDT) X-Received: by 10.112.72.132 with SMTP id d4mr7383728lbv.1.1432897297730; Fri, 29 May 2015 04:01:37 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id l1si4375749lbj.175.2015.05.29.04.01.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 04:01:37 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lagv1 with SMTP id v1so52832591lag.3 for ; Fri, 29 May 2015 04:01:37 -0700 (PDT) X-Received: by 10.152.7.7 with SMTP id f7mr7502591laa.106.1432897297647; Fri, 29 May 2015 04:01:37 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp220584lbb; Fri, 29 May 2015 04:01:36 -0700 (PDT) X-Received: by 10.229.119.131 with SMTP id z3mr2101333qcq.17.1432897296416; Fri, 29 May 2015 04:01:36 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id e92si5197481qge.113.2015.05.29.04.01.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 29 May 2015 04:01:36 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:35040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyI2h-0001hL-8x for patch@linaro.org; Fri, 29 May 2015 07:01:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48448) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyHyF-0002Pd-Um for qemu-devel@nongnu.org; Fri, 29 May 2015 06:57:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyHyE-0008Qm-R8 for qemu-devel@nongnu.org; Fri, 29 May 2015 06:56:59 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:34562 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyHy8-0008Ov-MD; Fri, 29 May 2015 06:56:52 -0400 Received: from localhost ([127.0.0.1] helo=zen.linaroharston) by socrates.bennee.com with esmtp (Exim 4.80) (envelope-from ) id 1YyJIQ-0004gr-2D; Fri, 29 May 2015 14:21:54 +0200 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-trivial@nongnu.org Date: Fri, 29 May 2015 11:56:51 +0100 Message-Id: <1432897012-1423-1-git-send-email-alex.bennee@linaro.org> X-Mailer: git-send-email 2.4.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: alex.bennee@linaro.org X-SA-Exim-Scanned: No (on socrates.bennee.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 88.198.71.155 Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] configure: don't apply -O2 if extra-cflags sets -O X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: alex.bennee@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 If your trying to debug and want to force -O0 then don't allow the configure script to try and set -O2. You can use --enable-debug but that enables a lot more stuff by default. Signed-off-by: Alex Bennée --- configure | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index b707429..be1f354 100755 --- a/configure +++ b/configure @@ -4240,7 +4240,10 @@ if test "$gcov" = "yes" ; then CFLAGS="-fprofile-arcs -ftest-coverage -g $CFLAGS" LDFLAGS="-fprofile-arcs -ftest-coverage $LDFLAGS" elif test "$debug" = "no" ; then - CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" + if test "${EXTRA_CFLAGS#*-O}" = "$EXTRA_CFLAGS"; then + CFLAGS="-O2 $CFLAGS" + fi + CFLAGS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" fi ##########################################