Tail end of output of CFLAGS="-O2 -ftracer" emerge =ffmpeg-20080206 or =ffmpeg-20080326 x86_64-pc-linux-gnu-gcc -O2 -ftracer -DBROKEN_RELOCATIONS -pthread -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -fno-math-errno -fno-signed-zeros -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg" -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg" -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libavutil -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libavcodec -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libavformat -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libswscale -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libavdevice -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libavfilter -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -DHAVE_AV_CONFIG_H -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg" -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg" -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libavcodec -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libavdevice -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libavfilter -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libavformat -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libavutil -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libpostproc -I"/var/tmp/portage/media-video/ffmpeg-0.4.9_p20080326/work/ffmpeg"/libswscale -O2 -ftracer -DBROKEN_RELOCATIONS -pthread -Wdeclaration-after-statement -Wall -Wno-switch -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -fno-math-errno -fno-signed-zeros -fPIC -DPIC -c -o i386/mpegvideo_mmx.o i386/mpegvideo_mmx.c i386/mpegvideo_mmx.c: Assembler messages: i386/mpegvideo_mmx.c:61: Error: suffix or operands invalid for `movd'
Fails in the same way for unmasked ebuild, so changed summary. Maybe this should block bug 198121?
-ftracer is not among the officially supported c(xx)flags on Gentoo, so if it breaks something, you get to keep the pieces ;-)
(In reply to comment #2) > -ftracer is not among the officially supported c(xx)flags on Gentoo, so if it > breaks something, you get to keep the pieces ;-) > Gentoo has always used this excuse they refuse to support it if they do not use it on there systems. If a package is known to have an issue like ffmpeg it should be filters but they rather close as wontfix.
I should also not from flag-o-matic eclass # Remove particular <flags> from {C,CPP,CXX}FLAGS. Accepts shell globs. filter-flags() { _filter-hardened "$@" _filter-var CFLAGS "$@" _filter-var CPPFLAGS "$@" _filter-var CXXFLAGS "$@" return 0 }
I have the same problem. Why can't you add ftracer to the filtered list? Isn't that what it's for?
does it fail with gcc 4.2 ? are we trying to hide a gcc bug or is ffmpeg at fault ? imho flag filtering should be used for extreme cases since it often gets forgotten when the real bug is fixed.
reopening as I've been able to reproduce it so we can keep track of this
reassigning as this seems a gcc 4.3 bug
Created attachment 163132 [details] testcase $ gcc -c -O2 testcase-min.i testcase-min.i:18: warning: ‘struct MpegEncContext’ declared inside parameter list testcase-min.i:18: warning: its scope is only this definition or declaration, which is probably not what you want testcase-min.i: In function ‘MPV_common_init_mmx’: testcase-min.i:35: warning: assignment from incompatible pointer type -> works $ gcc -c -O2 -ftracer testcase-min.i testcase-min.i:18: warning: ‘struct MpegEncContext’ declared inside parameter list testcase-min.i:18: warning: its scope is only this definition or declaration, which is probably not what you want testcase-min.i: In function ‘MPV_common_init_mmx’: testcase-min.i:35: warning: assignment from incompatible pointer type testcase-min.i: Assembler messages: testcase-min.i:27: Error: suffix or operands invalid for `movd' -> fail $ gcc -c -O1 -ftracer testcase-min.i testcase-min.i:18: warning: ‘struct MpegEncContext’ declared inside parameter list testcase-min.i:18: warning: its scope is only this definition or declaration, which is probably not what you want testcase-min.i: In function ‘MPV_common_init_mmx’: testcase-min.i:35: warning: assignment from incompatible pointer type -> works this is probably worth reporting to gcc upstream but toolchain people will have to teach me how first :p I obtained this testcase by playing with the delta tool and following instructions from: http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
Created attachment 163134 [details] smaller manually reduced testcase previous logs were with gcc 4.3.1: gcc (Gentoo 4.3.1-r1 p1.1) 4.3.1 now trying with debian's gcc: gcc-4.3 (Debian 4.3.1-9) 4.3.1 fails the same way gcc-4.2 (GCC) 4.2.4 (Debian 4.2.4-3) does not fail
ffmpeg is broken the asm you posted was: asm volatile( "movd %2, %%mm5\n" : :"r" (nCoeffs), "g"(qmul), "g" (qadd), "r" (2*(-nCoeffs)) ); the "g" constraint says: Any register, memory or immediate integer operand is allowed, except for registers that are not general registers. clearly an immediate integer is not allowed with a movd instruction
(In reply to comment #11) > ffmpeg is broken > > the asm you posted was: > asm volatile( > "movd %2, %%mm5\n" > : :"r" (nCoeffs), "g"(qmul), "g" (qadd), "r" (2*(-nCoeffs)) > ); > > the "g" constraint says: > Any register, memory or immediate integer operand is allowed, except for > registers that are not general registers. > > clearly an immediate integer is not allowed with a movd instruction Doh! Stupid me, I didn't even check the validity of the constraints :/ Thanks. Sent a patch upstream for that, let's wait for their opinions.
*** Bug 236697 has been marked as a duplicate of this bug. ***
please try with that patch: http://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec/i386/mpegvideo_mmx.c?r1=13098&r2=14941 it should make the problems go away still needs to be backported though
so that patch works for me to make a successful compile. thanks!
fixed in 0.4.9_p20081014 (still masked though)