[MPlayer-dev-eng] [PATCH] --target=alpha_ev5-linux

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Sat Oct 6 15:00:39 CEST 2007


On Saturday, 06 October 2007 at 14:53, A Mennucc wrote:
> hi
> 
> I propose this patch for inclusion in mplayer code
> 
> I prepared it to address Debian bug 431139 .
> 
> Without this patch, when MPlayer is compiled into the Debian alpha build
> daemon, it is optimized for the CPU of the build daemon host (that is
> EV6 , AFAIKR), and then it does not work on the user's CPU when they are
> more primitive than EV6 .
> 
> When configure is patched, I can pass the option
>  --target=alpha_ev5-linux
> from debian/rules to ./configure, and this in turn passes --cpu=ev5 to gcc.
> 
> See also the discussion in
> http://permalink.gmane.org/gmane.linux.debian.ports.alpha/7295
> 
> bye ad thanks
> 
> a.

> Index: configure
> ===================================================================
> --- configure	(revisione 24712)
> +++ configure	(copia locale)
> @@ -146,7 +146,7 @@
>  
>  alpha() {
>    case "$host_arch" in
> -    alpha) return 0;;
> +    alpha*) return 0;;
>      *) return 1;;
>    esac
>  }
> @@ -1257,7 +1257,7 @@
>          fi
>        ;;
>        macppc|ppc|ppc64) host_arch=ppc ;;
> -      alpha) host_arch=alpha ;;
> +      alpha*) host_arch=alpha ;;
>        sparc) host_arch=sparc ;;
>        sparc64) host_arch=sparc64 ;;
>        parisc*|hppa*|9000*) host_arch=hppa ;;
> @@ -2126,13 +2126,20 @@
>  
>      ;;
>  
> -  alpha)
> +  alpha*)
>      _arch='ALPHA'
>      _target_arch='ARCH_ALPHA = yes'
>      iproc='alpha'
>      _march=''
>      
>      echocheck "CPU type"
> +    if test "$_target" ; then
> +      proc=`echo $_target | cut -d '-' -f 1 | cut -d '_' -f 2`
> +      _mcpu="$cpuopt=$proc"
> +      #it seems that there is a runtime detection for the MVI code
> +      cpu_understands_mvi="1";
> +    else  
> +      cat > $TMPC << EOF
>      cat > $TMPC << EOF

Duplicate?

>  int main() {
>      unsigned long ver, mask;
> @@ -2142,9 +2149,8 @@
>      return 0;
>  }
>  EOF
> -    $_cc -o "$TMPEXE" "$TMPC"
> -    case `"$TMPEXE"` in
> -
> +     $_cc -o "$TMPEXE" "$TMPC"
> +     case `"$TMPEXE"` in
>          0-0)    proc="ev4";   _mvi="0";;
>          1-0)    proc="ev5";   _mvi="0";;
>          1-1)    proc="ev56";  _mvi="0";;

Cosmetics.

> @@ -2152,7 +2158,8 @@
>          2-303)  proc="ev6";   _mvi="1";;
>          2-307)  proc="ev67";  _mvi="1";;
>          2-1307) proc="ev68";  _mvi="1";;
> -    esac
> +     esac
> +    fi
>      echores "$proc"
>      
>      echocheck "GCC & CPU optimization abilities"

The rest doesn't look bad, but someone with alpha (Mäns?) should test it.

Regards,
R.

-- 
MPlayer developer and RPMs maintainer: http://mplayerhq.hu http://rpm.livna.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
	-- from "Collected Sayings of Muad'Dib" by the Princess Irulan



More information about the MPlayer-dev-eng mailing list