Compiling software with c++11 support
Jeremy Huddleston Sequoia
jeremyhu at macports.org
Wed Sep 11 21:11:19 PDT 2013
On Sep 11, 2013, at 18:47, Eric A. Borisch <eborisch at macports.org> wrote:
> On Wednesday, September 11, 2013, William Gallafent wrote:
> Hi Eric,
> On 11 September 2013 17:05, Eric A. Borisch <eborisch at macports.org> wrote:
> > It's being worked on. If you run off of trunk, you can try it out:
> > https://lists.macosforge.org/pipermail/macports-dev/2013-August/024161.html
> Excellent! I notice that this allows one to set which runtime to use
> (e.g. -stdlib=libstdc++ or -stdlib=libc++), but I don't see mention of
> being able to set the language dialect (e.g. -std=c++03 or
> -std=c++11). Do the changes being made also allow that?
> No, but for the case descibed by Jakub (want mp libs linked against libc++, enabling using clang and c++11 for your own further development) should (to my understanding, please correct me if I'm wrong) be enabled by this change.
Yes, indeed it should. An app compiled with lang=c++11 can link against a library compilerd with lang=c++89 and using stdlib=libc++. The runtime library is the key point here (not the language version). The use of libc++ (or a newer libstdc++) enables support for C++11 features in the relevant compilers.
> As mentioned elsewhere in this email chain, it's not intended to be a supported switch for users, it's a tool to help developers with transitioning to a future where everything MP is libc++. Buyer beware. ;)
Yes, very much so. It works well enough for me on my test VMs that I'm probably going to flip that switch on more of my "real" machines, but it is *VERY* new. You can probably count the number of developers and users enabling that on a single hand ;)
As mentioned before, please do report bugs with patches (and CC me on them). Most autoconf and cmake based ports sould "just work" ... other ports will likely need updates similar to what we did for boost or ld64. Just grep for 'cxx_stdlib' in dports and you'll see them.
> - Eric
> Eric A. Borisch
> macports-users mailing list
> macports-users at lists.macosforge.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4145 bytes
Desc: not available
More information about the macports-users