We've been shipping avx2 libraries for years (known as legacy Glibc HWCaps) built with -march=haswell
and installed to /usr/lib64/haswell
which we also patched to be compatible with AMD CPUs (zen1 and newer) for opt-in packages. This was based off Clear Linux work that was upstreamed into glibc.
There was a bit of contention with the Clear Linux work as it exclusively worked on Intel CPUs and not AMD, whilst we patched this behavior in Solus. This in part, lead the creation of the vendor agnostic x86-64-v{2,3,4} microarch levels and the current Glibc HWCaps feature.
Recently we've switched to the currently supported Glibc HWCaps feature. Opt-in libraries of packages built with -march=x86-64-v3
and installed to /usr/lib64/glibc-hwcaps/x86-64-v3/
. This is actually a slight downgrade over our previous solution as x86-64-v3
doesn't include -maes -mfsgsbase -mpclmulqdq -mrdrnd -mxsaveopt
instructions unlike haswell
in order to support the AMD excavator CPUs.
Currently we pick and benchmark packages to be selected to ship x86-64-v3 libs in addition the default x86-64 libs where there is a significant uplift in performance, or, if there is only a slight uplift in performance but the package is very commonly used.
When we rebase off of Serpent our baseline packages will built with x86-64-v2 instead of x86-64 and we will no longer be using the Glibc HWCaps feature. Instead, we will be building select packages as both x86-64-v2 and x86-64-v3 and as such the moss package manager will be smart enough to install the x86-64-v3 built packages instead of the baseline packages when they are available and the current system supports them. E.g. moss will automatically install libpng-1.6.40-1-x86-64-v3.stone
instead of libpng-1.6.40-1-x86-64-v2.stone
.