Thread: CPUFLAGS
View Single Post
  #1   (View Single Post)  
Old 12th July 2015
bashrules's Avatar
bashrules bashrules is offline
Aspiring Unix Greybeard
 
Join Date: Mar 2010
Location: Here
Posts: 80
Default CPUFLAGS

How do I pass cpu flags to pkgsrc, say, something like -march=corei7?

Man mk.conf suggests to use "CPUFLAGS", but it's not implemented in pkgsrc:

Code:
$ grep -R CPUFLAGS /usr/pkgsrc/mk/
$
A hack would be to add them to CFLAGS, e.g.

Code:
CFLAGS+=-march=corei7
but some packages mess around with CFLAGS and remove my -march, e.g. xv

Code:
$ grep -R corei7 /tmp/pkgsrc/graphics/xv/work/ 
Binary file /tmp/pkgsrc/graphics/xv/work/.gcc/bin/gcc matches
Binary file /tmp/pkgsrc/graphics/xv/work/.gcc/bin/cc matches
Binary file /tmp/pkgsrc/graphics/xv/work/.gcc/bin/cpp matches
Binary file /tmp/pkgsrc/graphics/xv/work/.gcc/bin/g++ matches
Binary file /tmp/pkgsrc/graphics/xv/work/.gcc/bin/c++ matches
Reply With Quote