[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Building with -msse

Kurt Roeckx <kurt@roeckx.be> writes:

> On Sat, Apr 26, 2008 at 07:05:17PM -0700, Russ Allbery wrote:
>> gnubg supports optionally building with SSE support for increased speed in
>> the analytical engine.  I have to date kept this disabled to not generate
>> binaries that might not run on all otherwise-supported Debian systems.
>> However, a user mentioned that he thinks all chips that fall into the
>> amd64 architecture have SSE and hence adding -msse would be safe for the
>> amd64 build.  Is that correct?
> There is no need to enable -msse on amd64.  It has always been on by
> default.
>> And in general are there any guidelines
>> about things like this?  I assume that using -msse for the i386 build is
>> still out since we still support 486 chips.
> If you want to have different optimizations depending on the cpu,
> there are a two options I know of:
> - When you hace shared libraries you can put them in directories like
>   /usr/lib/i686/sse/.  The dynamic linker whould pick it up for
>   you in that case.  (I have no idea if it looks at i686/sse or not,
>   but it looks at various other dirs, I can't find documentation for it.)

It doesn't. But one could add /usr/lib/sse via
/etc/ld.so.conf.d/package-sse when package-sse gets installed with
some check that the system actualy does have sse support.

> - Use runtime detection of the cpu and select the best option yourself.

Always better. Someone might want to share /usr between systems with
and without sse.


Reply to: