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: 1091 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:49:00 -0000 Delivered-To: patches@linaro.org Received: by 10.224.67.148 with SMTP id r20cs62581qai; Tue, 19 Apr 2011 01:57:44 -0700 (PDT) Received: by 10.216.243.143 with SMTP id k15mr9191596wer.98.1303203463615; Tue, 19 Apr 2011 01:57:43 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id h47si12014039wer.76.2011.04.19.01.57.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 19 Apr 2011 01:57:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk 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 Cc: qemu-trivial@nongnu.org, patches@linaro.org Subject: [PATCH] configure: Make epoll_create1 test work around SPARC glibc bug 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 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