[MacPorts] #24778: please add mcpu (march is only for x86)

MacPorts noreply at macports.org
Sat May 8 17:51:28 PDT 2010


#24778: please add mcpu (march is only for x86)
------------------------------------------+---------------------------------
 Reporter:  randomshinichi4869@…          |       Owner:  macports-tickets@…                   
     Type:  enhancement                   |      Status:  new                                  
 Priority:  Normal                        |   Milestone:                                       
Component:  base                          |     Version:                                       
 Keywords:                                |        Port:                                       
------------------------------------------+---------------------------------

Comment(by randomshinichi4869@…):

 Well, the problem here is that there is march for x86, but nothing
 equivalent for PowerPC, which needs mcpu for the same thing. A
 configure.march that issues -mcpu or -march depending on architecture
 would be nice, as long as you put a comment after it saying that it does
 that. In any case, the message that says it could be global configurable
 seems to have been there for ages - there simply isn't any excuse, seeing
 as there's already a march option.

 Anyway, I managed to cram -mcpu=G5 into configure.optflags.

 {{{
 # We could have debug/optimizations be global configurable at some point.
 options configure.optflags configure.cflags configure.cppflags
 configure.cxxflags configure.objcflags configure.ldflags
 configure.libs configure.fflags configure.f90flags configure.fcflags
 configure.classpath
 default configure.optflags  {"-O2 -mcpu=G5 -mno-powerpc64"}
 }}}

 The -mno-powerpc64 is needed because as of the gcc included in Xcode 3.1.4
 -mcpu=G5 gives you -mpowerpc64 as well, which breaks stuff, e.g. htop
 terminates with a Bus Error if you try to sort the process list, and
 somebody on the internet reported povray segfaulting. Nobody needs 64bit
 htop anyway.

 htop now takes less CPU (it was about 4-6% before, now mostly 0,
 occasionally jumping up to 2%) which I like because a CPU usage tool has
 no business hogging CPU cycles for itself. I guess this may seems little
 gentoo-ricer-ish.

-- 
Ticket URL: <http://trac.macports.org/ticket/24778#comment:8>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list