Changing default cxx_stdlib to libc++

Kenneth F. Cunningham ken.cunningham.webuse at gmail.com
Sat Mar 10 17:06:12 UTC 2018


On 2018-03-10, at 3:38 AM, db wrote:


> How will I know about the lib change and the availability of binaries? Besides rebuilding from source from time to time, I only do port sync.

I think I"m likely not going to change anything on my LibcxxOnOlderSystems 10.6.8 system for a while, db. It will continue to work just as it does now, and I don't mind building from source -- kinda got used to it. So there will be no difference at all. I'll probably keep building against a current lib curl installed via /opt/bootstrap as well, just 'cause it works.

However, at some point in the next few months, when most of the dust has settled and most or all of the available binaries are all properly built against libc++, I'll change the single line in macports.conf from "buildfromsource always" to "buildfromsource if needed" , and get some prebuilt binaries. This will be nice for the real big ones, like octave and llvm and clang and qt4 etc.

The real benefit to older systems will be supporting them. If it all goes as planned, there should be considerably less work to do to fix odd errors that show up on older compilers. I may be able to roll out the webkit2gtk fixes I have that work on libc++ but are just too much of a PITA to sort out against gcc7's libstdc++.

All ports will build with a version of clang similar to a 10.13 system's clang, and against libc++. 

The only hiccups should be deficiencies in the SDK, libc, and some Xcode things -- libc we can fix most of, the rest is  -- well -- every system has to die sometime.

I would like to see clang set up on these systems to default to adding -stdlib=libc++ if it's not otherwise specified on the build line, like newer systems do -- but even if  that isn't allowable, there should be a marked reduction in fixing ancient headers / outdated compiler capabilities, etc

Best,

Ken


More information about the macports-dev mailing list