qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug
@ 2011-04-19  8:57 Peter Maydell
  2011-04-19 19:37 ` Blue Swirl
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Maydell @ 2011-04-19  8:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, patches

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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-20 16:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-19  8:57 [Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug Peter Maydell
2011-04-19 19:37 ` 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

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).