1 Description: Fix build and optimization issues
2 it is an upstream decision to select the minimum
3 baseline, also ppc can never use -march
4 Forwarded: no (planned if it works well)
5 Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
6 Last-Update: 2018-11-14
7 --- a/config/meson.build
8 +++ b/config/meson.build
9 @@ -7,10 +7,28 @@ if meson.is_cross_build()
11 machine = get_option('machine')
14 +# machine type 'base' defaults to the per arch agreed common minimal baseline
15 +# That might not be the most optimized, but the most portable version while
16 +# still being able to support the cpu features required for DPDK.
17 +# This can be bumped, but it can never be an invariant like 'native'
19 + if host_machine.cpu_family().startswith('x86')
20 + # matches the old build systems default
22 + elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
23 + # arm manages defaults in config/arm/meson.build
25 + elif host_machine.cpu_family().startswith('ppc')
30 dpdk_conf.set('RTE_MACHINE', machine)
32 -# ppc64 does not support -march=native
33 -if host_machine.cpu_family().startswith('ppc') and machine == 'native'
35 +# ppc64 does not support -march= at all, use -mcpu and -mtune for that
36 +if host_machine.cpu_family().startswith('ppc')
37 machine_args += '-mcpu=' + machine
38 machine_args += '-mtune=' + machine