bus/dpaa: enhance link status
[dpdk.git] / config / x86 / meson.build
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017-2019 Intel Corporation
3
4 # get binutils version for the workaround of Bug 97
5 if not is_windows
6         binutils_ok = run_command(binutils_avx512_check)
7         if binutils_ok.returncode() != 0 and cc.has_argument('-mno-avx512f')
8                 machine_args += '-mno-avx512f'
9                 warning('Binutils error with AVX512 assembly, disabling AVX512 support')
10         endif
11 endif
12
13 # we require SSE4.2 for DPDK
14 if cc.get_define('__SSE4_2__', args: machine_args) == ''
15         message('SSE 4.2 not enabled by default, explicitly enabling')
16         machine_args += '-msse4'
17 endif
18
19 base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']
20 foreach f:base_flags
21         compile_time_cpuflags += ['RTE_CPUFLAG_' + f]
22 endforeach
23
24 optional_flags = ['AES', 'PCLMUL',
25                 'AVX', 'AVX2', 'AVX512F',
26                 'RDRND', 'RDSEED']
27 foreach f:optional_flags
28         if cc.get_define('__@0@__'.format(f), args: machine_args) == '1'
29                 if f == 'PCLMUL' # special case flags with different defines
30                         f = 'PCLMULQDQ'
31                 elif f == 'RDRND'
32                         f = 'RDRAND'
33                 endif
34                 compile_time_cpuflags += ['RTE_CPUFLAG_' + f]
35         endif
36 endforeach
37
38
39 dpdk_conf.set('RTE_ARCH_X86', 1)
40 if dpdk_conf.get('RTE_ARCH_64')
41         dpdk_conf.set('RTE_ARCH_X86_64', 1)
42         dpdk_conf.set('RTE_ARCH', 'x86_64')
43 else
44         dpdk_conf.set('RTE_ARCH_I686', 1)
45         dpdk_conf.set('RTE_ARCH', 'i686')
46 endif
47
48 dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)