dpdk_conf.set('RTE_FORCE_INTRINSICS', 1)
-if cc.sizeof('void *') != 8
+if not dpdk_conf.get('RTE_ARCH_64')
dpdk_conf.set('RTE_CACHE_LINE_SIZE', 64)
dpdk_conf.set('RTE_ARCH_ARM', 1)
dpdk_conf.set('RTE_ARCH_ARMv7', 1)
else
dpdk_conf.set('RTE_CACHE_LINE_SIZE', 128)
dpdk_conf.set('RTE_ARCH_ARM64', 1)
- dpdk_conf.set('RTE_ARCH_64', 1)
machine = []
cmd_generic = ['generic', '', '', 'default', '']
dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain)
dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1)
+dpdk_conf.set('RTE_ARCH_64', cc.sizeof('void *') == 8)
+
add_project_link_arguments('-Wl,--no-as-needed', language: 'c')
dpdk_extra_ldflags += '-Wl,--no-as-needed'
'-Wcast-qual',
'-Wno-address-of-packed-member'
]
-if cc.sizeof('void *') == 4
+if not dpdk_conf.get('RTE_ARCH_64')
# for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - it's fine!!
warning_flags += '-Wno-pointer-to-int-cast'
endif
dpdk_conf.set('RTE_DRIVER_MEMPOOL_BUCKET_SIZE_KB', 64)
dpdk_conf.set('RTE_LIBRTE_DPAA2_USE_PHYS_IOVA', true)
+
compile_time_cpuflags = []
if host_machine.cpu_family().startswith('x86')
arch_subdir = 'x86'
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Luca Boccassi <bluca@debian.org>
+if not dpdk_conf.get('RTE_ARCH_64')
+ error('Only 64-bit compiles are supported for this platform type')
+endif
dpdk_conf.set('RTE_ARCH', 'ppc_64')
dpdk_conf.set('RTE_ARCH_PPC_64', 1)
-dpdk_conf.set('RTE_ARCH_64', 1)
# overrides specific to ppc64
dpdk_conf.set('RTE_MAX_LCORE', 256)
endforeach
dpdk_conf.set('RTE_ARCH_X86', 1)
-if (host_machine.cpu_family() == 'x86_64')
+if dpdk_conf.get('RTE_ARCH_64')
dpdk_conf.set('RTE_ARCH_X86_64', 1)
dpdk_conf.set('RTE_ARCH', 'x86_64')
- dpdk_conf.set('RTE_ARCH_64', 1)
else
dpdk_conf.set('RTE_ARCH_I686', 1)
dpdk_conf.set('RTE_ARCH', 'i686')
includes += include_directories('base')
# The current implementation assumes 64-bit pointers
-if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2') and cc.sizeof('void *') == 8
+if dpdk_conf.has('RTE_MACHINE_CPUFLAG_AVX2') and dpdk_conf.get('RTE_ARCH_64')
sources += files('enic_rxtx_vec_avx2.c')
# Build the avx2 handler if the compiler supports it, even though 'machine'
# does not. This is to support users who build for the min supported machine
# and need to run the binary on newer CPUs too.
# This part is from i40e meson.build
-elif cc.has_argument('-mavx2') and cc.sizeof('void *') == 8
+elif cc.has_argument('-mavx2') and dpdk_conf.get('RTE_ARCH_64')
enic_avx2_lib = static_library('enic_avx2_lib',
'enic_rxtx_vec_avx2.c',
dependencies: [static_rte_ethdev, static_rte_bus_pci],
# This software was jointly developed between OKTET Labs (under contract
# for Solarflare) and Solarflare Communications, Inc.
-if arch_subdir != 'x86' or cc.sizeof('void *') == 4
+if arch_subdir != 'x86' or not dpdk_conf.get('RTE_ARCH_64')
build = false
endif
'bpf_pkt.c',
'bpf_validate.c')
-if arch_subdir == 'x86' and cc.sizeof('void *') == 8
+if arch_subdir == 'x86' and dpdk_conf.get('RTE_ARCH_64')
sources += files('bpf_jit_x86.c')
endif
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
-if host_machine.system() != 'linux' or cc.sizeof('void *') == 4
+if host_machine.system() != 'linux' or not dpdk_conf.get('RTE_ARCH_64')
build = false
endif
version = 2