[mythtv] [PATCH] dtk libsoundtouch bug

Mark Spieth mark at dclabs.com.au
Sat Jan 29 17:54:48 EST 2005


> ]also dont need the -fPIC
> ]options. so I removed them too. static lib after all.
>
> Isn't this getting statically linked into a dynamic lib?
> Is it safe to get rid of -fPIC then?

no idea. defer to the judgement of others. I only know it works

> ]also the "new" intrisics are much slower. I had a look at the assembly
> ]produced and its quite inefficient at optimising the registers
(gcc3.3.4).
> ]Id keep the older macros for now for performance reasons.
>
> Yep. But icc and newer gcc's like them. And those compilers may even
> clobber the old intrinsics in certain situations.

true. thus need an auto way of determining whether to use them or not.
configure would do it. perhaps a mini script in the libmythsoundtouch.pro
file to test for the presence of mmintrin.h

perhaps

unix {
MMINTRINS = $$system( echo -e '\x23include <mmintrin.h>\nint main() {__m64
m0; m0 = _mm_setzero_si64(); return 0; }' > ___test.cpp; g++ -O3 -mmmx -o
___test.o ___test.cpp >/dev/null 2>&1 && echo 1 || echo 0; rm -f ___test.o
___test.cpp1 )
equals(MMINTRINS,1) {
    :message("looks like gcc supports mmx intrinsics")
    DEFINES +=  USE_GCC_INTRINSICS
}
}

note the system command must be all on one line. seems to work.

cheers
mark



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.2 - Release Date: 1/28/2005



More information about the mythtv-dev mailing list