Boost logo

Boost :

Subject: [boost] clang on mingw (was: libcpp.hpp always defines BOOST_NO_CXX11_HDR_ATOMIC)
From: Peter Dimov (lists_at_[hidden])
Date: 2014-03-03 17:05:11


> http://llvm.org/bugs/show_bug.cgi?id=18997

I got a response on this ticket; there was an ABI change in the MinGW
version of g++, which is why the 3.4 version of LLVM/Clang doesn't work with
mingw-g++ 4.8.1. (I actually knew that - the earlier versions crashed on
some shared_ptr tests involving virtual base classes, and 4.8 no longer
does - but didn't connect the dots.)

The suggestion was to switch to Clang 3.5 from SVN, and I tried, but the
official MinGW g++ from mingw.org, the one mingw-get installs and that I
use, didn't work, due to a missing off_t definition. The other MingGW,
mingw-w64, worked. Not out of the box though; see the ticket where I've
listed the two trivial fixes that I needed to make.

And the resulting clang++.exe does actually compile and pass all smart_ptr
tests. It also appears to support threads just fine. The only problem is
that clang-linux.jam passes -mthreads to it, whereas the correct option
is -pthread.

So that's good, on one hand - it's possible to use clang on Windows, if only
for testing purposes - and not so good, on another, since this configuration
is obviously neither tested nor supported by the Clang developers, or they'd
have seen and fixed the build errors. :-)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk