Ticket #59717: patch-portconfigure-properly-support-less-than-snowleopard.diff

File patch-portconfigure-properly-support-less-than-snowleopard.diff, 1.2 KB (added by kencu (Ken), 4 months ago)

Patch for base portconfigure.tcl to have base not select an inappropriate clang compiler for c++11 when systems are not configured for libc++

  • lib/port1.0/portconfigure.tcl

    diff --git lib/port1.0/portconfigure.tcl lib/port1.0/portconfigure.tcl
    index 17a7cf6..3dbb6e0 100644
    proc portconfigure::get_min_clang {} { 
    868868    if {${compiler.cxx_standard} >= 2017} {
    869869        set min_value [max_version $min_value 5.0]
    870870    } elseif {${compiler.cxx_standard} >= 2014} {
    871         set min_value [max_version $min_value 3.4]
     871        if {[option configure.cxx_stdlib] eq "libc++"} {
     872            set min_value [max_version $min_value 3.4]
     873        } else {
     874            # macports-clang compilers >= 3.8 support macports-libstdc++
     875            set min_value [max_version $min_value 3.8]
     876        }
    872877    } elseif {${compiler.cxx_standard} >= 2011} {
    873         set min_value [max_version $min_value 3.3]
     878        if {[option configure.cxx_stdlib] eq "libc++"} {
     879            set min_value [max_version $min_value 3.3]
     880        } else {
     881            # macports-clang compilers >= 3.8 support macports-libstdc++
     882            set min_value [max_version $min_value 3.8]
     883        }
    874884    }
    875885    if {[vercmp ${compiler.openmp_version} 4.0] >= 0} {
    876886        set min_value [max_version $min_value 6.0]