Merge tag 'upstream/18.11-rc4' into 18.11.x
[deb_dpdk.git] / debian / patches / 0001-build-avoid-non-supported-march-on-ppc-meson.patch
1 From b43de46c21b7691c087e980f67814e4c59d2213c Mon Sep 17 00:00:00 2001
2 From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
3 Date: Wed, 14 Nov 2018 12:12:45 +0100
4 Subject: [PATCH 1/2] build: avoid non supported -march on ppc (meson)
5
6 So far only if machine was "native" it did use the re-direction to
7 not set -march on ppc64 (where -march is not supported).
8 We have to use mcpu/mtune in any case on ppc for whatever someone using
9 the build system defines as machine.
10
11 Fixes: 54d609a13876 ("build: add ppc64 meson build")
12
13 Acked-by: Luca Boccassi <bluca@debian.org>
14 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
15
16 Forwarded: yes
17 Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
18 Last-Update: 2018-11-15
19
20 ---
21  config/meson.build | 5 +++--
22  1 file changed, 3 insertions(+), 2 deletions(-)
23
24 diff --git a/config/meson.build b/config/meson.build
25 index 0b710b795..1af305f46 100644
26 --- a/config/meson.build
27 +++ b/config/meson.build
28 @@ -9,8 +9,9 @@ else
29  endif
30  dpdk_conf.set('RTE_MACHINE', machine)
31  machine_args = []
32 -# ppc64 does not support -march=native
33 -if host_machine.cpu_family().startswith('ppc') and machine == 'native'
34 +
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
39  else
40 -- 
41 2.17.1
42