From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1xKF-0001y5-Jn for qemu-devel@nongnu.org; Fri, 09 Sep 2011 05:24:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1xK4-0005UW-NL for qemu-devel@nongnu.org; Fri, 09 Sep 2011 05:24:38 -0400 Received: from mtagate3.uk.ibm.com ([194.196.100.163]:59145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1xK4-0005SL-9I for qemu-devel@nongnu.org; Fri, 09 Sep 2011 05:24:32 -0400 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate3.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p899OKMU025968 for ; Fri, 9 Sep 2011 09:24:20 GMT Received: from d06av11.portsmouth.uk.ibm.com (d06av11.portsmouth.uk.ibm.com [9.149.37.252]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p899OJIG2302012 for ; Fri, 9 Sep 2011 10:24:20 +0100 Received: from d06av11.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av11.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p899OJIO004936 for ; Fri, 9 Sep 2011 03:24:19 -0600 From: Stefan Hajnoczi Date: Fri, 9 Sep 2011 10:24:12 +0100 Message-Id: <1315560255-25009-6-git-send-email-stefanha@linux.vnet.ibm.com> In-Reply-To: <1315560255-25009-1-git-send-email-stefanha@linux.vnet.ibm.com> References: <1315560255-25009-1-git-send-email-stefanha@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 5/8] configure: Avoid duplicate flags when calling compile_prog List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Stefan Hajnoczi From: Stefan Weil This patch removes redundant shell code and cleans it a little bit. Shell macro compile_prog takes two arguments: local_cflags and local ldflags. $QEMU_CFLAGS is added automatically to the cflags, so there is no need to pass it as an argument. It is also unnecessary to pass -Werror twice. $flag is a compiler warning option, so it should be in local_cflags instead of local_ldflags. Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi --- configure | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/configure b/configure index f808f48..348f36a 100755 --- a/configure +++ b/configure @@ -1070,7 +1070,7 @@ cat > $TMPC << EOF int main(void) { return 0; } EOF for flag in $gcc_flags; do - if compile_prog "-Werror $QEMU_CFLAGS" "-Werror $flag" ; then + if compile_prog "$flag -Werror" "" ; then QEMU_CFLAGS="$QEMU_CFLAGS $flag" fi done -- 1.7.5.4