[1/2] build: avoid non supported -march on ppc (meson)

Message ID 20181114113453.24852-1-christian.ehrhardt@canonical.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [1/2] build: avoid non supported -march on ppc (meson) |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/Intel-compilation success Compilation OK

Commit Message

Christian Ehrhardt Nov. 14, 2018, 11:34 a.m. UTC
  So far only if machine was "native" it did use the re-direction to
not set -march on ppc64 (where -march is not supported).
We have to use mcpu/mtune in any case on ppc for whatever someone using
the build system defines as machine.

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
---
 config/meson.build | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
  

Comments

Luca Boccassi Nov. 14, 2018, 11:39 a.m. UTC | #1
On Wed, 2018-11-14 at 12:34 +0100, Christian Ehrhardt wrote:
> So far only if machine was "native" it did use the re-direction to
> not set -march on ppc64 (where -march is not supported).
> We have to use mcpu/mtune in any case on ppc for whatever someone
> using
> the build system defines as machine.
> 
> Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
> ---
>  config/meson.build | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/config/meson.build b/config/meson.build
> index 0b710b795..1af305f46 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -9,8 +9,9 @@ else
>  endif
>  dpdk_conf.set('RTE_MACHINE', machine)
>  machine_args = []
> -# ppc64 does not support -march=native
> -if host_machine.cpu_family().startswith('ppc') and machine ==
> 'native'
> +
> +# ppc64 does not support -march= at all, use -mcpu and -mtune for
> that
> +if host_machine.cpu_family().startswith('ppc')
>  	machine_args += '-mcpu=' + machine
>  	machine_args += '-mtune=' + machine
>  else

Acked-by: Luca Boccassi <bluca@debian.org>
  

Patch

diff --git a/config/meson.build b/config/meson.build
index 0b710b795..1af305f46 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -9,8 +9,9 @@  else
 endif
 dpdk_conf.set('RTE_MACHINE', machine)
 machine_args = []
-# ppc64 does not support -march=native
-if host_machine.cpu_family().startswith('ppc') and machine == 'native'
+
+# ppc64 does not support -march= at all, use -mcpu and -mtune for that
+if host_machine.cpu_family().startswith('ppc')
 	machine_args += '-mcpu=' + machine
 	machine_args += '-mtune=' + machine
 else