1 # SPDX-License-Identifier: BSD-3-Clause
3 # Copyright(c) 2019-2021 Xilinx, Inc.
4 # Copyright(c) 2016-2019 Solarflare Communications Inc.
6 # This software was jointly developed between OKTET Labs (under contract
7 # for Solarflare) and Solarflare Communications, Inc.
11 reason = 'not supported on Windows'
15 if (arch_subdir != 'x86' and arch_subdir != 'arm') or (not dpdk_conf.get('RTE_ARCH_64'))
17 reason = 'only supported on x86_64 and aarch64'
23 # Strict-aliasing rules are violated by rte_eth_link to uint64_t casts
24 extra_flags += '-Wno-strict-aliasing'
26 # Enable more warnings
28 '-Wdisabled-optimization',
31 # Compiler and version dependent flags
34 '-Wbad-function-cast',
37 foreach flag: extra_flags
38 if cc.has_argument(flag)
43 # for gcc compiles we need -latomic for 128-bit atomic ops
44 if cc.get_id() == 'gcc'
45 libatomic_dep = cc.find_library('atomic', required: false)
46 if not libatomic_dep.found()
48 reason = 'missing dependency, "libatomic"'
52 # libatomic could be half-installed when above check finds it but
54 atomic_link_code = '''
56 void main() { printf("libatomic link check\n"); }
58 if not cc.links(atomic_link_code, dependencies: libatomic_dep)
60 reason = 'broken dependency, "libatomic"'
63 ext_deps += libatomic_dep
66 deps += ['common_sfc_efx', 'bus_pci']