[MacPorts] #67018: atlas uses cpu optimizing flags based on arch: ppc = G4, ppc64 = G5; the former needs not be correct

MacPorts noreply at macports.org
Tue Feb 28 19:29:00 UTC 2023


#67018: atlas uses cpu optimizing flags based on arch: ppc = G4, ppc64 = G5; the
former needs not be correct
--------------------------+----------------------
 Reporter:  barracuda156  |      Owner:  Veence
     Type:  defect        |     Status:  assigned
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.8.1
 Keywords:                |       Port:  atlas
--------------------------+----------------------
 {{{
 } elseif {${build_arch} eq "ppc"} {

     # PPC
     set gcc_flags           "-O3 -mcpu=7400 -mtune=7400\
                             -fno-schedule-insns -fschedule-insns2 -fPIC \
                             -force_cpusubtype_ALL"
     set clang_flags         "-O3 -arch ppc -fPIC"

     set gvct_flag           "-maltivec -mabi=altivec"
     set cvct_flag           "-maltivec"

     configure.args-append   -A 4

     # On Leopard, we may warn the user that ppc
     # is not as efficient as ppc64
     pre-fetch {
         if {${native_arch} eq "ppc64"} {

                 ui_msg "Compiling for ppc on a G5 machine.\
                         This could lead to reduced performance."
         }
     }

 } else {

     # PPC64
     set gcc_flags           "-mcpu=970 -mtune=970 -mvrsave -mpowerpc64\
                             -fno-schedule-insns -fschedule-insns2 -fPIC \
                             -force_cpusubtype_ALL"
     # Clang has no PPC64 target so compile for PPC
     set clang_flags         "-O3 -arch ppc -fPIC"

     set gvct_flag           "-maltivec -mabi=altivec"
     set cvct_flag           "-maltivec"
 }
 }}}

 While ppc64 requires G5, ppc can be either. It is desirable to have
 variants for both, so that the user can choose, or use -mtune=native (if
 old GCC supports that).
 What we have now gonna make suboptimal optimization on G5 when build is
 for ppc32 (which is most cases, as long as Macports goes).

-- 
Ticket URL: <https://trac.macports.org/ticket/67018>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list