From: Pavan Nikhilesh Date: Tue, 3 Apr 2018 11:24:52 +0000 (+0530) Subject: build: set toolchain info during meson configure X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=afd18fa21b5ee4e7a5c2df6e5ab58431f5bfac01;p=dpdk.git build: set toolchain info during meson configure Meson reports the toolchain using cc.get_id and we can set RTE_TOOLCHAIN, RTE_TOOLCHAIN_X in dpdk_conf so that it can be used by both x86 and arm. Suggested-by: Bruce Richardson Signed-off-by: Pavan Nikhilesh Acked-by: Bruce Richardson --- diff --git a/config/arm/meson.build b/config/arm/meson.build index c1ab6ed011..e9c9eb1a54 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -83,15 +83,6 @@ impl_0x69 = ['Intel', flags_generic, machine_args_generic] impl_dpaa = ['NXP DPAA', flags_dpaa, machine_args_generic] impl_dpaa2 = ['NXP DPAA2', flags_dpaa2, machine_args_generic] - -if cc.get_define('__clang__') != '' - dpdk_conf.set_quoted('RTE_TOOLCHAIN', 'clang') - dpdk_conf.set('RTE_TOOLCHAIN_CLANG', 1) -else - dpdk_conf.set_quoted('RTE_TOOLCHAIN', 'gcc') - dpdk_conf.set('RTE_TOOLCHAIN_GCC', 1) -endif - dpdk_conf.set('RTE_FORCE_INTRINSICS', 1) if cc.sizeof('void *') != 8 diff --git a/config/meson.build b/config/meson.build index 77af5d897d..5815b56021 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'