From patchwork Fri May 29 14:14:20 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: 49219 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AE018218E7 for ; Fri, 29 May 2015 14:14:42 +0000 (UTC) Received: by wifq9 with SMTP id q9sf6724475wif.3 for ; Fri, 29 May 2015 07:14:42 -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:references:from:to:in-reply-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=uzneT+MaEFL1bRHUKC+2Hd383N2q6C0e7niTf1CmneI=; b=RKSr9qHvBYhrsYMgQ0ZXeVNrSpIfIejvhqEhN3ZnSREjdBFSdnxp3X6SMmjBPvW/ba kkEzyPfxGskI4sgNOYdWKbbWhYO7qKT62S1x3pUPy3spxGTgzBIg7OaV7XSVfOz6AISP ruaQXtC3wDI1cOg6lFNMC2uHwh0TqI23+pvadEFFPPGsSDheHTUY94p6sz1/UEA8JB9k UUqRDisYdJ0FtqWfdIicMmwbcuErutT1nRkbUn02F55nvP/cYzkgRsZFmXNG46TZQ9tK HwatXqikBvSpcqgdepDdVLYF9pnkH9I9PGJfZ2cIeMFf/46uTGQvjlt8bmNBTJNPCBgm rcrw== X-Gm-Message-State: ALoCoQnoSXk62VuE40TuEE2V8GvbzCo4x7tdp88CYPCH86IOu/Q1EPaZZVAc1HorWDdSWW/qcRTG X-Received: by 10.112.166.137 with SMTP id zg9mr7554190lbb.11.1432908881995; Fri, 29 May 2015 07:14:41 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.246.35 with SMTP id xt3ls323417lac.37.gmail; Fri, 29 May 2015 07:14:41 -0700 (PDT) X-Received: by 10.112.72.132 with SMTP id d4mr8162504lbv.1.1432908881846; Fri, 29 May 2015 07:14:41 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id wr10si4808015lbb.20.2015.05.29.07.14.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 May 2015 07:14:41 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbcue7 with SMTP id ue7so49351270lbc.0 for ; Fri, 29 May 2015 07:14:41 -0700 (PDT) X-Received: by 10.152.206.75 with SMTP id lm11mr8001421lac.41.1432908881410; Fri, 29 May 2015 07:14:41 -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 hn6csp368535lbb; Fri, 29 May 2015 07:14:40 -0700 (PDT) X-Received: by 10.140.238.87 with SMTP id j84mr9979205qhc.29.1432908879986; Fri, 29 May 2015 07:14:39 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y12si5729340qky.16.2015.05.29.07.14.39 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 29 May 2015 07:14:39 -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]:36293 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyL3W-0005OJ-Pz for patch@linaro.org; Fri, 29 May 2015 10:14:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyL38-00052W-Ue for qemu-devel@nongnu.org; Fri, 29 May 2015 10:14:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyL35-0004gf-MD for qemu-devel@nongnu.org; Fri, 29 May 2015 10:14:14 -0400 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:35386 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyL35-0004gS-Gr; Fri, 29 May 2015 10:14:11 -0400 Received: from localhost ([127.0.0.1] helo=zen.linaro.local) by socrates.bennee.com with esmtp (Exim 4.80) (envelope-from ) id 1YyMNP-0005Rc-0N; Fri, 29 May 2015 17:39:15 +0200 References: <1432897012-1423-1-git-send-email-alex.bennee@linaro.org> <55684995.3070205@redhat.com> From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Paolo Bonzini In-reply-to: <55684995.3070205@redhat.com> Date: Fri, 29 May 2015 15:14:20 +0100 Message-ID: <877frrii83.fsf@linaro.org> 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: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Subject: Re: [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.217.172 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 Paolo Bonzini writes: > On 29/05/2015 12:56, Alex Bennée wrote: >> 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 >> >> ########################################## >> > > Why aren't EXTRA_CFLAGS applied _after_ CFLAGS instead of before? You mean just do: > > Paolo I guess at the time I was trying to be clean and avoiding multiple -O calls. But I guess that will have the same effect. diff --git a/configure b/configure index b707429..f13831a 100755 --- a/configure +++ b/configure @@ -353,7 +353,7 @@ for opt do ;; --cpu=*) cpu="$optarg" ;; - --extra-cflags=*) QEMU_CFLAGS="$optarg $QEMU_CFLAGS" + --extra-cflags=*) QEMU_CFLAGS="$QEMU_CFLAGS $optarg" EXTRA_CFLAGS="$optarg" ;; --extra-ldflags=*) LDFLAGS="$optarg $LDFLAGS"