[MacPorts] #53605: get GCC to use libc++?

MacPorts noreply at macports.org
Sun Feb 19 19:02:44 UTC 2017


#53605: get GCC to use libc++?
------------------------+-----------------
  Reporter:  RJVB       |      Owner:
      Type:  request    |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:
Resolution:             |   Keywords:
      Port:  gcc6 gcc7  |
------------------------+-----------------

Comment (by RJVB):

 Getting GCC to use libc++ instead of libstdc++ is probably not so very
 difficult as just a matter of setting the `LIBSTDCXX` macro appropriately.
 That would be possible with a `-DLIBSTDCXX=c++` compiler option if it
 weren't for the fact that we also may need to link to libc++abi.

 Do we, in fact?

 I'm building gcc6 now with a patch that should make it use `-lc++
 -lc++abi` instead of `-lstdc++`.

 For the headers it's a bit more complicated as their path isn't hardcoded
 in a way that can be patched easily, but generated dynamically. As a
 result, it'll be easier to replace the whole `${prefix}/include/gccN/c++`
 directory with a symlink to the corresponding clang/llvm/libc++ directory.

 And those have to be from a port:clang-xy install; at least GCC6 won't
 work with the headers from Xcode for OS X 10.9 .

--
Ticket URL: <https://trac.macports.org/ticket/53605#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list