pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Compiler Optimizations [was Package options dialog]
On 05/07/18 17:20, Sevan Janiyan wrote:
On 05/07/18 14:55, Jason Bacon wrote:
In theory, I think -march=native alone achieve this with clang and gcc,
and this is what I've been looking at.
Would it just be easier for you maintain a template mk.conf with the
necessary options set so that those who need to build a package manually
can uncompress bootstrap kit (or bootstrap), add the mk.conf snippet,
start building the relevant packages.
I haven't given a lot of thought to how it should be implemented yet.
Could be done globally in mk.conf, in which case I'd probably provide
instructions on a web page and a prompt in auto-pkgsrc-setup, which
automates the bootstrap process for non-technical types.
I see that cpuflags adds some additional flags:
netbsddev /usr/pkgsrc/wip/plink2 # cpuflags
-mfpmath=sse -msse3 -march=native
I assume cpuflags is compensating for GCC shortcomings. I'll do some
comparisons on our systems.
In what regards?
By adding -mfpmath=sse -msse3. The cpuflags command has so far given me the
same output on every machine I've tried. I've run a few benchmarks
using plink and
so far have not seen any measurable difference between -march=native and
-mfpmath=sse -msse3 -march=native.
It doesn't appear to directly support clang, although I would guess it
will work at least pretty well, given the high level of compatibility
with GCC.
That could just be that it needs some attention rather than intentional.
Just out of curiosity, are you looking to build everything with these
flags or specific applications which you are certain behave correctly
with compiler optimisations?
Again, not entirely sure. Right now I'm focused on just determining the
simplest
and most fool-proof way for Joe Scientist to get the most out of his CPU.
-march=native is probably pretty safe to set globally, but now that
I said that, it will break something for sure. ;-) I suspect problems
will be rare and
certainly can be fixed once they're exposed.
Thanks,
JB
Home |
Main Index |
Thread Index |
Old Index