[Mplayer-cvslog] CVS: main configure,1.562,1.563
Jürgen Keil
jkeil at mplayerhq.hu
Mon Sep 9 21:01:51 CEST 2002
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv26661
Modified Files:
configure
Log Message:
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.
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.562
retrieving revision 1.563
diff -u -r1.562 -r1.563
--- configure 8 Sep 2002 22:41:53 -0000 1.562
+++ configure 9 Sep 2002 19:01:34 -0000 1.563
@@ -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
More information about the MPlayer-cvslog
mailing list