build: remove architecture flag as default C flag
[dpdk.git] / config / meson.build
index 4f65117..9522304 100644 (file)
@@ -2,9 +2,13 @@
 # Copyright(c) 2017 Intel Corporation
 
 # set the machine type and cflags for it
-machine = get_option('machine')
+if meson.is_cross_build()
+       machine = host_machine.cpu()
+else
+       machine = get_option('machine')
+endif
 dpdk_conf.set('RTE_MACHINE', machine)
-add_project_arguments('-march=@0@'.format(machine), language: 'c')
+machine_arg = '-march=' + machine
 
 # use pthreads
 add_project_link_arguments('-pthread', language: 'c')