The basic idea is rather simple: replace CPU feature flags with matching flags from the profiles/desc/cpu_flags_x86.desc file. Few notes though:
- Make sure not to accidentally change the option name, e.g. $(use_enable mmx) -> $(use_enable cpu_flags_x86_mmx mmx).
- The list of packages may be incomplete, esp. wrt packages that use custom local flag names. It may also contain extraneous packages, e.g. we need to check all uses of USE=aes.
- Some flags were renamed, e.g. aes-ni -> cpu_flags_x86_aes.
- Some flags are incorrect, e.g. sse4 doesn't exist. It's either sse4_1, sse4_2, see4a or some combination of the three.
- If you need extra flags, please bring it up for discussion first. Do not introduce more local flags, we have enough mess with them.
- Flags should be used when code (e.g. assembly) is compiled conditionally. When used only to control -mfoo options, the flags should be removed.
- Remember to update metadata.xml. If descriptions are generic, remove them. If they're not, rename them to cpu_flags_x86_*.
Script to find packages
You can use the cpuflags-search script to look for packages that still use the old flags. Optionally passed a repository name, it lists all packages that use the old flags. Note that it may list false positives (i.e. it can't know if USE=aes was used for the instruction set or AES algorithm support).
sci-biology/bowtie sci-biology/ugene sci-chemistry/camshift sci-chemistry/gromacs sci-libs/fftw sci-libs/itk sci-mathematics/libsfmt sys-cluster/lustre