Opened 14 months ago

Last modified 8 months ago

#71669 new defect

macports-libcxx: uses older c++ headers on newer macports-clang compilers

Reported by: kencu (Ken) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mascguy (Christopher Nielsen), cooljeanius (Eric Gallager)
Port: macports-libcxx

Description (last modified by kencu (Ken))

currently, the macports-libcxx port copies the headers from clang11 that match the libcxx being used, modifies them slightly to override Apple’s availabilty tests that are based on system version, and installs them.

https://github.com/macports/macports-ports/blob/f9cde8c670027940c9b222eba81ccdc99d587f52/lang/macports-libcxx/Portfile#L51

legacysupport then forces these modified headers to be used:

https://github.com/macports/macports-ports/blob/f9cde8c670027940c9b222eba81ccdc99d587f52/_resources/port1.0/group/legacysupport-1.1.tcl#L183

(Ignore for the moment these are mistakenly being added to the cppflags instead of the cxxflags).

The end effect of this is that the headers being used by compilers newer than clang-11 are in fact older headers. This is not ideal.

Also, llvm and Apple have changed the way certain things are being done with respect to c++ headers, and these c++ headers are now being shipped with the system SDKs rather than with the llvm / clang compiler installation, so we’ll also need to ponder that fact too, if we decide to change something about how we do the header overrides in the future

Change History (3)

comment:1 Changed 14 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:2 Changed 14 months ago by kencu (Ken)

Description: modified (diff)

comment:3 Changed 8 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.