From: Juergen Keil <jk@tools.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real)
Date: Tue, 3 May 2005 19:24:20 +0200 (CEST) [thread overview]
Message-ID: <200505031724.j43HOKaw016636@imap3.tools.intra> (raw)
> 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)
next reply other threads:[~2005-05-03 19:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-03 17:24 Juergen Keil [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-05-02 18:35 [Qemu-devel] [PATCH] qemu-0.7.0 Solaris Host patch (Real) Juergen Keil
2005-05-03 13:10 ` Nardmann, Heiko
2005-04-28 14:24 Ben Taylor
2005-04-30 9:40 ` Alex Beregszaszi
2005-05-02 10:12 ` Nardmann, Heiko
2005-05-02 10:51 ` Nardmann, Heiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200505031724.j43HOKaw016636@imap3.tools.intra \
--to=jk@tools.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).