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

周晓勇 zhouxiaoyong at loongson.cn
Tue May 12 04:32:19 CEST 2015




> -----原始邮件-----
> 发件人: "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

1.when testing on FC19-O32 system, config.mak list as:

CC_IDENT=gcc 4.8.3 (GCC) 20140624 (Red Hat 4.8.3-1)
ARCH=mips
CPPFLAGS= -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST
CFLAGS=   -march=loongson3a -std=c99 -fomit-frame-pointer -fPIC -mhard-float -pthread -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL  -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fdiagnostics-color=auto -Wno-maybe-uninitialized
CXXFLAGS=  -D__STDC_CONSTANT_MACROS
ASFLAGS=   -march=loongson3a -fPIC -mhard-float -g
ARCH_MIPS=yes
!ARCH_MIPS64=yes
HAVE_MIPSFPU=yes
!HAVE_MIPS32R2=yes
!HAVE_MIPS32R5=yes
!HAVE_MIPS64R6=yes
!HAVE_MIPSDSPR1=yes
!HAVE_MIPSDSPR2=yes
!HAVE_MSA=yes
HAVE_LOONGSON3=yes
!HAVE_ALIGNED_STACK=yes
HAVE_FAST_64BIT=yes
HAVE_FAST_CLZ=yes
HAVE_FAST_CMOV=yes
HAVE_LOCAL_ALIGNED_8=yes
HAVE_LOCAL_ALIGNED_16=yes
!HAVE_LOCAL_ALIGNED_32=yes
HAVE_SIMD_ALIGN_16=yes

2.when testing on CentOS-N64 system, config.mak list as:

CC_IDENT=gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3.1)
ARCH=mips
CPPFLAGS= -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DZLIB_CONST
CFLAGS=   -march=loongson3a -std=c99 -fomit-frame-pointer -fPIC -mhard-float -pthread  -g -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -O3 -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat
CXXFLAGS=  -D__STDC_CONSTANT_MACROS
ASFLAGS=   -march=loongson3a -fPIC -mhard-float -g
ARCH_MIPS=yes
ARCH_MIPS64=yes
HAVE_MIPSFPU=yes
!HAVE_MIPS32R2=yes
!HAVE_MIPS32R5=yes
!HAVE_MIPS64R6=yes
!HAVE_MIPSDSPR1=yes
!HAVE_MIPSDSPR2=yes
!HAVE_MSA=yes
HAVE_LOONGSON3=yes
!HAVE_ALIGNED_STACK=yes
HAVE_FAST_64BIT=yes
HAVE_FAST_CLZ=yes
HAVE_FAST_CMOV=yes
HAVE_LOCAL_ALIGNED_8=yes
HAVE_LOCAL_ALIGNED_16=yes
!HAVE_LOCAL_ALIGNED_32=yes
HAVE_SIMD_ALIGN_16=yes



More information about the ffmpeg-devel mailing list