Opened 7 years ago

Closed 5 years ago

#56041 closed enhancement (fixed)

Update compiler selection for 10.6-10.8 with libc++

Reported by: jmroot (Joshua Root) Owned by:
Priority: Normal Milestone: MacPorts 2.6.0
Component: base Version: 2.4.2
Keywords: Cc: mojca (Mojca Miklavec), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port:

Description

For this configuration on these systems, we need to at least default configure.cxx to a compiler that can use libc++. We probably also need some bootstrap (libstdc++ using) versions of toolchain ports so that the manual intervention described in LibcxxOnOlderSystems is not required.

Change History (9)

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Possibly related to #55444 and/or #56042.

comment:2 Changed 7 years ago by kencu (Ken)

how about something like this in portconfigure.tcl:

    # Determine which versions of clang we prefer
    if {${configure.cxx_stdlib} eq "libc++"} {
        # clang-3.5+ require libc++
        lappend compilers macports-clang-5.0 macports-clang-4.0

        if {${os.major} < 17} {
            # The High Sierra SDK requires a toolchain that can apply nullability to uuid_t
            lappend compilers macports-clang-3.9
        }

        if {${os.major} < 16} {
            # The Sierra SDK requires a toolchain that supports class properties
            lappend compilers macports-clang-3.7
        }

+        if {${os.major} < 13} {
+            # for older systems configured to libc++, return a current clang version
+            return macports-clang-5.0 macports-clang-4.0 macports-clang-3.9
+        }


    }
Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:3 Changed 7 years ago by kencu (Ken)

So - you'll notice that this forces all these systems 10.6 through 10.8 to basically build everything with clang-5.0. I just can't help but think this makes a lot of sense, removes our need to set up complicated compiler floors with certain c++ or C standard support available, and makes all these systems build with basically the same compiler that newer systems use (and are tested against, etc).

I realize that means that clang-5.0 will need to be called in for every build on these systems. But I submit that is a better option than the alternative of seeing builds fail with older builds of clang, and forcing them all up to something newer.

All these systems will end up with clang-5.0 anyway, for some port or another.

And it allows the default -stdlib to be set to libc++ in clang-5.0 for all systems, and have this carry through to all these older systems.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:4 Changed 7 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:5 Changed 7 years ago by mojca (Mojca Miklavec)

I assume that the list should still contain default compilers at the end, for bootstrapping reasons.

comment:6 Changed 7 years ago by neverpanic (Clemens Lang)

Milestone: MacPorts 2.5.0MacPorts 2.6.0

comment:7 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:8 in reply to:  5 Changed 6 years ago by jmroot (Joshua Root)

Replying to mojca:

I assume that the list should still contain default compilers at the end, for bootstrapping reasons.

Not needed if the bootstrap compilers set their own whitelist.

Note: See TracTickets for help on using tickets.