qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, patches@linaro.org
Subject: [Qemu-trivial] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug
Date: Tue, 19 Apr 2011 09:57:41 +0100	[thread overview]
Message-ID: <1303203461-30776-1-git-send-email-peter.maydell@linaro.org> (raw)

Work around a SPARC glibc bug which caused the epoll_create1 configure
test to wrongly claim that the function was present. Some versions of
SPARC glibc provided the function in the library but didn't declare
it in the include file; the result is that gcc warns about an implicit
declaration but a link succeeds. So we build the configure test with
-Werror to avoid the test passing but then a -Werror qemu build
failing.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 configure |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index da2da04..d9a8fdc 100755
--- a/configure
+++ b/configure
@@ -2229,7 +2229,12 @@ int main(void)
     return 0;
 }
 EOF
-if compile_prog "$ARCH_CFLAGS" "" ; then
+# We need to build this with -Werror to handle a bug in some
+# SPARC glibc where the function is defined but not declared
+# in the header file. Without -Werror gcc warns about an implicit
+# declaration of the function but the link succeeds; however
+# qemu itself will fail to build if it is compiled -Werror.
+if compile_prog "$ARCH_CFLAGS -Werror" "" ; then
   epoll_create1=yes
 fi
 
-- 
1.7.1



             reply	other threads:[~2011-04-19  8:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-19  8:57 Peter Maydell [this message]
2011-04-19 19:37 ` [Qemu-trivial] [Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug Blue Swirl
2011-04-19 19:48   ` Peter Maydell
2011-04-19 19:59     ` Blue Swirl
2011-04-19 20:16       ` Peter Maydell
2011-04-19 20:36         ` Blue Swirl
2011-04-20  6:53           ` Peter Maydell
2011-04-20 16:31             ` 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=1303203461-30776-1-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).