net/octeontx2: check compiler flag before use

Rather than assuming all compilers support the -flax-vector-extensions
flag, we should test this before using it, thereby potentially avoiding
warnings.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
This commit is contained in:
Bruce Richardson 2020-01-24 15:37:54 +00:00 committed by Thomas Monjalon
parent c886f4263a
commit f2b700a328

View File

@ -28,9 +28,7 @@ sources = files('otx2_rx.c',
deps += ['bus_pci', 'cryptodev', 'eventdev', 'security']
deps += ['common_octeontx2', 'mempool_octeontx2']
cflags += ['-flax-vector-conversions']
extra_flags = []
extra_flags = ['-flax-vector-conversions']
# This integrated controller runs only on a arm64 machine, remove 32bit warnings
if not dpdk_conf.get('RTE_ARCH_64')
extra_flags += ['-Wno-int-to-pointer-cast', '-Wno-pointer-to-int-cast']