From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47906) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1nE8-00082s-Bm for qemu-devel@nongnu.org; Mon, 30 Jun 2014 21:51:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1nDz-0008Vj-Pt for qemu-devel@nongnu.org; Mon, 30 Jun 2014 21:51:20 -0400 Received: from e23smtp04.au.ibm.com ([202.81.31.146]:50487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1nDy-0008Uc-SU for qemu-devel@nongnu.org; Mon, 30 Jun 2014 21:51:11 -0400 Received: from /spool/local by e23smtp04.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 1 Jul 2014 11:51:05 +1000 Received: from d23relay03.au.ibm.com (d23relay03.au.ibm.com [9.190.235.21]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id 0CE8B2CE8050 for ; Tue, 1 Jul 2014 11:51:03 +1000 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay03.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s611okQ610617266 for ; Tue, 1 Jul 2014 11:50:46 +1000 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s611p26Y026755 for ; Tue, 1 Jul 2014 11:51:02 +1000 From: Alexey Kardashevskiy Date: Tue, 1 Jul 2014 11:51:00 +1000 Message-Id: <1404179460-29303-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH fix for 2.1] makefile: Fix tools compile List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Peter Maydell , Paolo Bonzini The existing test whether "-lm" needs to be included or not is insufficient as it reports false negative on Fedora20/ppc64. As the result, qemu-nbd/qemu-io/qemu-img tools cannot compile. This replaces sin() with log() in the test. Signed-off-by: Alexey Kardashevskiy --- The bug was triggered by efc6de0d0eb21bbd8fbc90da1faf7dd8ed9f5321 "block/iscsi: handle BUSY condition" which does not anything wrong :) It compiled well on Fedora19 though what is weird. Is log() good enough or we need to test for both? Thanks. ps. this is my test on the system upgraded from fc19 yesterday: [aik@vpl2 ~]$ cat b.c #include int main(void) { return isnan(log(0.0)); } [aik@vpl2 ~]$ gcc b.c -o b /tmp/ccqp1EI4.o: In function `main': b.c:(.text+0x20): undefined reference to `log' collect2: error: ld returned 1 exit status [aik@vpl2 ~]$ gcc b.c -o b -lm [aik@vpl2 ~]$ cat /etc/issue Fedora release 20 (Heisenbug) Kernel \r on an \m (\l) --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 23ecb37..c7a2922 100755 --- a/configure +++ b/configure @@ -3453,7 +3453,7 @@ fi # Do we need libm cat > $TMPC << EOF #include -int main(void) { return isnan(sin(0.0)); } +int main(void) { return isnan(log(0.0)); } EOF if compile_prog "" "" ; then : -- 2.0.0