From patchwork Tue Jul 1 01:51:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 365853 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 62D8B14009E for ; Tue, 1 Jul 2014 11:51:47 +1000 (EST) Received: from localhost ([::1]:37851 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1nEX-0008KS-NP for incoming@patchwork.ozlabs.org; Mon, 30 Jun 2014 21:51:45 -0400 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 d23dlp01.au.ibm.com (202.81.31.203) by e23smtp04.au.ibm.com (202.81.31.210) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 1 Jul 2014 11:51:03 +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 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.190.163.12]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id s611p2cH026745; Tue, 1 Jul 2014 11:51:02 +1000 Received: from bran.ozlabs.ibm.com (haven.au.ibm.com [9.190.164.82]) by ozlabs.au.ibm.com (Postfix) with ESMTP id 0039DA010C; Tue, 1 Jul 2014 11:51:01 +1000 (EST) Received: from ka1.ozlabs.ibm.com (ka1.ozlabs.ibm.com [10.61.145.11]) by bran.ozlabs.ibm.com (Postfix) with ESMTP id 9534916A9DA; Tue, 1 Jul 2014 11:51:01 +1000 (EST) From: Alexey Kardashevskiy To: qemu-devel@nongnu.org Date: Tue, 1 Jul 2014 11:51:00 +1000 Message-Id: <1404179460-29303-1-git-send-email-aik@ozlabs.ru> X-Mailer: git-send-email 2.0.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14070101-9264-0000-0000-0000066D42B5 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 202.81.31.146 Cc: Alexey Kardashevskiy , Peter Maydell , Paolo Bonzini Subject: [Qemu-devel] [PATCH fix for 2.1] makefile: Fix tools compile 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 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 :