gallium swr fails to build with -march=native
There is a GCC issue which makes -march=native take preference over any other -march setting. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69471
So when generically building Mesa with swr driver with -march=native
set the build will fail with e.g.
../mesa-19.1.7/src/gallium/drivers/swr/rasterizer/core/format_types.h:1023:45: error: cannot convert simd16scalar {aka SIMDImpl::SIMD512Impl::Float} to __m512 {aka __vector(16) float} result = _mm512_mask_blend_ps(mask, result2, result);
There is a patch which seems to work: https://github.com/easybuilders/easybuild-easyconfigs/blob/369a7e13a3132513eb5622f5da408caa1fb0bb2b/easybuild/easyconfigs/m/Mesa/Mesa-19.2.1-meson-avoid-march.patch