From patchwork Sat Aug 4 17:57:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 10485 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 397A32402A for ; Sat, 4 Aug 2012 17:57:25 +0000 (UTC) Received: from mail-yx0-f180.google.com (mail-yx0-f180.google.com [209.85.213.180]) by fiordland.canonical.com (Postfix) with ESMTP id DC25EA182CE for ; Sat, 4 Aug 2012 17:57:24 +0000 (UTC) Received: by yenq6 with SMTP id q6so1719491yen.11 for ; Sat, 04 Aug 2012 10:57:24 -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 :dkim-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:x-gm-message-state; bh=tqm8eKvK5A3Kdi6sNEJKKN6FlzXeYjkh2JN/KRUhe3Y=; b=Qoa2uONStVnNdNr+PmIJIlviNm7NzVta1EZ+Kp0sDN2Fo9xQc81YtrcvqPJYQI9OAE fP5lUx6bQF/At5D2nZP98IXFwhzHrX2aBuQ+53AgMV95epTt8A6Rhdi+17W59z5A1qt1 WyKvQbYRCARlGD+AUSVoLXajZ0SwUDlMNw6ong3qTdsRAld5atTXM8XwIjoV1SKybtgJ 3ebXSrfyMnzSXe96/OCikVljcFNaMlk6OTvdE/wkYjJSa2Osfan0ApdedAYdHMwb1NZp QXJKf1J3tonBrBaeByQO9nFLpqHFimfxm2Dnr2+LjiJt7yGZksCT4j4c9DAm2v1pspaS JDOg== Received: by 10.42.54.133 with SMTP id r5mr6098374icg.9.1344103043866; Sat, 04 Aug 2012 10:57:23 -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.87.40 with SMTP id u8csp369920igz; Sat, 4 Aug 2012 10:57:23 -0700 (PDT) Received: by 10.236.201.161 with SMTP id b21mr5709064yho.41.1344103042669; Sat, 04 Aug 2012 10:57:22 -0700 (PDT) Received: from mail-gg0-f178.google.com (mail-gg0-f178.google.com [209.85.161.178]) by mx.google.com with ESMTPS id c29si14566137yhe.117.2012.08.04.10.57.21 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 04 Aug 2012 10:57:22 -0700 (PDT) Received-SPF: pass (google.com: domain of blauwirbel@gmail.com designates 209.85.161.178 as permitted sender) client-ip=209.85.161.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of blauwirbel@gmail.com designates 209.85.161.178 as permitted sender) smtp.mail=blauwirbel@gmail.com; dkim=pass header.i=@gmail.com Received: by ggcq6 with SMTP id q6so1980321ggc.37 for ; Sat, 04 Aug 2012 10:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=tqm8eKvK5A3Kdi6sNEJKKN6FlzXeYjkh2JN/KRUhe3Y=; b=ieGePEhDgAJi8URk2zBPhob1/Jrsx+Xbdso6GvK3p+mcIHIGDlsvfaDJoD9V4WTdCu AK2WyLt1FSbMKdURtP1cmxVitpPF4qe1isBqrShPPTcm1LIYh9E0daLTOjB140Zejs4c wNyinNoDVn9tVJKEKKNR7VNmCBYgE3lveaGaXP2u81BZtbKSBj98SKDsYtTV3FthWkyg RI85NKKxxRBnPf5qPQL4gT7xRBg97uErLr9iHec5C1cvxo2C2pTClDZui3qKCbNRGLns uzypwteHNEm3UQiC0VQV0K8X6btAjCoWiaR9MNzXb3ejbDdnfQeCV/CyvK/45EIRV/9H ZPDg== Received: by 10.42.64.9 with SMTP id e9mr5945152ici.20.1344103040872; Sat, 04 Aug 2012 10:57:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.166.3 with HTTP; Sat, 4 Aug 2012 10:57:00 -0700 (PDT) In-Reply-To: References: <1342620628-12751-1-git-send-email-peter.maydell@linaro.org> <1342620628-12751-12-git-send-email-peter.maydell@linaro.org> From: Blue Swirl Date: Sat, 4 Aug 2012 17:57:00 +0000 Message-ID: Subject: Re: [Qemu-devel] [PATCH 11/11] configure: Check for -Werror causing failures when compiling tests To: Peter Maydell Cc: qemu-devel@nongnu.org, Stefan Weil , patches@linaro.org X-Gm-Message-State: ALoCoQmGsxJdgdY9NEknGpXttj9rewTH1gMMl9RaX19NxXH9NEhy68xOZTd/0IJaX70u8CyZoEBK On Sat, Jul 28, 2012 at 1:48 PM, Peter Maydell wrote: > On 28 July 2012 13:31, Blue Swirl wrote: >> I'm getting this error, probably because now Valgrind support is enabled: >> CC coroutine-ucontext.o >> cc1: warnings being treated as errors >> /src/qemu/coroutine-ucontext.c:204: error: unknown option after >> '#pragma GCC diagnostic' kind >> /src/qemu/coroutine-ucontext.c:209: error: unknown option after >> '#pragma GCC diagnostic' kind >> >> Maybe the compiler does not understand this pragma and Valgrind check >> should also fail in that case. > > Yeah, I think this is one of the few tests which want to explicitly > check "is this construct going to provoke a compiler warning" -- > fix is for that test to explictly put -Werror in the cflags in > the compile_prog line. Now with your Xen configure patches in place, I'm not getting errors with this applied except for Clang (which I didn't test earlier). Maybe this should be applied. clang -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -I/usr/include/libpng12 -o /tmp/qemu-conf--25992-.exe /tmp/qemu-conf--25992-.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g /tmp/qemu-conf--25992-.c:4:32: warning: self-comparison always evaluates to true [-Wtautological-compare] int main(void) { return preadv == preadv; } ^ 1 warning generated. clang -Werror -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -I/usr/include/libpng12 -o /tmp/qemu-conf--25992-.exe /tmp/qemu-conf--25992-.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g /tmp/qemu-conf--25992-.c:4:32: error: self-comparison always evaluates to true [-Werror,-Wtautological-compare] int main(void) { return preadv == preadv; } ^ 1 error generated. ERROR: configure test passed without -Werror but failed with -Werror. clang -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -I/usr/include/libpng12 -o /tmp/qemu-conf--25992-.exe /tmp/qemu-conf--25992-.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g /tmp/qemu-conf--25992-.c:13:26: warning: self-comparison always evaluates to true [-Wtautological-compare] return epoll_create1 == epoll_create1; ^ 1 warning generated. clang -Werror -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -I/usr/include/libpng12 -o /tmp/qemu-conf--25992-.exe /tmp/qemu-conf--25992-.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g /tmp/qemu-conf--25992-.c:13:26: error: self-comparison always evaluates to true [-Werror,-Wtautological-compare] return epoll_create1 == epoll_create1; ^ 1 error generated. ERROR: configure test passed without -Werror but failed with -Werror. clang -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -I/usr/include/libpng12 -I/usr/include/nss -I/usr/include/nspr -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -o /tmp/qemu-conf--25992-.exe /tmp/qemu-conf--25992-.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g /tmp/qemu-conf--25992-.c:3:13: warning: explicitly assigning a variable of type 'char **' to itself [-Wself-assign] environ = environ; ~~~~~~~ ^ ~~~~~~~ 1 warning generated. clang -Werror -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -I/usr/include/libpng12 -I/usr/include/nss -I/usr/include/nspr -pthread -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -o /tmp/qemu-conf--25992-.exe /tmp/qemu-conf--25992-.c -Wl,-z,relro -Wl,-z,now -pie -m64 -g /tmp/qemu-conf--25992-.c:3:13: error: explicitly assigning a variable of type 'char **' to itself [-Werror,-Wself-assign] environ = environ; ~~~~~~~ ^ ~~~~~~~ 1 error generated. ERROR: configure test passed without -Werror but failed with -Werror. I used this hack to get more than one warning: +# exit 1 } compile_object() { > > -- PMM diff --git a/configure b/configure index d8ec050..eb2ed2f 100755 --- a/configure +++ b/configure @@ -46,11 +46,11 @@ do_cc() { esac echo $cc -Werror "$@" >> config.log $cc -Werror "$@" >> config.log 2>&1 && return $? - echo "ERROR: configure test passed without -Werror but failed with -Werror." - echo "This is probably a bug in the configure script. The failing command" - echo "will be at the bottom of config.log." - echo "You can run configure with --disable-werror to bypass this check." - exit 1 + echo "ERROR: configure test passed without -Werror but failed with -Werror." >> config.log + echo "This is probably a bug in the configure script. The failing command" >> config.log + echo "will be at the bottom of config.log." >> config.log + echo "You can run configure with --disable-werror to bypass this check." >> config.log