1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright(c) 2017-2020 Intel Corporation
4 # get binutils version for the workaround of Bug 97
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')
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'
19 base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2']
21 compile_time_cpuflags += ['RTE_CPUFLAG_' + f]
38 foreach f:optional_flags
39 if cc.get_define('__@0@__'.format(f), args: machine_args) == '1'
40 if f == 'PCLMUL' # special case flags with different defines
45 compile_time_cpuflags += ['RTE_CPUFLAG_' + f]
50 dpdk_conf.set('RTE_ARCH_X86', 1)
51 if dpdk_conf.get('RTE_ARCH_64')
52 dpdk_conf.set('RTE_ARCH_X86_64', 1)
53 dpdk_conf.set('RTE_ARCH', 'x86_64')
55 dpdk_conf.set('RTE_ARCH_I686', 1)
56 dpdk_conf.set('RTE_ARCH', 'i686')
59 dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)