build: fix meson check for binutils 2.30
authorHarry van Haaren <harry.van.haaren@intel.com>
Thu, 17 Jan 2019 17:17:44 +0000 (17:17 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 17 Jan 2019 18:19:57 +0000 (19:19 +0100)
commit566b4d7a968fa454ff7deab7c43216712878af30
treee5addec6d454e581934c1e39895d466340f86bc6
parent6406d70561e44474b27646f74b3863929019b1f1
build: fix meson check for binutils 2.30

This commit reworks the checks for binutils 2.30 and how
the flags to disable AVX512F are passed to the compiler.

Previously the #define for including AVX512 code was set,
while the -mno-avx512f argument was given to the compiler.
This would cause gcc to correctly refuse to emit AVX512
instructions, but the rte_memcpy code that includes AVX512
optimizations was being added to the build.

The check for binutils check is now moved to x86 as it is
irrelevant for other architectures, and the -mno-avx512f
flag is passed to a march_opts array in meson. As the
-mno-avx512 flag is added earlier in the build, the code
in rte_memcpy is no longer attempted to be compiled.

This commit also adds a message print in the meson configure
stage to alert the user of the workaround being employed.

Fixes: a32ca9a4ebc1 ("mk: fix scope of disabling AVX512F support")

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Tested-by: Ferruh Yigit <ferruh.yigit@intel.com>
config/meson.build
config/x86/meson.build