[FFmpeg-devel] [PATCH 1/2] configure: disabled -mips64 option for loongson and remove redundant flags

周晓勇 zhouxiaoyong at loongson.cn
Tue May 12 12:20:48 CEST 2015




> -----原始邮件-----
> 发件人: "Michael Niedermayer" <michaelni at gmx.at>
> 发送时间: 2015年5月12日 星期二
> 收件人: "FFmpeg development discussions and patches" <ffmpeg-devel at ffmpeg.org>
> 抄送: 
> 主题: Re: [FFmpeg-devel] [PATCH 1/2] configure: disabled -mips64 option for loongson and remove redundant flags
> 
> On Tue, May 12, 2015 at 10:32:19AM +0800, 周晓勇 wrote:
> > 
> > 
> > 
> > > -----原始邮件-----
> > > 发件人: "Michael Niedermayer" <michaelni at gmx.at>
> > > 发送时间: 2015年5月11日 星期一
> > > 收件人: "FFmpeg development discussions and patches" <ffmpeg-devel at ffmpeg.org>
> > > 抄送: 
> > > 主题: Re: [FFmpeg-devel] [PATCH 1/2] configure: disabled -mips64 option for loongson and remove redundant flags
> > > 
> > > On Mon, May 11, 2015 at 12:38:46PM +0800, 周晓勇 wrote:
> > > > From 9837274dcee5e1900160901cf28d883246a7ecfb Mon Sep 17 00:00:00 2001
> > > > From: Zhou Xiaoyong <zhouxiaoyong at loongson.cn>
> > > > Date: Mon, 11 May 2015 03:28:52 -0400
> > > > Subject: [PATCH 1/2] configure: disabled -mips64 option for loongson and remove redundant flags
> > > > 
> > > > 1.Option -march=loongson3a conflicts with -mips64 or -mips64r2.
> > > > 2.Option -mhard-float has been added.
> > > > 
> > > > Signed-off-by: Zhou Xiaoyong <zhouxiaoyong at loongson.cn>
> > > > ---
> > > >  configure |    5 +----
> > > >  1 files changed, 1 insertions(+), 4 deletions(-)
> > > > 
> > > > diff --git a/configure b/configure
> > > > index 1b41367..7716e66 100755
> > > > --- a/configure
> > > > +++ b/configure
> > > > @@ -3937,7 +3937,6 @@ elif enabled mips; then
> > > >              enable fast_cmov
> > > >              enable fast_unaligned
> > > >              disable aligned_stack
> > > > -            cpuflags="-march=$cpu"
> > > >          ;;
> > > >          generic)
> > > >              disable mips32r5
> > > > @@ -4691,7 +4690,7 @@ elif enabled mips; then
> > > >      if enabled mips64 && (enabled mipsdspr1 || enabled mipsdspr2); then
> > > >          add_cflags "-mips64r2"
> > > >          add_asflags "-mips64r2"
> > > > -    elif enabled mips64 && enabled mipsfpu; then
> > > > +    elif enabled mips64 && enabled mipsfpu && disabled loongson3; then
> > > 
> > > this breaks build on mips:
> > > CC      libavcodec/ac3dec_fixed.o
> > > In file included from ffmpeg/libavcodec/ac3dec_fixed.c:169:
> > > ffmpeg/libavcodec/ac3dec.c: In function ‘ac3_decode_init’:
> > > ffmpeg/libavcodec/ac3dec.c:213: warning: ‘request_channels’ is deprecated (declared at ffmpeg/libavcodec/avcodec.h:2038)
> > > ffmpeg/libavcodec/ac3dec.c:215: warning: ‘request_channels’ is deprecated (declared at ffmpeg/libavcodec/avcodec.h:2038)
> > > /tmp/ccgKabta.s: Assembler messages:
> > > /tmp/ccgKabta.s:5229: Error: opcode not supported on this processor: mips32r2 (mips32r2) `dmult $25,$24'
> > > /tmp/ccgKabta.s:5231: Error: opcode not supported on this processor: mips32r2 (mips32r2) `dsrl $25,$25,32'
> > > 
> > > [...]
> > > 
> > 
> > weird, i have no problem with this patch. all pass except some fate.
> > ./configure --enable-gpl --cc='ccache gcc' --enable-pthreads --samples=/home/loongson/fate/ --enable-nonfree --enable-version3 --assert-level=2 --cpu=loongson3a
> 
> above was cross build for non loongson MIPS
> with mips-linux-gnu-gcc-4.4 (Debian 4.4.5-8) 4.4.5
> it works before the patch but not afterwards
> 
> 
> after the patch
> HAVE_LOONGSON3=yes
> 
> [...]

mips-linux-gnu-gcc-4.4 is not compatible with loongson OS FC-19, because the FC-19's API is O32. you could not use odd register of loongson cpu in O32 mode.
i do the test of cross-build in my x86 using our cross-compiler gcc-4.8.3-d197-o32-loongson with configure below:

./configure --enable-gpl --enable-pthreads --samples=/home/coffeez/fate/ --enable-nonfree --enable-version3 --assert-level=2 --enable-cross-compile --target-os=linux --cc=/home/xuchenghua/toolchain/cross-tools/gcc-4.8.3-d197-o32-loongson/usr/bin/mips64el-redhat-linux-gcc --host-cc=/usr/bin/gcc --host-ld=/home/xuchenghua/toolchain/cross-tools/gcc-4.8.3-d197-o32-loongson/usr/bin/mips64el-redhat-linux-ld --arch=mips --cpu=loongson3a --disable-doc

it pass all only at the end report ffserver error.

why disable doc?
it reported ld doc/print_option.o error.

what configure do you use when cross build?


More information about the ffmpeg-devel mailing list