Menu

#8 Builds fail to set -mmmx and -msse flags appropriately

open
nobody
None
5
2014-09-16
2006-10-27
No

While attempting to build jack-audio-connection-kit
(both versions 0.101.1 and 0.102.20 downloaded directly
from SF, and Gentoo ebuild 0.101.1-r1), compilation
fails for port.c's MMX and SSE code.

Configure flags (based on Gentoo ebuild):
./configure --prefix=/usr --host=i686-pc-linux-gnu
--mandir=/usr/share/man --infodir=/usr/share/info
--datadir=/usr/share --sysconfdir=/etc
--localstatedir=/var/lib --disable-altivec
--enable-alsa --disable-capabilities
--disable-stripped-jackd --disable-coreaudio
--disable-debug --disable-html-docs --enable-mmx
--enable-oss --disable-portaudio --disable-sse
--with-pic --with-default-tmpdir=/var/run/jack
--enable-dynsimd --build=i686-pc-linux-gnu

Based on these flags, MMX code should be enabled and
SSE code should not. port.c compilation fails as follows:

if /bin/sh ../libtool --tag=CC --mode=compile
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I..
-I../config -I.. -I.. -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -Wall -g -g -O2
-DJACK_LOCATION=\"/usr/bin\" -I../config -I.. -I..
-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -g -g -O2
-MT libjack_la-port.lo -MD -MP -MF
".deps/libjack_la-port.Tpo" -c -o libjack_la-port.lo
`test -f 'port.c' || echo './'`port.c; \ then mv -f ".deps/libjack_la-port.Tpo"
".deps/libjack_la-port.Plo"; else rm -f
".deps/libjack_la-port.Tpo"; exit 1; fi
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I..
-I../config -I.. -I.. -D_REENTRANT
-D_POSIX_PTHREAD_SEMANTICS -Wall -g -g -O2
-DJACK_LOCATION=\"/usr/bin\" -I../config -I.. -I..
-D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -Wall -g -g -O2
-MT libjack_la-port.lo -MD -MP -MF
.deps/libjack_la-port.Tpo -c port.c -fPIC -DPIC -o
.libs/libjack_la-port.o
port.c: In function 'x86_3dnow_add2f':
port.c:109: error: unknown register name 'mm0' in 'asm'
port.c:120: error: unknown register name 'mm1' in 'asm'
port.c:120: error: unknown register name 'mm0' in 'asm'
port.c: In function 'x86_3dnow_copyf':
port.c:146: error: unknown register name 'mm0' in 'asm'
port.c:148: error: unknown register name 'mm1' in 'asm'
port.c:150: error: unknown register name 'mm2' in 'asm'
port.c:152: error: unknown register name 'mm3' in 'asm'
port.c:154: error: unknown register name 'mm4' in 'asm'
port.c:156: error: unknown register name 'mm5' in 'asm'
port.c:158: error: unknown register name 'mm6' in 'asm'
port.c:160: error: unknown register name 'xmm7' in 'asm'
port.c:163: error: unknown register name 'mm0' in 'asm'
port.c:165: error: unknown register name 'mm1' in 'asm'
port.c:167: error: unknown register name 'mm2' in 'asm'
port.c:169: error: unknown register name 'mm3' in 'asm'
port.c:171: error: unknown register name 'mm4' in 'asm'
port.c:173: error: unknown register name 'mm5' in 'asm'
port.c:175: error: unknown register name 'mm6' in 'asm'
port.c:177: error: unknown register name 'mm7' in 'asm'
port.c:182: error: unknown register name 'mm0' in 'asm'
port.c:191: error: unknown register name 'mm0' in 'asm'
port.c: In function 'x86_sse_copyf':
port.c:215: error: unknown register name 'xmm0' in 'asm'
port.c:217: error: unknown register name 'xmm1' in 'asm'
port.c:219: error: unknown register name 'xmm2' in 'asm'
port.c:221: error: unknown register name 'xmm3' in 'asm'
port.c:223: error: unknown register name 'xmm4' in 'asm'
port.c:225: error: unknown register name 'xmm5' in 'asm'
port.c:227: error: unknown register name 'xmm6' in 'asm'
port.c:229: error: unknown register name 'xmm7' in 'asm'
port.c:232: error: unknown register name 'xmm0' in 'asm'
port.c:234: error: unknown register name 'xmm1' in 'asm'
port.c:236: error: unknown register name 'xmm2' in 'asm'
port.c:238: error: unknown register name 'xmm3' in 'asm'
port.c:240: error: unknown register name 'xmm4' in 'asm'
port.c:242: error: unknown register name 'xmm5' in 'asm'
port.c:244: error: unknown register name 'xmm6' in 'asm'
port.c:246: error: unknown register name 'xmm7' in 'asm'
port.c:251: error: unknown register name 'xmm0' in 'asm'
port.c:260: error: unknown register name 'xmm0' in 'asm'
port.c: In function 'x86_sse_add2f':
port.c:286: error: unknown register name 'xmm0' in 'asm'
port.c:298: error: unknown register name 'xmm0' in 'asm'
make[2]: *** [libjack_la-port.lo] Error 1
make[2]: Leaving directory
`/tmp/jack-audio-connection-kit-0.102.20/libjack'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/tmp/jack-audio-connection-kit-0.102.20'
make: *** [all] Error 2

Adding -mmmx to JACK_CFLAGS in libjack/Makefile
resolved the mm* registers; adding -msse resolved all
of the registers.

Also, having given --disable-sse, the SSE code should
not have been compiled.

Gentoo bug, for reference:
http://bugs.gentoo.org/show_bug.cgi?id=153001

Discussion

  • Brett Warden

    Brett Warden - 2006-11-01

    Logged In: YES
    user_id=12335

    The attached patch to configure.ac fixes this issue for me.
    If --enable-dynsimd is set, enable-mmx and enable-sse are
    both set. This patch also moves the addition of $MMX_FLAGS
    and $SSE_FLAGS outside the enable-optimize test so they will
    be used even if enable-optimize is not set. This may not be
    the best approach, but I leave it to you as a start.

     
  • Brett Warden

    Brett Warden - 2006-11-01

    Patch against configure.ac to force enable-mmx and enable-sse when dynsimd is enabled

     

Log in to post a comment.