Details
-
Bug
-
Resolution: Out of scope
-
Not Evaluated
-
None
-
5.12
-
None
-
Linux 4.18.0-2-amd64 #1 SMP Debian 4.18.10-2 (2018-10-07) x86_64 GNU/Linux
gcc version 8.2.0 (Debian 8.2.0-8)
Description
Adding -march=native to QMAKE_CFLAGS_RELEASE breaks building qtbase on non-AVX2 systems with the following error:
/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:143:43: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi] const __m256i half = _mm256_set1_epi16(0x80); ~~~~~~~~~~~~~~~~~^~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h: In function 'void BYTE_MUL_AVX2(__m256i&, const __m256i&, const __m256i&, const __m256i&)': /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:574:1: error: inlining failed in call to always_inline '__m256i _mm256_or_si256(__m256i, __m256i)': target specific option mismatch _mm256_or_si256 (__m256i __A, __m256i __B) ^~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:72:34: note: called from here pixelVector = _mm256_or_si256(pixelVectorAG, pixelVectorRB); ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:186:1: error: inlining failed in call to always_inline '__m256i _mm256_andnot_si256(__m256i, __m256i)': target specific option mismatch _mm256_andnot_si256 (__m256i __A, __m256i __B) ^~~~~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:70:40: note: called from here pixelVectorAG = _mm256_andnot_si256(colorMask, pixelVectorAG); ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:759:1: error: inlining failed in call to always_inline '__m256i _mm256_srli_epi16(__m256i, int)': target specific option mismatch _mm256_srli_epi16 (__m256i __A, int __B) ^~~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:69:38: note: called from here pixelVectorRB = _mm256_srli_epi16(pixelVectorRB, 8); ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:112:1: error: inlining failed in call to always_inline '__m256i _mm256_add_epi16(__m256i, __m256i)': target specific option mismatch _mm256_add_epi16 (__m256i __A, __m256i __B) ^~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:67:37: note: called from here pixelVectorAG = _mm256_add_epi16(pixelVectorAG, half); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:112:1: error: inlining failed in call to always_inline '__m256i _mm256_add_epi16(__m256i, __m256i)': target specific option mismatch _mm256_add_epi16 (__m256i __A, __m256i __B) ^~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:66:37: note: called from here pixelVectorRB = _mm256_add_epi16(pixelVectorRB, half); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:112:1: error: inlining failed in call to always_inline '__m256i _mm256_add_epi16(__m256i, __m256i)': target specific option mismatch _mm256_add_epi16 (__m256i __A, __m256i __B) ^~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:65:37: note: called from here pixelVectorAG = _mm256_add_epi16(pixelVectorAG, _mm256_srli_epi16(pixelVectorAG, 8)); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:759:1: error: inlining failed in call to always_inline '__m256i _mm256_srli_epi16(__m256i, int)': target specific option mismatch _mm256_srli_epi16 (__m256i __A, int __B) ^~~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:65:37: note: called from here pixelVectorAG = _mm256_add_epi16(pixelVectorAG, _mm256_srli_epi16(pixelVectorAG, 8)); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:112:1: error: inlining failed in call to always_inline '__m256i _mm256_add_epi16(__m256i, __m256i)': target specific option mismatch _mm256_add_epi16 (__m256i __A, __m256i __B) ^~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:64:37: note: called from here pixelVectorRB = _mm256_add_epi16(pixelVectorRB, _mm256_srli_epi16(pixelVectorRB, 8)); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:759:1: error: inlining failed in call to always_inline '__m256i _mm256_srli_epi16(__m256i, int)': target specific option mismatch _mm256_srli_epi16 (__m256i __A, int __B) ^~~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:64:37: note: called from here pixelVectorRB = _mm256_add_epi16(pixelVectorRB, _mm256_srli_epi16(pixelVectorRB, 8)); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:553:1: error: inlining failed in call to always_inline '__m256i _mm256_mullo_epi16(__m256i, __m256i)': target specific option mismatch _mm256_mullo_epi16 (__m256i __A, __m256i __B) ^~~~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:62:39: note: called from here pixelVectorRB = _mm256_mullo_epi16(pixelVectorRB, alphaChannel); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:553:1: error: inlining failed in call to always_inline '__m256i _mm256_mullo_epi16(__m256i, __m256i)': target specific option mismatch _mm256_mullo_epi16 (__m256i __A, __m256i __B) ^~~~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:61:39: note: called from here pixelVectorAG = _mm256_mullo_epi16(pixelVectorAG, alphaChannel); ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:179:1: error: inlining failed in call to always_inline '__m256i _mm256_and_si256(__m256i, __m256i)': target specific option mismatch _mm256_and_si256 (__m256i __A, __m256i __B) ^~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:59:45: note: called from here __m256i pixelVectorRB = _mm256_and_si256(pixelVector, colorMask); ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ In file included from /usr/lib/gcc/x86_64-linux-gnu/8/include/immintrin.h:43, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/../../../../../src/corelib/tools/qsimd_p.h:191, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore/private/qsimd_p.h:1, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_p.h:65, from /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:40: /usr/lib/gcc/x86_64-linux-gnu/8/include/avx2intrin.h:759:1: error: inlining failed in call to always_inline '__m256i _mm256_srli_epi16(__m256i, int)': target specific option mismatch _mm256_srli_epi16 (__m256i __A, int __B) ^~~~~~~~~~~~~~~~~ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp:58:46: note: called from here __m256i pixelVectorAG = _mm256_srli_epi16(pixelVector, 8); ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~ make[2]: *** [Makefile:2599: .obj/qdrawhelper_avx2.o] Error 1 make[2]: Leaving directory '/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-build/src/gui' make[1]: *** [Makefile:475: sub-gui-make_first] Error 2 make[1]: Leaving directory '/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-build/src' make: *** [Makefile:49: sub-src-make_first] Error 2 make: Leaving directory '/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-build'
This is because the _AVX2_ macro needed by the AVX2 intrinsics headers was not defined. Let's take a look at the command used for compiling src/gui/painting/qdrawhelper_avx2.cpp:
g++ -c -pipe -march=native -fstack-protector-strong -fno-plt -O3 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DENABLE_PIXMAN_DRAWHELPERS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -march=core-avx2 -I/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui -I. -I/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include -I/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtGui -I../../include -I../../include/QtGui -I/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtGui/5.12.0 -I/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtGui/5.12.0/QtGui -I../../include/QtGui/5.12.0 -I../../include/QtGui/5.12.0/QtGui -I.tracegen -isystem /usr/include/libdrm -I/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0 -I/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore/5.12.0/QtCore -I../../include/QtCore/5.12.0 -I../../include/QtCore/5.12.0/QtCore -I/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/include/QtCore -I../../include/QtCore -I.moc -isystem /usr/include/libpng16 -I/var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/mkspecs/linux-g++ /var/tmp/pkg/qt5-qtbase-5.12.0-beta3/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp -o .obj/qdrawhelper_avx2.o
We find -march=native from QMAKE_CFLAGS_RELEASE followed by -march=core-avx2. Let's check was gcc do here:
$echo | gcc -dM -E -march=core-avx2 - | sort ... #define __ATOMIC_SEQ_CST 5 #define __AVX__ 1 #define __AVX2__ 1 #define __BIGGEST_ALIGNMENT__ 32 ...
System is AVX2 capable and _AVX2_ is predefined.
$echo | gcc -dM -E -march=native -march=core-avx2 - | sort
...
#define __ATOMIC_SEQ_CST 5
#define __BIGGEST_ALIGNMENT__ 16
...
_AVX2_ is not predefined because -march=native enables all instruction supported by the local machine which is not AVX2 capable and also superseds the -march=core-avx2.
Including 5.11.2 the command used for compiling src/gui/painting/qdrawhelper_avx2.cpp was:
g++ -c -pipe -march=native -fstack-protector-strong -fno-plt -O3 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -D_REENTRANT -fPIC -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DENABLE_PIXMAN_DRAWHELPERS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -mavx2 -I/var/tmp/pkg/qt5-qtbase-5.11.2/pkg-source/src/gui -I. -I/var/tmp/pkg/qt5-qtbase-5.11.2/pkg-source/include -I/var/tmp/pkg/qt5-qtbase-5.11.2/pkg-source/include/QtGui -I../../include -I../../include/QtGui -I/var/tmp/pkg/qt5-qtbase-5.11.2/pkg-source/include/QtGui/5.11.2 -I/var/tmp/pkg/qt5-qtbase-5.11.2/pkg-source/include/QtGui/5.11.2/QtGui -I../../include/QtGui/5.11.2 -I../../include/QtGui/5.11.2/QtGui -I.tracegen -isystem /usr/include/libdrm -I/var/tmp/pkg/qt5-qtbase-5.11.2/pkg-source/include/QtCore/5.11.2 -I/var/tmp/pkg/qt5-qtbase-5.11.2/pkg-source/include/QtCore/5.11.2/QtCore -I../../include/QtCore/5.11.2 -I../../include/QtCore/5.11.2/QtCore -I/var/tmp/pkg/qt5-qtbase-5.11.2/pkg-source/include/QtCore -I../../include/QtCore -I.moc -isystem /usr/include/libpng16 -I/var/tmp/pkg/qt5-qtbase-5.11.2/pkg-source/mkspecs/linux-g++ /var/tmp/pkg/qt5-qtbase-5.11.2/pkg-source/src/gui/painting/qdrawhelper_avx2.cpp -o .obj/qdrawhelper_avx2.o
Instead of -march=core-avx2 -mavx2 is used instead.
$echo | gcc -dM -E -march=native -mavx2 - | sort
...
#define __ATOMIC_SEQ_CST 5
#define __AVX__ 1
#define __AVX2__ 1
#define __BIGGEST_ALIGNMENT__ 32
...
_AVX2_ is predefined because -mavx2 enables explicit the use of AVX2 instructions.
I think the cause is the following change SIMD: Add a haswell sub-architecture selection to our support