glibc introduced the glibc-hwcaps/XXXX path in glibc 2.33 (2020) and
removed the old, legacy "haswell/" prefix in glibc 2.37 (2022). This
means anyone deploying HW-capable libraries must be deploying symlinks,
so we are not losing functionality.
Because it says "glibc-hwcaps", I am now making this dependent on glibc
for libraries.
Added unit testing for this feature. Tested on Linux, FreeBSD, macOS,
and Windows (the QLibrary test SKIPs everywhere except Linux). We do
create a "libtheplugin.dylib.avx2" on macOS with this change, but won't
attempt to load it (Darwin has fat binaries so lipo(1)ing the files
together would be the right thing to do).
Pick-to: 6.8
Change-Id: Ic0adfa808d28487a8303fffd17d9e78ec87bbd9a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>