Error while using -fblocks with clang and mingw


i try to compile a small test programm with clang and the command line
option -fblocks.

clang -m32 -march=i686 -D__COCOTRON__ -DWINDOWS -D_GNU_SOURCE
-D__LITTLE_ENDIAN__ -D_FORTIFY_SOURCE=1 -x objective-c -fobjc-exceptions
-fconstant-string-class=NSConstantString -O2 -Wno-unknown-pragmas
-fmessage-length=0 --std=c99 -pipe
-I../Cocotron/headers -fblocks -c main.m
x86_64-w64-mingw32-gcc.exe: error: unrecognized command line option
clang: error: assembler (via gcc) command failed with exit code 1 (use
-v to see invocation)
mingw32-make: *** [main.o] Error 1

Is this a mingw problem?


Stefan Hertenberger


(-llvm-dev, +cfe-dev, better to cfe-users?)

It's known bug.


1) Add -integrated-as
2) Don't use clang's gcc-as driver.
  $ clang -S -o xxx.s
  $ gcc -c xxx.s

I have no idea -fblocks would work for mingw.


Hello Takumi,

thank you for the reply :wink: sorry for using the wrong mailing list.

-integreted-as fixed the issue.

Regards Stefan