Selecting processor architecture in OBS

I am currently building a package for msieve which is a library (and demo frontend program) to factor large integers. As you can imagine, this is a CPU intensive task and the source contains some assembler code to make it as fast as possible.

Using the gcc option ‘-march=i586’ throws an error:

unknown register name '%mm0' in 'asm'

The Makefile suggests to use -march=athlon-xp for 32-bit builds and -march=k8 for 64-bit builds. With these options the package builds, but I do not know how portable this is. What would you recommend?

Note: The $RPM_OPT_FLAGS default works for 64-bit but fails (with the above error) for 32-bit builds for 11.1 and SLE_11_SP1.

Hi
What about adding “-m32” to the %{optflags}?


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.27-0.2-default
up 20 days 22:29, 4 users, load average: 0.08, 0.06, 0.01
GPU GeForce 8600 GTS Silent - Driver Version: 260.19.36

What about adding “-m32” to the %{optflags}?

Does not work (because it implies that the processor has no MMX registers). But I could try to add “-mmmx” to the %{optflags}. Thanks for the idea.

(Build finished, yep -mmmx works ok).