Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DT2ny-0006V1-QW for qemu-devel@nongnu.org; Tue, 03 May 2005 15:11:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DT2ny-0006Up-DB for qemu-devel@nongnu.org; Tue, 03 May 2005 15:11:38 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DT2nN-00060s-Co for qemu-devel@nongnu.org; Tue, 03 May 2005 15:11:01 -0400 Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1DT2f5-0002dj-IY for qemu-devel@nongnu.org; Tue, 03 May 2005 15:02:27 -0400 Received: from [192.76.135.70] (helo=kurt.tools.de) by mx20.gnu.org with esmtp (Exim 4.34) id 1DT1hg-0006lu-OL for qemu-devel@nongnu.org; Tue, 03 May 2005 14:01:05 -0400 Received: from imap3.tools.intra (imap3.tools.intra [172.20.0.8]) by kurt.tools.de (8.13.3/8.13.3) with ESMTP id j43HOKHF002175 for ; Tue, 3 May 2005 19:24:21 +0200 (MEST) Received: from tiger2.tools.intra (tiger2.tools.intra [172.20.0.11]) by imap3.tools.intra (8.13.1+Sun/8.13.1) with SMTP id j43HOKaw016636 for ; Tue, 3 May 2005 19:24:20 +0200 (MEST) Message-Id: <200505031724.j43HOKaw016636@imap3.tools.intra> Date: Tue, 3 May 2005 19:24:20 +0200 (CEST) From: Juergen Keil Subject: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real) MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Content-MD5: kj5vscLC7AQjOyt6xdsP4A== Reply-To: Juergen Keil , qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org > Undefined first referenced > symbol in file > fesetround libqemu.a(softfloat-native.o) > lrintf libqemu.a(softfloat-native.o) > llrint libqemu.a(softfloat-native.o) > rintf libqemu.a(softfloat-native.o) > lrint libqemu.a(softfloat-native.o) > remainderf libqemu.a(softfloat-native.o) > sqrtf libqemu.a(softfloat-native.o) > llrintf libqemu.a(softfloat-native.o) > ld: fatal: Symbol referencing errors. No output written to qemu > collect2: ld returned 1 exit status > gmake[1]: *** [qemu] Error 1 > > Okay, fesetround can be resolved by adding '-L/opt/SUNWspro/lib -lm9x' but > what about the other symbols? Hmm, Solaris 10 has all of these functions in libm.so, but apparently they are missing in the Solaris 8 or Solaris 9 math library -lm. For the BSDs, this problem has already be solved for lrint() and llrint(): long lrint(double x); long long llrint(double x); See the file fpu/softfloat-native.c, you'll find: #if defined(_BSD) #define lrint(d) ((int32_t)rint(d)) #define llrint(d) ((int64_t)rint(d)) #endif Both macros should be enabled for Solaris 8 & 9, too. lrintf() and llrintf() is the same, but with a float argument instead of double. The following macros should work: #define lrintf(f) ((int32_t)rint(f)) #define llrintf(f) ((int64_t)rint(f)) sqrtf(), remainderf() and rintf() is similar to sqrt(), remainder() and rint() but uses float arguments and result values. #define sqrtf(f) ((float)sqrt(f)) #define remainderf(fa, fb) ((float)remainder(fa, fb)) #define rintf(f) ((float)rint(f)) (All of this is untested, but should work)