All pastes #629486 Raw Edit

sh3-support.patch

public text v1 · immutable
·published 2007-07-22 10:49 UTC
rendered paste body
diff -ru mplayer-orig/configure mplayer/configure
--- mplayer-orig/configure	2007-07-22 13:39:51.000000000 +0300
+++ mplayer/configure	2007-07-22 13:46:32.000000000 +0300
@@ -158,6 +158,13 @@
   esac
 }
 
+sh3() {
+  case "$host_arch" in
+    sh3) return 0;;
+    *) return 1;;
+  esac
+}
+
 # not boolean test: implement the posix shell "!" operator for a
 # non-posix /bin/sh.
 #   usage:  not {command}
@@ -1188,7 +1195,7 @@
   # host's CPU/instruction set
    host_arch=`uname -p 2>&1`
    case "$host_arch" in
-   i386|sparc|ppc|alpha|arm|mips|vax)
+   i386|sparc|ppc|alpha|arm|mips|vax|sh3)
      ;;
    powerpc) # Darwin returns 'powerpc'
      host_arch=ppc
@@ -1217,6 +1224,7 @@
       sparc64) host_arch=sparc64 ;;
       parisc*|hppa*|9000*) host_arch=hppa ;;
       arm*|zaurus|cats) host_arch=arm ;;
+      sh3) host_arch=sh3 ;;
       s390) host_arch=s390 ;;
       s390x) host_arch=s390x ;;
       mips*) host_arch=mips ;;
@@ -1589,7 +1597,7 @@
 fi
 
 
-_arch_all='X86 X86_32 X86_64 IA64 SPARC ARM ARMV4L POWERPC PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX GENERIC'
+_arch_all='X86 X86_32 X86_64 IA64 SPARC ARM ARMV4L SH3 POWERPC PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX GENERIC'
 case "$host_arch" in
   i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686)
   _arch='X86 X86_32'
@@ -1962,6 +1970,16 @@
     _optimizing=''
     ;;
 
+  sh3)
+    _arch='SH3'
+    _target_arch='ARCH_SH3 = yes'
+    iproc='sh3'
+    proc=''
+    _march='-m3'
+    _mcpu='-ml'
+    _optimizing=''
+    ;;
+
   ppc|powerpc)
     _arch='POWERPC PPC'
     _def_dcbzl='#define NO_DCBZL 1'