From patchwork Tue Apr 19 08:57:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 91939 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 08C721007D9 for ; Tue, 19 Apr 2011 18:57:58 +1000 (EST) Received: from localhost ([::1]:57412 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QC6ks-0007aU-G2 for incoming@patchwork.ozlabs.org; Tue, 19 Apr 2011 04:57:54 -0400 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 Received: from mnementh.archaic.org.uk ([81.2.115.146]:34962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QC6kh-0005Vb-IG; Tue, 19 Apr 2011 04:57:43 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QC6kf-00080p-3l; Tue, 19 Apr 2011 09:57:41 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 19 Apr 2011 09:57:41 +0100 Message-Id: <1303203461-30776-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 81.2.115.146 Cc: qemu-trivial@nongnu.org, patches@linaro.org Subject: [Qemu-devel] [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.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