vicim code, seems that GCC have problem with following code ./libavutil/arm/intmath.h:82 __asm__ ("usat %0, %2, %1" : "=r"(x) : "r"(a), "i"(p)); ./libavutil/arm/intmath.h:82:5: warning: asm operand 2 probably doesn’t match peconstraints ./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’ ./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’ ./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’ ./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’ ./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’ ./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’ ./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’ ./libavutil/arm/intmath.h:82:5: error: impossible constraint in ‘asm’ libswscale/swscale.c: In function ‘yuv2rgb_full_X_c_template.clone.13’: libswscale/swscale.c:1397:23: warning: ‘A’ may be used uninitialized in thish un function make: *** [libswscale/swscale.o] Error 1 Reproducible: Always
Created attachment 279831 [details] the full build log
Created attachment 279833 [details] config log
Created attachment 279835 [details] full gcc commands
panda ffmpeg_debug # cat swscale.c #include <stdio.h> #define av_always_inline __inline__ #define av_const const typedef unsigned short int16_t; static av_always_inline av_const unsigned av_clip_uintp2_arm(int a, int p) { unsigned x; __asm__ ("usat %0, %2, %1" : "=r"(x) : "r"(a), "i"(p)); return x; } int main(int argc, char *argv[]) { int a =23412; int b = 14; const c = av_clip_uintp2_arm(a, b); printf("c value : %d\n", c); return c; } panda ffmpeg_debug # armv7a-hardfloat-linux-gnueabi-gcc -o test swscale.c swscale.c: In function ‘av_clip_uintp2_arm’: swscale.c:10:5: warning: asm operand 2 probably doesn’t match constraints swscale.c:10:5: error: impossible constraint in ‘asm’ panda ffmpeg_debug # armv7a-hardfloat-linux-gnueabi-gcc -O2 -o test swscale.c panda ffmpeg_debug # file test test: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped
notice that using the same command/paramater as log file of "full gcc commands" it built successfully, which fail in that ffmpeg-9999 compile.. I'm a little bit confused. panda ffmpeg_debug # cat make.sh #!/bin/bash armv7a-hardfloat-linux-gnueabi-gcc -I. -I./ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DHAVE_AV_CONFIG_H -O2 -pipe -mfpu=neon -march=armv7-a -mtune=cortex-a9 -mfloat-abi=hard -march=armv7-a -std=c99 -marm -fPIC -pthread -Wdeclaration-after-statement -Wall -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes -MMD -MF swscale.d -MT swscale.o -c -o swscale.o swscale.c panda ffmpeg_debug # ./make.sh swscale.c: In function ‘main’: swscale.c:18:8: warning: type defaults to ‘int’ in declaration of ‘c’ panda ffmpeg_debug # file swscale.o swscale.o: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped panda ffmpeg_debug #
Please post "emerge --info" output
Created attachment 279879 [details] emerge --info
Could you please try libav-9999 and report back? as you can see in http://fate.libav.org everything seems working correctly.
yeah, I saw that fate.libav.org. also I test with libav-9999, it compile success with --enable-neon --disable-armvfp, but media-video/xine-lib have problem with libav-9999, so I downgrade ..
armv7a-hardfloat-linux-gnueabi-gcc -I. -I. -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS= 64 -D_LARGEFILE_SOURCE -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DHAVE _AV_CONFIG_H -O2 -pipe -mfpu=neon -march=armv7-a -mtune=cortex-a9 -mfloat-abi=ha rd -march=armv7-a -std=c99 -fomit-frame-pointer -marm -fPIC -pthread -Wdeclarat ion-after-statement -Wall -Wno-parentheses -Wno-switch -Wno-format-zero-length - Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wno-pointer-sign -Wcas t-qual -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -O3 -fno-math- errno -fno-signed-zeros -fno-tree-vectorize -Werror=implicit-function-declaration -Werror=missing-prototypes -MMD -MF libavdevice/fbdev.d -MT libavdevice/fbdev .o -c -o libavdevice/fbdev.o libavdevice/fbdev.c libavdevice/fbdev.c: In function ‘fbdev_read_header’: libavdevice/fbdev.c:111:5: warning: ‘time_base’ is deprecated (declared at .ITS=/libavformat/avformat.h:245) libavdevice/fbdev.c:112:9: warning: ‘time_base’ is deprecated (declared at .i=ha/libavformat/avformat.h:245) libavdevice/fbdev.c:112:9: warning: ‘time_base’ is deprecated (declared at .th -/libavformat/avformat.h:245) compile success, note libavdevice/fbdev.c will include libavutil/arm/intmath.h while libavutil/arm/intmath.h have the same "usat" instruction as ffmpeg.. I'm getting confused...
should be fixed in 0.9 / 9999