# HG changeset patch # User jkeil # Date 1031598094 0 # Node ID 8db0cba91b6c0e677e3ba4b53c72e07436afdf87 # Parent d5bd28edf48643981832b7cc5332f1ac02e2508a When we're compiling/running on a kernel without sse/sse2 support, we have to be careful when using gcc-3.x. gcc-3.x is able to emit sse/sse2 instructions for normal C code when we compile for maximum performance with something like the -march=athlon-xp switch. So, if the kernel does not support the sse/sse2 instruction set extension, we have to tell gcc-3.x to not emit see/sse2 instructions for regular C code, otherwise mplayer might crash with a SIGILL signal. diff -r d5bd28edf486 -r 8db0cba91b6c configure --- a/configure Mon Sep 09 16:18:47 2002 +0000 +++ b/configure Mon Sep 09 19:01:34 2002 +0000 @@ -884,24 +884,35 @@ echores "failed" echo "It seems that your kernel does not correctly support $2." echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!" - return 1 + return 1 fi fi - return 1 + return 0 } extcheck $_mmx "mmx" "emms" || _mmx=no extcheck $_mmx2 "mmx2" "sfence" || _mmx2=no extcheck $_3dnow "3dnow" "femms" || _3dnow=no extcheck $_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex=no - extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" || _sse=no - extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2=no + extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" || _sse=no _gcc3_ext="$_gcc3_ext -mno-sse" + extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2=no _gcc3_ext="$_gcc3_ext -mno-sse2" echocheck "mtrr support" echores "$_mtrr" if test "$_mtrr" = yes ; then _optimizing="$_optimizing mtrr" fi + + if test "$_gcc3_ext" != ""; then + # if we had to disable sse/sse2 because the active kernel does not + # support this instruction set extension, we also have to tell + # gcc3 to not generate sse/sse2 instructions for normal C code + cat > $TMPC << EOF +int main(void) { return 0; } +EOF + cc_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext" + fi + fi