From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37512) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QC6kl-0007aJ-J9 for qemu-devel@nongnu.org; Tue, 19 Apr 2011 04:57:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QC6kh-0005Vq-PU for qemu-devel@nongnu.org; Tue, 19 Apr 2011 04:57:47 -0400 From: Peter Maydell Date: Tue, 19 Apr 2011 09:57:41 +0100 Message-Id: <1303203461-30776-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, patches@linaro.org 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 --- 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