winlin

fix bug of mips

@@ -107,7 +107,7 @@ function Ubuntu_prepare() @@ -107,7 +107,7 @@ function Ubuntu_prepare()
107 107
108 # for arm, install the cross build tool chain. 108 # for arm, install the cross build tool chain.
109 if [ $SRS_ARM_UBUNTU12 = YES ]; then 109 if [ $SRS_ARM_UBUNTU12 = YES ]; then
110 - `$SrsArmCC` --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then 110 + `$SrsArmCC --help` >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
111 echo "install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi" 111 echo "install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi"
112 require_sudoer "sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi" 112 require_sudoer "sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi"
113 sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi 113 sudo apt-get install -y --force-yes gcc-arm-linux-gnueabi g++-arm-linux-gnueabi; ret=$?; if [[ 0 -ne $ret ]]; then return $ret; fi
@@ -117,7 +117,7 @@ function Ubuntu_prepare() @@ -117,7 +117,7 @@ function Ubuntu_prepare()
117 117
118 # for mips, user must installed the tool chain. 118 # for mips, user must installed the tool chain.
119 if [ $SRS_MIPS_UBUNTU12 = YES ]; then 119 if [ $SRS_MIPS_UBUNTU12 = YES ]; then
120 - `$SrsArmCC` --help >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then 120 + `$SrsArmCC --help` >/dev/null 2>&1; ret=$?; if [[ 0 -ne $ret ]]; then
121 echo "user must install the tool chain: $SrsArmCC" 121 echo "user must install the tool chain: $SrsArmCC"
122 return 2 122 return 2
123 fi 123 fi
@@ -140,6 +140,7 @@ Presets: @@ -140,6 +140,7 @@ Presets:
140 --x86-x64 [default] for x86/x64 cpu, common pc and servers. 140 --x86-x64 [default] for x86/x64 cpu, common pc and servers.
141 --pi for raspberry-pi(directly build), open features hls/ssl/static. 141 --pi for raspberry-pi(directly build), open features hls/ssl/static.
142 --arm alias for --with-arm-ubuntu12 142 --arm alias for --with-arm-ubuntu12
  143 + --mips alias for --with-mips-ubuntu12
143 --dev for dev, open all features, no gperf/gprof/arm. 144 --dev for dev, open all features, no gperf/gprof/arm.
144 --fast the most fast compile, nothing, only support vp6 RTMP. 145 --fast the most fast compile, nothing, only support vp6 RTMP.
145 --pure-rtmp only support RTMP with ssl. 146 --pure-rtmp only support RTMP with ssl.
@@ -147,13 +148,11 @@ Presets: @@ -147,13 +148,11 @@ Presets:
147 --disable-all disable all features, only support vp6 RTMP. 148 --disable-all disable all features, only support vp6 RTMP.
148 149
149 Conflicts: 150 Conflicts:
150 - 1. --dev/x86-x64 vs --static:  
151 - the --static only for arm cpus.  
152 - 2. --with-gmc vs --with-gmp: 151 + 1. --with-gmc vs --with-gmp:
153 @see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html 152 @see: http://google-perftools.googlecode.com/svn/trunk/doc/heap_checker.html
154 - 3. --with-gperf/gmc/gmp vs --with-gprof: 153 + 2. --with-gperf/gmc/gmp vs --with-gprof:
155 gperftools not compatible with gprof. 154 gperftools not compatible with gprof.
156 - 4. --arm vs --with-ffmpeg/bwtc/gperf/gmc/gmp/gprof: 155 + 3. --arm vs --with-ffmpeg/bwtc/gperf/gmc/gmp/gprof:
157 the complex tools not available for arm. 156 the complex tools not available for arm.
158 157
159 Experts: 158 Experts:
@@ -64,12 +64,12 @@ if [ $SRS_MIPS_UBUNTU12 = YES ]; then @@ -64,12 +64,12 @@ if [ $SRS_MIPS_UBUNTU12 = YES ]; then
64 __SrsArmRANDLIB="mipsel-openwrt-linux-ranlib"; 64 __SrsArmRANDLIB="mipsel-openwrt-linux-ranlib";
65 fi 65 fi
66 # the arm-ubuntu12 options for make for depends 66 # the arm-ubuntu12 options for make for depends
67 -if [[ -z $SrsArmCC ]]; then SrsArmCC=__SrsArmCC; fi  
68 -if [[ -z $SrsArmGCC ]]; then SrsArmGCC=__SrsArmGCC; fi  
69 -if [[ -z $SrsArmCXX ]]; then SrsArmCXX=__SrsArmCXX; fi  
70 -if [[ -z $SrsArmAR ]]; then SrsArmAR=__SrsArmAR; fi  
71 -if [[ -z $SrsArmLD ]]; then SrsArmLD=__SrsArmLD; fi  
72 -if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=__SrsArmRANDLIB; fi 67 +if [[ -z $SrsArmCC ]]; then SrsArmCC=$__SrsArmCC; fi
  68 +if [[ -z $SrsArmGCC ]]; then SrsArmGCC=$__SrsArmGCC; fi
  69 +if [[ -z $SrsArmCXX ]]; then SrsArmCXX=$__SrsArmCXX; fi
  70 +if [[ -z $SrsArmAR ]]; then SrsArmAR=$__SrsArmAR; fi
  71 +if [[ -z $SrsArmLD ]]; then SrsArmLD=$__SrsArmLD; fi
  72 +if [[ -z $SrsArmRANDLIB ]]; then SrsArmRANDLIB=$__SrsArmRANDLIB; fi
73 # write to source file 73 # write to source file
74 if [ $SRS_EMBEDED_CPU = YES ]; then 74 if [ $SRS_EMBEDED_CPU = YES ]; then
75 echo "cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB" 75 echo "cc=$SrsArmCC gcc=$SrsArmGCC g++=$SrsArmCXX ar=$SrsArmAR ld=$SrsArmLD randlib=$SrsArmRANDLIB"