aboutsummaryrefslogtreecommitdiffstats
path: root/debian/patches
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2018-11-15 09:55:45 +0100
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2018-11-15 09:55:45 +0100
commit2b7a4057aa72b1e9963283a01355885db044be08 (patch)
treee6ba42667e1a5e468837a06f43294b4a8e1a5055 /debian/patches
parent932d5201e023a0b0dbdfaaafb56c6bddd04a7de8 (diff)
update build fixes to upstream submitted v4
Change-Id: Iaa30d7e82ef5e87c0175dc2e5a566a63abe7f8e3 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/0001-build-avoid-non-supported-march-on-ppc-meson.patch42
-rw-r--r--debian/patches/0002-build-establish-an-invariant-machine-type.patch69
-rw-r--r--debian/patches/fix-build-arch-defaults.patch39
-rw-r--r--debian/patches/series3
4 files changed, 113 insertions, 40 deletions
diff --git a/debian/patches/0001-build-avoid-non-supported-march-on-ppc-meson.patch b/debian/patches/0001-build-avoid-non-supported-march-on-ppc-meson.patch
new file mode 100644
index 00000000..d6deca59
--- /dev/null
+++ b/debian/patches/0001-build-avoid-non-supported-march-on-ppc-meson.patch
@@ -0,0 +1,42 @@
+From b43de46c21b7691c087e980f67814e4c59d2213c Mon Sep 17 00:00:00 2001
+From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+Date: Wed, 14 Nov 2018 12:12:45 +0100
+Subject: [PATCH 1/2] build: avoid non supported -march on ppc (meson)
+
+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.
+
+Fixes: 54d609a13876 ("build: add ppc64 meson build")
+
+Acked-by: Luca Boccassi <bluca@debian.org>
+Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+
+Forwarded: yes
+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+Last-Update: 2018-11-15
+
+---
+ 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
+--
+2.17.1
+
diff --git a/debian/patches/0002-build-establish-an-invariant-machine-type.patch b/debian/patches/0002-build-establish-an-invariant-machine-type.patch
new file mode 100644
index 00000000..288f7044
--- /dev/null
+++ b/debian/patches/0002-build-establish-an-invariant-machine-type.patch
@@ -0,0 +1,69 @@
+From e12f30d265ff63a8c9164546355f9ff42abafd50 Mon Sep 17 00:00:00 2001
+From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+Date: Wed, 14 Nov 2018 12:22:35 +0100
+Subject: [PATCH 2/2] build: establish an invariant machine type
+
+Add the machine definition 'default' which is special compared
+to 'native' (most optimized for current system) or any explicit
+type (external entity has to decide on the type).
+
+It defaults to the per arch agreed common minimal baseline
+needed for DPDK to reasonable work.
+
+That might not be the most optimized, but the most portable
+version while still being able to support the CPU features
+required for DPDK.
+
+Going forward this can be bumped up by the DPDK project, but it
+can never be an invariant like 'native'.
+
+Distributions and other needing portable code are expected to
+define the machine as 'default'.
+
+Acked-by: Bruce Richardson <bruce.richardson@intel.com>
+Acked-by: Luca Boccassi <bluca@debian.org>
+Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+
+Forwarded: yes
+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
+Last-Update: 2018-11-15
+
+---
+ config/meson.build | 21 +++++++++++++++++++++
+ 1 file changed, 21 insertions(+)
+
+diff --git a/config/meson.build b/config/meson.build
+index 1af305f46..db32499b3 100644
+--- a/config/meson.build
++++ b/config/meson.build
+@@ -7,6 +7,27 @@ if meson.is_cross_build()
+ else
+ machine = get_option('machine')
+ endif
++
++# machine type 'default' is special, it defaults to the per arch agreed common
++# minimal baseline needed for DPDK.
++# That might not be the most optimized, but the most portable version while
++# still being able to support the CPU features required for DPDK.
++# This can be bumped up by the DPDK project, but it can never be an
++# invariant like 'native'
++if machine == 'default'
++ if host_machine.cpu_family().startswith('x86')
++ # matches the old pre-meson build systems default
++ machine = 'corei7'
++ elif host_machine.cpu_family().startswith('arm')
++ machine = 'armv7-a'
++ elif host_machine.cpu_family().startswith('aarch')
++ # arm64 manages defaults in config/arm/meson.build
++ machine = 'default'
++ elif host_machine.cpu_family().startswith('ppc')
++ machine = 'power8'
++ endif
++endif
++
+ dpdk_conf.set('RTE_MACHINE', machine)
+ machine_args = []
+
+--
+2.17.1
+
diff --git a/debian/patches/fix-build-arch-defaults.patch b/debian/patches/fix-build-arch-defaults.patch
deleted file mode 100644
index e215b2ac..00000000
--- a/debian/patches/fix-build-arch-defaults.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-Description: Fix build and optimization issues
- it is an upstream decision to select the minimum
- baseline, also ppc can never use -march
-Forwarded: no (planned if it works well)
-Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
-Last-Update: 2018-11-14
---- a/config/meson.build
-+++ b/config/meson.build
-@@ -7,10 +7,28 @@ if meson.is_cross_build()
- else
- machine = get_option('machine')
- endif
-+
-+# machine type 'base' defaults to the per arch agreed common minimal baseline
-+# That might not be the most optimized, but the most portable version while
-+# still being able to support the cpu features required for DPDK.
-+# This can be bumped, but it can never be an invariant like 'native'
-+if machine == 'base'
-+ if host_machine.cpu_family().startswith('x86')
-+ # matches the old build systems default
-+ machine = 'corei7'
-+ elif host_machine.cpu_family().startswith('arm') or host_machine.cpu_family().startswith('aarch')
-+ # arm manages defaults in config/arm/meson.build
-+ machine = 'default'
-+ elif host_machine.cpu_family().startswith('ppc')
-+ machine = 'power8'
-+ endif
-+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
diff --git a/debian/patches/series b/debian/patches/series
index cdcf78ac..e4b9e681 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
-fix-build-arch-defaults.patch
+0001-build-avoid-non-supported-march-on-ppc-meson.patch
+0002-build-establish-an-invariant-machine-type.patch