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: 477800 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D677C140E6C for ; Fri, 29 May 2015 21:01:19 +1000 (AEST) Received: from localhost ([::1]:35040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyI2P-0001hL-Ra for incoming@patchwork.ozlabs.org; Fri, 29 May 2015 07:01:17 -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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 ##########################################