[cfe-dev] MinGW build does not compile with C++11
Rafael EspĂndola
rafael.espindola at gmail.com
Tue Mar 11 12:22:04 PDT 2014
> It is. I recently ran into this problem and patching with the following allows
> a full build of LLVM/Clang for i686-mingw32 host (GCC 4.7.2):
>
> --- Makefile.rules (revision 203598)
> +++ Makefile.rules (working copy)
> @@ -322,7 +322,13 @@ endif
> ifeq ($(ENABLE_CXX1Y),1)
> CXX.Flags += -std=c++1y
> else
> - CXX.Flags += -std=c++11
> + ifeq ($(HOST_OS),MingW)
> + # MinGW is a bit stricter and lacks things like
> + # 'strdup', 'stricmp', etc...
> + CXX.Flags += -std=gnu++11
> + else
> + CXX.Flags += -std=c++11
> + endif
> endif
>
> I am happy to apply the above if others are OK with it.
> I am currently interested in using mingw32.
We should change cmake too I think.
Would anyone object to applying the patch to keep mingw32 working?
Even if we make mingw-w64 the preferred solution, that is such a small
patch I wouldn't have a problem with it.
Cheers,
Rafael
More information about the cfe-dev
mailing list