diff options
author | 2018-11-13 14:04:22 +0000 | |
---|---|---|
committer | 2018-11-13 15:06:18 +0000 | |
commit | 781243f8a77836150d25dba31be870df30cc153f (patch) | |
tree | df4bf30cac35e06371d366e035e5c9ccb6d72a1e /debian | |
parent | f76f158e7cfdb0a8ded0162224cce8b97bdcedaf (diff) |
Restore RTE_MACHINE DEB_BUILD_OPTIONS
Pass it to meson, and set reasonable defaults
Change-Id: Id2a8a89e9af2dc733c9f486a7bc219adc332f6fc
Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/rules | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/debian/rules b/debian/rules index 31e04b7a..1322197d 100755 --- a/debian/rules +++ b/debian/rules @@ -12,6 +12,29 @@ ifeq (,$(findstring terse,$(DEB_BUILD_OPTIONS))) export DH_OPTIONS=-v endif +# People rebuilding this package can overwrite RTE_MACHINE +# via DEB_BUILD_OPTIONS if they like +ifneq (,$(filter rte_machine=%,$(DEB_BUILD_OPTIONS))) + RTE_MACHINE ?= $(patsubst rte_machine=%,%,$(filter rte_machine=%,$(DEB_BUILD_OPTIONS))) +endif + +# Use default for arm* where there is a defined list. +# x86 and power would just use "native", which is an invariant, so set +# power8 and corei7 to keep it stable. +ifneq (,$(filter $(DEB_HOST_ARCH), arm64)) +RTE_MACHINE ?= "default" +else +ifneq (,$(filter $(DEB_HOST_ARCH), armhf)) +RTE_MACHINE ?= "default" +else +ifneq (,$(filter $(DEB_HOST_ARCH), ppc64el)) +RTE_MACHINE ?= "power8" +else +RTE_MACHINE ?= "corei7" +endif +endif +endif + # now stable with parallel comilation, so support -j ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) PAR := $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) @@ -96,7 +119,7 @@ override_dh_auto_configure: --includedir=include/dpdk \ -Dper_library_versions=false \ -Dinclude_subdir_arch=../$(DEB_HOST_MULTIARCH)/dpdk \ - -Dmachine=corei7 \ + -Dmachine=$(RTE_MACHINE) \ -Dkernel_dir=$(KSRC) \ -Denable_kmods=$(DPDK_CONFIG_BUILD_KMOD) |