From patchwork Sat Oct 27 21:19:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 12553 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2482A23F9B for ; Sat, 27 Oct 2012 21:19:13 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id C12F6A186DE for ; Sat, 27 Oct 2012 21:19:12 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so4957326iej.11 for ; Sat, 27 Oct 2012 14:19:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-gm-message-state; bh=3oWa1LxR8KJodvx5ArZ8mdBuCdmzxCADNYlJYOFaUeU=; b=dfoqkLqUKBkqNISNYdfpPR2q6ZtEZ9rm1QQ4rtU9oJh9uKT7IzYeetP4eYam/okerT U0emG8ij6PEAg8gnElucakxUWKF7pCQhQ0kJ35suEopTjoe/lXbRl8jKxxfc3h30k3Mf pIoUmsh9c49DT3JvKYIMl1++rHGtNVVRPTWTMXehgaHmaC8mRfrzcblnz2HD4qGN+P+H 6uYSxQu0pHfmNKu4kPooRw6XCDywfF9tukacxhUNQNKzzqnn9VEwRruQK1X+ahljrHEa 9aYVsyKDdVRcEiC5aeR15pb0dIigOgiY2kPADFO6X31jP6xk8plfhgYzvF1lavkHbVwz jwEw== Received: by 10.50.45.233 with SMTP id q9mr1200008igm.70.1351372752195; Sat, 27 Oct 2012 14:19:12 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp465739igt; Sat, 27 Oct 2012 14:19:11 -0700 (PDT) Received: by 10.216.131.161 with SMTP id m33mr14773560wei.13.1351372750979; Sat, 27 Oct 2012 14:19:10 -0700 (PDT) Received: from mnementh.archaic.org.uk (1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.d.1.0.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id x83si3197216wei.110.2012.10.27.14.19.10 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 27 Oct 2012 14:19:10 -0700 (PDT) Received-SPF: neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) client-ip=2001:8b0:1d0::1; Authentication-Results: mx.google.com; spf=neutral (google.com: 2001:8b0:1d0::1 is neither permitted nor denied by best guess record for domain of pm215@archaic.org.uk) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1TSDme-0004AN-0T; Sat, 27 Oct 2012 22:19:08 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Igor Mitsyanko , Blue Swirl , Stefan Weil Subject: [PATCH] configure: use -Wwombat to test whether gcc recognizes -Wno-wombat Date: Sat, 27 Oct 2012 22:19:07 +0100 Message-Id: <1351372747-15992-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-Gm-Message-State: ALoCoQlJuec9xpAASjNI4HA+ujRmdurw5CiwL39B8NDcjyPzMFLB2j4hpuphezfk6z0rlZMtOpcw gcc will silently accept unrecognized -Wno-wombat warning suppression options (it only mentions them if it has to print a compiler warning for some other reason). Since we already run a check for whether gcc recognizes the warning options we use, we can easily make this use the positive sense of the option when checking for support for the suppression option. This doesn't have any effect except that it avoids gcc emitting extra messages about unrecognized command line options when it is printing other warning messages. Signed-off-by: Peter Maydell Reviewed-by: Igor Mitsyanko --- configure | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 37f712d..4c2ba06 100755 --- a/configure +++ b/configure @@ -1169,7 +1169,11 @@ cat > $TMPC << EOF int main(void) { return 0; } EOF for flag in $gcc_flags; do - if compile_prog "-Werror $flag" "" ; then + # Use the positive sense of the flag when testing for -Wno-wombat + # support (gcc will happily accept the -Wno- form of unknown + # warning options). + optflag="$(echo $flag | sed -e 's/^-Wno-/-W/')" + if compile_prog "-Werror $optflag" "" ; then QEMU_CFLAGS="$QEMU_CFLAGS $flag" fi done