Mailinglist Archive: opensuse-packaging (284 mails)

< Previous Next >
Re: [opensuse-packaging] MMX/SSE in i586 packages
Am Montag, 14. Februar 2011, 09:23:43 schrieb Wolfgang Rosenauer:
Am 14.02.2011 09:16, schrieb Adrian Schröter:
Am Samstag, 12. Februar 2011, 22:38:05 schrieb Cristian Morales Vega:
I have a program with a build system that adds "-mfpmath=sse -msse" to
the CFLAGS. What do you think, should I patch it? And if it used -mmmx
(gcc calls "i586" to a Pentium without MMX)?

If it is for a i586.rpm, you need to patch it in any case to not use these
flags. Because the binaries would not be runable on a i586 system.

If these optimizations would speed up the code (this is not the case for
most
packages), you may build the libs a second time and put them below

/usr/lib/sse2

directory (sse3 path is afaik not yet supported). The dynamic linker will
look
there first, if the hardware supports it.

So the package is still runable on plain i586, but uses performance boost
on newer
32bit hardware. (However, one could argue that fast systems are anyway
64bit
these days and it is not worth the hazzle ...)

BTW. Can wrong usage of those flags be detected via post-build-checks or
rpmlint? I could imagine that they may be used w/o being noticed by the
packager.

We could parse the gcc command lines at least, like we parse the gcc output
messages.

The problem is to handle this. If we make this an error, code which handles the
the problem at runtime can't get build anymore.

And if don't make this an error, no one will notice it ;)

Even disassembling the binaries in /usr/lib/ and matching for the calls would
not
be enough, because there might be a condition around it ...

So, I dunno how to add such a check in a trivial way ...

bye
adrian

--
Adrian Schroeter
SUSE Linux Products GmbH
email: adrian@xxxxxxx

--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >