compilers on Lion
ken.cunningham.webuse at gmail.com
Sun Sep 9 07:33:04 UTC 2018
On 2018-09-08, at 10:45 PM, Werner LEMBERG wrote:
> What about adding this your explanation to the `LibcxxOnOlderSystems'
> page? In particular, people who are mainly interested in porting C++
> GNU software to the Mac (and using it, of course) should rather stay
> with libstdc++, if I understand you correctly. lilypond, for example,
> is a command line program and doesn't need any of the special Mac
No doubt, the best thing would be to see what is needed to make it compile with clang against libc++.
However, if that is not possible, and if the software doesn't provide any c++ libraries or use any c++ libraries , you can build it with gcc and link it against libstdc++ and it will work and be internally consistent in it's own environment.
>> There _is_ indeed a way for gcc to build against libc++, as you
>> pointed out in a subsequent email, and one of our contributors
>> (Rene) went to the trouble of patching gcc to allow it to accept the
>> "-stdlib=libc++" flag to make this easy. But in the end, he could
>> not get any purchase for his work either from MacPorts or from gcc,
>> and so it went dormant.
> Please post a link. Is Rene's patch integrated into macports?
I think this is all of it <https://github.com/RJVB/macstrop/blob/master/lang/gcc6/files/patch-use-libcxx.diff>. There may be some more to it in the associated Portfile. Rene would be happy to hear someone found a good use for it.
It is not integrated into macports -- we tend to be very conservative with toolchain tweaks in case of unforeseen disasters. I know he talked with gcc about it, not sure where that all went.
More information about the macports-users