qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-trivial] [PATCH] configure: Make epoll_create1 test work around SP


From: Peter Maydell
Subject: [Qemu-trivial] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug
Date: Tue, 19 Apr 2011 09:57:41 +0100

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 <address@hidden>
---
 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 via email to

[Prev in Thread] Current Thread [Next in Thread]