[cfe-dev] [LLVMdev] Error while using -fblocks with clang and mingw

NAKAMURA Takumi geek4civic at gmail.com
Mon Dec 3 01:40:35 PST 2012


Stefan,

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

It's known bug.
http://llvm.org/bugs/show_bug.cgi?id=12920

Workaround:

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.

...Takumi


2012/12/1 Stefan Hertenberger <erde74 at googlemail.com>:
> Hello,
>
> 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
> -Ic:/devel/tools/mingw64/lib/gcc/x86_64-w64-mingw32/4.7.1/include
> -I../Cocotron/headers -fblocks -c main.m
> x86_64-w64-mingw32-gcc.exe: error: unrecognized command line option
> '-fblocks'
> 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?
>
> Regards
>
> Stefan Hertenberger
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev



More information about the cfe-dev mailing list