[MPlayer-dev-eng] Patch to support Linux on MIPS/MIPS64

Diego Biurrun diego at biurrun.de
Sun Feb 12 16:58:14 CET 2006


On Sun, Feb 12, 2006 at 01:17:20PM +0000, Matthew Johnson wrote:
> 
> Sorry, my FCC didn't save a copy and I resent. Attached now. CVS matches
> mips* rather than mips, but still doesn't check -march settings from
> /proc on linux, so this patch adds that.

This needs a bit of improvement..

> --- configure.orig	2006-02-11 23:29:51 +0000
> +++ configure	2006-02-12 13:15:21 +0000
> @@ -1333,6 +1333,20 @@
>  	    R8000|R10000|R12000|R14000|R16000) _march='-mips4' _mcpu='-mtune=r8000' ;;
>  	esac
>          echores "$proc"
> +   elif [[ $system_name == "Linux" ]]

Try the 'linux' command instead, it is defined at the top of configure.

> +   echocheck "CPU type"
> +   proc=`cat /proc/cpuinfo | grep ^cpu | cut -d" " -f3`
> +   case "`echo $proc`" in
> +	    R3000) _march='-mips1' _mcpu='-mtune=r2000' ;;
> +	    R4000) _march='-mips3' _mcpu='-mtune=r4000' ;;
> +	    R4400) _march='-mips3' _mcpu='-mtune=r4400' ;;
> +	    R4600) _march='-mips3' _mcpu='-mtune=r4600' ;;
> +	    R5000) _march='-mips4' _mcpu='-mtune=r5000' ;;
> +	    R8000|R10000|R12000|R14000|R16000) _march='-mips4' _mcpu='-mtune=r8000' ;;
> +   esac
> +        echores "$proc"

You are duplicating 10 lines, this is not good.  Instead you should use
a different command to generate the value stored in 'proc'.  For Linux
it should be your command, for Irix the one that is already there.

I'll apply a patch that features my suggestions right away.

Diego




More information about the MPlayer-dev-eng mailing list