[MacPorts] #62426: libc++: using a newer libc++ to build software on older macos systems

MacPorts noreply at macports.org
Sat Apr 24 18:08:04 UTC 2021


#62426: libc++: using a newer libc++ to build software on older macos systems
-------------------------------------+----------------------
  Reporter:  kencu                   |      Owner:  kencu
      Type:  enhancement             |     Status:  assigned
  Priority:  Normal                  |  Milestone:
 Component:  ports                   |    Version:
Resolution:                          |   Keywords:
      Port:  libcxx macports-libcxx  |
-------------------------------------+----------------------

Comment (by kencu):

 you should not need to use any reexporting symbols tricks with this, and
 no proxy libraries. Just change the clang++ includes and default libc++
 with the minor flag tweaks, and have at 'er. Your mame port is probably an
 early candidate, perhaps.

 you can think of this as being similar (identical) to the way that MacOS
 has /usr/lib/libstdc++.dylib for gcc to use, and then years ago we
 installed /opt/local/lib/libgcc/libstdc++.dylib for newer gcc versions to
 use instead. When built, the software is linked against the one specified,
 and unless you force it, it will always use that.

 You can force it with DYLD_LIBRARY_PATH or install_name_tool -- I have to
 check  exactly how DYLD_LIBRARY_PATH does or does not function on newer OS
 versions, as it changed at a certain point for security reasons -- (it was
 not supposed to work any more, but still seems to? -- but I digress).

 Could we make ALL of MacPorts use the new libc++/libc++abi instead of the
 one in /usr/local, eg on 10.7 through 10.11? You know, we probably could
 do that, if we were suitably motivated to do so and worked out the
 bootstrapping involved to get it there. But I don't think we are near
 there yet, as so far, AFAIK, no software actually uses this new
 libc++.dylib yet (other than the several ports I have built with it as
 demonstrators).

 If we get a number of ports using this newer libc++, then we could put in
 the work to make a new target, like -stdlib=macports-libc++ or something,
 and alter our clang builds to respect that like Marcus did with -stdlib
 =macports-libstdc++, and make a portgroup, complicate base further, etc
 etc, but we're a long way from putting in that work, IMHO.

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


More information about the macports-tickets mailing list