From patchwork Tue Oct 16 20:20:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 12280 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 D7CE623F6D for ; Tue, 16 Oct 2012 20:20:32 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 4829CA19302 for ; Tue, 16 Oct 2012 20:20:32 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so4770769iag.11 for ; Tue, 16 Oct 2012 13:20:31 -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 :x-virus-scanned:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding:x-gm-message-state; bh=E86N8U/zPYNVqCYNNgzXMgMCtjJk//d2Mh5BSlh30t8=; b=FE9VM3axBN08y07TepBEt/20MddKSMrM/H0ej7lDwRwFEEpnn2Y0Pj3t1qFzvDG1rG CwAUyIp0fjFqZCcmXnzXoFxWTht0ho4kyBZmgHT2MRg4MGtRH8uJ0z7KrTT0boMP+uNT TLmZnwg1csKQ5S/5+j951jjciwYfeAIW0Gx0tSHi3urxOFLBZT/l1qQUCjBxlDDSE31P bulPOqFMYIh7iw/UfjUDyho0EtgZAiD9JzwFkIXkZT8YYm+dvMjEAlxykZ5ZRJgK8fYB N5jTAm32U+uWVgFg2WixI89yZQ5XoqDC7ZgIEpkWFpgJRZrjW4PlIdv8Yf6QuK0K7hlM jEnw== Received: by 10.50.100.137 with SMTP id ey9mr13247363igb.57.1350418831663; Tue, 16 Oct 2012 13:20:31 -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 n20csp782148igt; Tue, 16 Oct 2012 13:20:30 -0700 (PDT) Received: by 10.180.8.161 with SMTP id s1mr34249722wia.0.1350418828563; Tue, 16 Oct 2012 13:20:28 -0700 (PDT) Received: from v220110690675601.yourvserver.net (v220110690675601.yourvserver.net. [78.47.199.172]) by mx.google.com with ESMTP id f7si4629876wiz.32.2012.10.16.13.20.27; Tue, 16 Oct 2012 13:20:28 -0700 (PDT) Received-SPF: neutral (google.com: 78.47.199.172 is neither permitted nor denied by best guess record for domain of sw@weilnetz.de) client-ip=78.47.199.172; Authentication-Results: mx.google.com; spf=neutral (google.com: 78.47.199.172 is neither permitted nor denied by best guess record for domain of sw@weilnetz.de) smtp.mail=sw@weilnetz.de Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id 644D97280041; Tue, 16 Oct 2012 22:20:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4UUWmYIocW90; Tue, 16 Oct 2012 22:20:26 +0200 (CEST) Received: from flocke.weilnetz.de (p5086EDFA.dip.t-dialin.net [80.134.237.250]) by v220110690675601.yourvserver.net (Postfix) with ESMTPSA id A1E58728003B; Tue, 16 Oct 2012 22:20:26 +0200 (CEST) Received: from localhost ([127.0.0.1] ident=stefan) by flocke.weilnetz.de with esmtp (Exim 4.72) (envelope-from ) id 1TODco-0001aY-9E; Tue, 16 Oct 2012 22:20:26 +0200 Message-ID: <507DC189.4060107@weilnetz.de> Date: Tue, 16 Oct 2012 22:20:25 +0200 From: Stefan Weil User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20120922 Iceowl/1.0b1 Icedove/3.0.11 MIME-Version: 1.0 To: Peter Maydell CC: Blue Swirl , qemu-devel@nongnu.org, patches@linaro.org Subject: Re: [PATCH] configure: Disable (clang) initializer-overrides warnings References: <1350244839-16875-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: X-Gm-Message-State: ALoCoQlX2YaVmX+ycDwY1dNvk0Svl3VOK0VyiJG2MCRA/pXr73+yoQEwDJDcl/wSNfF6b1Xt6lN/ Am 14.10.2012 22:24, schrieb Peter Maydell: > On 14 October 2012 21:15, Blue Swirl wrote: >> On Sun, Oct 14, 2012 at 8:00 PM, Peter Maydell wrote: >>> Blue Swirl previously submitted a patch which enabled this flag >>> (among others): >>> http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg04203.html >> >> In my version, Clang flags were separate from GCC flags. I think it >> would be better to run different tests for each compiler in the >> future, that lets GCC avoid Clang flag -ffoobar which does not have >> desirable effect to GCC and vice versa. > > Mmm, but at the moment it's entirely fine to pass both compilers > the same flags, and moreover we actually pass all these flags > to the compiler without checking if it's gcc or not; we just > ask if the compiler will run OK with the flag passed. (I'm not > even sure how you'd determine whether your compiler was gcc > or clang or gcc-llvm or whatever...) > >> I'd also like to handle flags for sparse checker the same way. > > I agree that those bits of configure could be cleaner. > > -- PMM > Hi Peter, hi Blue, gcc uses a different flag -Wno-override-init to disable initializer override warnings. I tested the following patch which uses -Wextra with gcc-4.4 and gcc-4.7. It allows compilation of QEMU without warnings. A test with those flags and clang still has to be done. Regards Stefan W. $QEMU_CFLAGS" QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/fpu" if test "$debug_info" = "yes"; then diff --git a/configure b/configure index 359e453..0818eda 100755 --- a/configure +++ b/configure @@ -267,6 +267,8 @@ sdl_config="${SDL_CONFIG-${cross_prefix}sdl-config}" QEMU_CFLAGS="-fno-strict-aliasing $QEMU_CFLAGS" QEMU_CFLAGS="-Wall -Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" QEMU_CFLAGS="-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" +QEMU_CFLAGS="-Wextra -Wno-missing-field-initializers $QEMU_CFLAGS" +QEMU_CFLAGS="-Wno-override-init -Wno-sign-compare -Wno-unused-parameter $QEMU_CFLAGS" QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE