comparison configure @ 7335:8db0cba91b6c

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.
author jkeil
date Mon, 09 Sep 2002 19:01:34 +0000
parents ec3e58120e2a
children b1346d1789ef
comparison
equal deleted inserted replaced
7334:d5bd28edf486 7335:8db0cba91b6c
882 return 0 882 return 0
883 else 883 else
884 echores "failed" 884 echores "failed"
885 echo "It seems that your kernel does not correctly support $2." 885 echo "It seems that your kernel does not correctly support $2."
886 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!" 886 echo "To use $2 extensions in MPlayer, you have to upgrade/recompile your kernel!"
887 return 1 887 return 1
888 fi 888 fi
889 fi 889 fi
890 return 1 890 return 0
891 } 891 }
892 892
893 extcheck $_mmx "mmx" "emms" || _mmx=no 893 extcheck $_mmx "mmx" "emms" || _mmx=no
894 extcheck $_mmx2 "mmx2" "sfence" || _mmx2=no 894 extcheck $_mmx2 "mmx2" "sfence" || _mmx2=no
895 extcheck $_3dnow "3dnow" "femms" || _3dnow=no 895 extcheck $_3dnow "3dnow" "femms" || _3dnow=no
896 extcheck $_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex=no 896 extcheck $_3dnowex "3dnowex" "pswapd %%mm0, %%mm0" || _3dnowex=no
897 extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" || _sse=no 897 extcheck $_sse "sse" "xorps %%xmm0, %%xmm0" || _sse=no _gcc3_ext="$_gcc3_ext -mno-sse"
898 extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2=no 898 extcheck $_sse2 "sse2" "xorpd %%xmm0, %%xmm0" || _sse2=no _gcc3_ext="$_gcc3_ext -mno-sse2"
899 echocheck "mtrr support" 899 echocheck "mtrr support"
900 echores "$_mtrr" 900 echores "$_mtrr"
901 901
902 if test "$_mtrr" = yes ; then 902 if test "$_mtrr" = yes ; then
903 _optimizing="$_optimizing mtrr" 903 _optimizing="$_optimizing mtrr"
904 fi 904 fi
905
906 if test "$_gcc3_ext" != ""; then
907 # if we had to disable sse/sse2 because the active kernel does not
908 # support this instruction set extension, we also have to tell
909 # gcc3 to not generate sse/sse2 instructions for normal C code
910 cat > $TMPC << EOF
911 int main(void) { return 0; }
912 EOF
913 cc_check $_march $_gcc3_ext && _march="$_march $_gcc3_ext"
914 fi
915
905 fi 916 fi
906 917
907 918
908 _prefix="/usr/local" 919 _prefix="/usr/local"
909 920