X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=config%2Fmeson.build;h=2179c689c14d4e1e8c7fbba4639e91e634475bcd;hb=9009d00746abbe17ce0a860e48d1dac9cb455199;hp=f8c67578df460ef38bed93c12fcbdf93e0fbdb13;hpb=200b88cbe0e6f3efd5edf81f8bfc4ace2bb17928;p=dpdk.git diff --git a/config/meson.build b/config/meson.build index f8c67578df..2179c689c1 100644 --- a/config/meson.build +++ b/config/meson.build @@ -11,6 +11,10 @@ dpdk_conf.set('RTE_MACHINE', machine) machine_args = [] machine_args += '-march=' + machine +toolchain = cc.get_id() +dpdk_conf.set_quoted('RTE_TOOLCHAIN', toolchain) +dpdk_conf.set('RTE_TOOLCHAIN_' + toolchain.to_upper(), 1) + # use pthreads add_project_link_arguments('-pthread', language: 'c') dpdk_extra_ldflags += '-pthread' @@ -38,6 +42,14 @@ if numa_dep.found() and cc.has_header('numaif.h') dpdk_extra_ldflags += '-lnuma' endif +# check for strlcpy +if host_machine.system() == 'linux' and cc.find_library('bsd', + required: false).found() and cc.has_header('bsd/string.h') + dpdk_conf.set('RTE_USE_LIBBSD', 1) + add_project_link_arguments('-lbsd', language: 'c') + dpdk_extra_ldflags += '-lbsd' +endif + # add -include rte_config to cflags add_project_arguments('-include', 'rte_config.h', language: 'c')