net/octeontx2: check compiler flag before use
authorBruce Richardson <bruce.richardson@intel.com>
Fri, 24 Jan 2020 15:37:54 +0000 (15:37 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 6 Feb 2020 08:10:00 +0000 (09:10 +0100)
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>
drivers/net/octeontx2/meson.build

index 04cf58f..599ade6 100644 (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']