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 <bruce.richardson@intel.com> Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
parent
49781e37e7
commit
afd18fa21b
@ -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
|
||||
|
@ -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'
|
||||
|
Loading…
Reference in New Issue
Block a user