All of lore.kernel.org
 help / color / mirror / Atom feed
From: Blue Swirl <blauwirbel@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Stefan Weil <sw@weilnetz.de>, qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH 11/11] configure: Check for -Werror causing failures when compiling tests
Date: Sat, 4 Aug 2012 17:57:00 +0000	[thread overview]
Message-ID: <CAAu8pHu1gRD3MLP1wfHDmwjQJxHAacUqo_DtaKrMnC5iKO7+Fg@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA-UY=Ekq0=RqmNm7z4NVK5_Mnq-F+pBygcmZPF4WGR7Pw@mail.gmail.com>

On Sat, Jul 28, 2012 at 1:48 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 28 July 2012 13:31, Blue Swirl <blauwirbel@gmail.com> 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:
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
+#    exit 1
 }

 compile_object() {

>
> -- PMM

  reply	other threads:[~2012-08-04 17:57 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 14:10 [Qemu-devel] [PATCH 00/11] configure: Fix -Werror issues Peter Maydell
2012-07-18 14:10 ` [Qemu-devel] [PATCH 01/11] configure: Don't run configure tests with -Werror enabled Peter Maydell
2012-07-18 14:10 ` [Qemu-devel] [PATCH 02/11] configure: Fix build with ALSA audio driver Peter Maydell
2012-07-18 14:10 ` [Qemu-devel] [PATCH 03/11] configure: Fix build with capabilities Peter Maydell
2012-07-18 14:10 ` [Qemu-devel] [PATCH 04/11] configure: Replace bash code by standard shell code Peter Maydell
2012-07-18 14:10 ` [Qemu-devel] [PATCH 05/11] configure: -march=i486 belongs in QEMU_CFLAGS, not CFLAGS Peter Maydell
2012-07-18 14:10 ` [Qemu-devel] [PATCH 06/11] configure: Fix errors in test for__sync_fetch_and_and Peter Maydell
2012-07-18 14:10 ` [Qemu-devel] [PATCH 07/11] configure: Fix compile warning in PNG test Peter Maydell
2012-07-18 15:46   ` Stefan Weil
2012-07-18 14:10 ` [Qemu-devel] [PATCH 08/11] configure: Fix warnings in VDE library probe Peter Maydell
2012-07-18 14:10 ` [Qemu-devel] [PATCH 09/11] configure: Fix compile warning in utimensat/futimens test Peter Maydell
2012-07-18 15:48   ` Stefan Weil
2012-07-18 14:10 ` [Qemu-devel] [PATCH 10/11] configure: -I\$(SRC_PATH) goes in QEMU_INCLUDES not QEMU_CFLAGS Peter Maydell
2012-07-18 14:10 ` [Qemu-devel] [PATCH 11/11] configure: Check for -Werror causing failures when compiling tests Peter Maydell
2012-07-28  9:04   ` Blue Swirl
2012-07-28 10:57     ` Peter Maydell
2012-07-28 12:09       ` Blue Swirl
2012-07-28 12:14         ` Peter Maydell
2012-07-28 12:20           ` Blue Swirl
2012-07-28 12:31           ` Blue Swirl
2012-07-28 13:48             ` Peter Maydell
2012-08-04 17:57               ` Blue Swirl [this message]
2012-08-09 18:24                 ` Peter Maydell
2012-08-09 20:15                   ` Blue Swirl
2012-08-11 19:12   ` Blue Swirl
2012-07-31 20:21 ` [Qemu-devel] [PATCH 00/11] configure: Fix -Werror issues Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAu8pHu1gRD3MLP1wfHDmwjQJxHAacUqo_DtaKrMnC5iKO7+Fg@mail.gmail.com \
    --to=blauwirbel@gmail.com \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sw@weilnetz.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.