Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554828 - app-portage/cpuinfo2cpuflags-2: please re-keyword ~amd64-linux ~x86-linux
Summary: app-portage/cpuinfo2cpuflags-2: please re-keyword ~amd64-linux ~x86-linux
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Keywording and Stabilization (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: KEYWORDREQ
Depends on: 554830
Blocks:
  Show dependency tree
 
Reported: 2015-07-14 07:05 UTC by Michał Górny
Modified: 2015-08-11 18:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-07-14 07:05:32 UTC
v2 is a rewrite in C, so I'd really prefer having proper Prefix testing before committing ;).
Comment 1 Thomas Beinicke 2015-07-14 10:40:29 UTC
The rewrite in C is good since it's a lot faster but why did the output format change?

I am using it on our virtualized servers to automatically create a make include file to set all the CPU flags.

The new format isn't compatible to the make.conf format anymore.

old:
CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"

new:
CPU_FLAGS_X86: mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3

Would it be possible to at least include the old format via a command line parameter?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-07-14 18:55:41 UTC
(In reply to Thomas Beinicke from comment #1)
> The rewrite in C is good since it's a lot faster but why did the output
> format change?
> 
> I am using it on our virtualized servers to automatically create a make
> include file to set all the CPU flags.
> 
> The new format isn't compatible to the make.conf format anymore.
> 
> old:
> CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
> 
> new:
> CPU_FLAGS_X86: mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3
> 
> Would it be possible to at least include the old format via a command line
> parameter?

The new format is easier to output and more portable. It's supported in Portage's package.use and Paludis' options.conf/use.conf.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-07-14 18:56:25 UTC
@Prefix, please proceed with testing/keywording :). Feel free to try non-Linux systems as well as those are supported now.
Comment 4 Thomas Beinicke 2015-07-15 11:40:38 UTC
(In reply to Michał Górny from comment #2)
> (In reply to Thomas Beinicke from comment #1)
> > The rewrite in C is good since it's a lot faster but why did the output
> > format change?
> > 
> > I am using it on our virtualized servers to automatically create a make
> > include file to set all the CPU flags.
> > 
> > The new format isn't compatible to the make.conf format anymore.
> > 
> > old:
> > CPU_FLAGS_X86="mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
> > 
> > new:
> > CPU_FLAGS_X86: mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3
> > 
> > Would it be possible to at least include the old format via a command line
> > parameter?
> 
> The new format is easier to output and more portable. It's supported in
> Portage's package.use and Paludis' options.conf/use.conf.

How would I set it globally?
Before I could use "cpuinfo2cpuflags-x86 >> /etc/portage/make.conf" which doesn't work anymore.
I used to create a custom config which was included in my make.conf. And on every server restart it got repopulated in case the VMs were moved around.
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-07-15 19:48:35 UTC
(In reply to Thomas Beinicke from comment #4)
> How would I set it globally?
> Before I could use "cpuinfo2cpuflags-x86 >> /etc/portage/make.conf" which
> doesn't work anymore.
> I used to create a custom config which was included in my make.conf. And on
> every server restart it got repopulated in case the VMs were moved around.

echo "*/* $(cpuinfo2cpuflags-x86)" >> /etc/portage/package.use

Though I never thought about using the tool in scripts. Sorry.
Comment 6 Fabian Groffen gentoo-dev 2015-08-11 18:43:40 UTC
appears to compile and run on x64-solaris (gcc 4.7)

CPU_FLAGS_X86: mmx mmxext sse sse2 sse3 ssse3

and x64-macos (using Clang 3.5)

CPU_FLAGS_X86: aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-08-11 18:47:31 UTC
If possible, please try comparing with results given by platform-local CPU feature detection utilities or such. I think the MacOS way is:

/usr/sbin/sysctl machdep.cpu.features machdep.cpu.leaf7_features machdep.cpu.extfeatures