Subject: Re: pkg/30577: audio/libvorbis w/ sunpro missing libsunmath for sincos()
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: grant beattie <grant@NetBSD.org>
List: pkgsrc-bugs
Date: 06/23/2005 11:32:16
On Thu, Jun 23, 2005 at 12:55:00AM +0000, grant@NetBSD.org wrote:

> >Description:
> libvorbis needs to be linked against libsunmath when built with sunpro
> so it can resolve sincos().
> >How-To-Repeat:
> build libvorbis on Solaris w/ sunpro and try to link an executable
> with it.
> >Fix:
> as libsunmath is provided by sunpro itself, it should be statically
> linked so binaries are not dependent on libsunmath.so which doesn't
> exist in Solaris base.
> 
> I'm submitting this as a PR so I don't forget about it :)

this behaviour is a result of the -fast argument to cc(1), which turns
on -xlibmopt.

one option might be to follow -fast with -xnolibmopt (which disables
the default -fast behaviour of using the optimized math library) or
add "-B static -lsunmath -B dynamic" whenever -fast and -lm are
passed.

of course, another bigger issue with the use of -fast -fast (and other
compiler flags) is that binaries will not run on earlier processor
family systems than they were built on.