jaqquery / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

cpu_id fails to compile with 32-bit mingw-w64 #349

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use i686-w64-mingw32-g++ to compile cpu_id.cc

$ i686-w64-mingw32-g++ -I include source/cpu_id.cc -c -o /dev/null
source/cpu_id.cc: In function ‘int libyuv::TestOsSaveYmm()’:
source/cpu_id.cc:101:9: error: expected ‘(’ before ‘{’ token
source/cpu_id.cc:102:5: error: expected primary-expression before ‘xor’ 
token
source/cpu_id.cc:102:16: error: ‘ecx’ was not declared in this scope
source/cpu_id.cc:103:5: error: expected ‘;’ before ‘_asm’

What is the expected output? What do you see instead?
Compiles successfully. Build failure.

What version of the product are you using? On what operating system?
r1046

Please provide any additional information below.
mingw's windows.h defines _M_IX86, but it doesn't support VS-style inline 
assembly. Potential fix attached.

Original issue reported on code.google.com by jz...@google.com on 15 Aug 2014 at 10:06

Attachments:

GoogleCodeExporter commented 8 years ago
Confirmed.  This works:
c:\mingw64\bin\x86_64-w64-mingw32-c++.exe -I include source/cpu_id.cc -c -o 
cpu_id.o
but this fails
c:\mingw64\bin\x86_64-w64-mingw32-c++.exe -m32 -I include source/cpu_id.cc -c 
-o cpu_id.o

Original comment by fbarch...@google.com on 18 Aug 2014 at 11:32

GoogleCodeExporter commented 8 years ago
fixed in r1049

Original comment by fbarch...@google.com on 18 Aug 2014 at 11:53

GoogleCodeExporter commented 8 years ago

Original comment by fbarch...@google.com on 18 Aug 2014 at 11:53