src/corelib/global/qsimd_p.h has the following check: 214 # define ARCH_HASWELL_MACROS (__AVX2__ + __BMI__ + __BMI2__ + __F16C__ + __FMA__ + __LZCNT__) 215 # if ARCH_HASWELL_MACROS != 0 216 # if ARCH_HASWELL_MACROS != 6 217 # error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2" 218 # endif On bdver2 chips, __BMI__, __F16C__, __FMA__ and __LZCNT__ are defined. __AVX2__ and __BMI2__ are not. This causes the build with -march=bdver2 to fail.
This has been fixed upstream since Qt 6.5.3 [1] and was previously addressed locally in [2] in response to [3]. For future reference, [2] and [3] were both fixes for Qt 6.5.2. [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?h=6.5.3&id=0290ee0d6f59caa6d7a6eccebc9f66edd5722e62 [2] https://cgit.freebsd.org/ports/commit/devel/qt6-base?id=5d569342f960a5229be3f8007bfcc6208d0a0621 [3] https://cgit.freebsd.org/ports/commit/devel/qt6-base?id=d2283436a461abadb2c18c91644fe17d187fbda9