Opened 15 months ago

Last modified 15 months ago

#67018 assigned defect

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

Reported by: barracuda156 Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: powerpc Cc:
Port: atlas

Description

} 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).

Change History (1)

comment:1 Changed 15 months ago by barracuda156

Keywords: powerpc added
Note: See TracTickets for help on using tickets.