watery01 / libyuv

Automatically exported from code.google.com/p/libyuv
0 stars 0 forks source link

scale build error on mingw in libvpx/webm #243

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
https://groups.google.com/a/webmproject.org/forum/#!msg/webm-discuss/S1hUvsNLR4I
/HIIoRjJWCz4J

c:\src\libvpx\third_party\libyuv\source>gcc -m64 -c -I ../../.. scale.c

c:\src\libvpx\third_party\libyuv\source>gcc -m32 -c -I ../../.. scale.c
scale.c:642:32: warning: 'naked' attribute directive ignored [-Wattributes]
                                uint8* dst_ptr, int dst_width) {
                                ^
scale.c: In function 'ScaleRowDown2_SSE2':
scale.c:643:9: error: expected '(' before '{' token
   __asm {
         ^
scale.c:644:5: error: unknown type name 'mov'
     mov        eax, [esp + 4]        // src_ptr
     ^

Original issue reported on code.google.com by fbarch...@google.com on 4 Jun 2013 at 4:48

GoogleCodeExporter commented 9 years ago
The macro _M_IX86 is now set by gcc 4.8, as well as Visual C.

Change defined(_M_IX86)
To defined(_M_IX86) && defined(_MSC_VER)

Original comment by fbarch...@google.com on 4 Jun 2013 at 5:24

GoogleCodeExporter commented 9 years ago
d:\src\libyuv2\trunk\source>gcc -m32 -c -I ../include scale.cc
scale.cc:188:61: warning: 'naked' attribute directive ignored [-Wattributes]
                                uint8* dst_ptr, int dst_width) {
                                                             ^
scale.cc:188:61: warning: 'align' attribute directive ignored [-Wattributes]
scale.cc: In function 'void libyuv::ScaleRowDown2_SSE2(const uint8*, ptrdiff_t, 
uint8*, int)':
scale.cc:189:9: error: expected '(' before '{' token
   __asm {

Locally testable with:
gcc -m32 -c -I ../include compare.cc
gcc -m32 -c -I ../include compare_common.cc
gcc -m32 -c -I ../include compare_neon.cc
gcc -m32 -c -I ../include compare_posix.cc
gcc -m32 -c -I ../include compare_win.cc
gcc -m32 -c -I ../include convert.cc
gcc -m32 -c -I ../include convert_argb.cc
gcc -m32 -c -I ../include convert_from.cc
gcc -m32 -c -I ../include convert_from_argb.cc
gcc -m32 -c -I ../include convert_jpeg.cc
gcc -m32 -c -I ../include convert_to_argb.cc
gcc -m32 -c -I ../include convert_to_i420.cc
gcc -m32 -c -I ../include cpu_id.cc
gcc -m32 -c -I ../include format_conversion.cc
gcc -m32 -c -I ../include mjpeg_decoder.cc
gcc -m32 -c -I ../include mjpeg_validate.cc
gcc -m32 -c -I ../include planar_functions.cc
gcc -m32 -c -I ../include rotate.cc
gcc -m32 -c -I ../include rotate_argb.cc
gcc -m32 -c -I ../include rotate_mips.cc
gcc -m32 -c -I ../include rotate_neon.cc
gcc -m32 -c -I ../include row_any.cc
gcc -m32 -c -I ../include row_common.cc
gcc -m32 -c -I ../include row_mips.cc
gcc -m32 -c -I ../include row_neon.cc
gcc -m32 -c -I ../include row_posix.cc
gcc -m32 -c -I ../include row_win.cc
gcc -m32 -c -I ../include scale.cc
gcc -m32 -c -I ../include scale_argb.cc
gcc -m32 -c -I ../include scale_argb_neon.cc
gcc -m32 -c -I ../include scale_mips.cc
gcc -m32 -c -I ../include scale_neon.cc
gcc -m32 -c -I ../include video_common.cc
         ^

Original comment by fbarch...@google.com on 4 Jun 2013 at 5:44

GoogleCodeExporter commented 9 years ago
Fixed in r717

Original comment by fbarch...@google.com on 4 Jun 2013 at 6:06