SHA256
1
0
forked from pool/dpdk

Accepting request 417972 from home:ndas:branches:network

- Add _constraints file to force build dpdk with sse3 enabled x86 machine.
- Enable compilation for  ppc64le with the help of Rüdiger(ro@suse.de).
- Enable example package for aarch64 using Rüdiger(ro@suse.de) changes.
- Do not enable PMD_RING on ppc64le (missing rte_eth_from_rings).
- Disable examples that need LPM which is disabled on non-x86.
  [+0036-examples-fix-build-dependencies.patch,
   +0037-examples-ethtool-fix-build.patch]

OBS-URL: https://build.opensuse.org/request/show/417972
OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=13
This commit is contained in:
Nirmoy Das
2016-08-09 10:58:13 +00:00
committed by Git OBS Bridge
parent 000c38a217
commit f5030c82d2
5 changed files with 140 additions and 11 deletions

View File

@@ -16,6 +16,8 @@
#
%define machine native
%define machine2 default
%ifarch x86_64
%define machine native
%define target x86_64-%{machine}-linuxapp-gcc
@@ -25,16 +27,16 @@
%define target i686-%{machine}-linuxapp-gcc
%endif
%ifarch aarch64
%define machine armv8a
%define target arm64-%{machine}-linuxapp-gcc
%define machine2 armv8a
%define target arm64-%{machine2}-linuxapp-gcc
%endif
# Examples seems to contain lots of Intel specific code
# so disabling examples package for aarch64 till we find
# time to fix them all. - TODO
%ifnarch aarch64
# Add option to build without examples
%ifarch ppc64le
%define machine2 power8
%define target ppc_64-%{machine2}-linuxapp-gcc
%endif
%bcond_without examples
%endif
%bcond_without shared
# Add option to build without tools
%bcond_without tools
@@ -110,6 +112,10 @@ Patch33: 0033-virtio-fix-descriptors-pointing-to-the-same-buffer.patch
Patch34: 0034-virtio-fix-restart.patch
#PATCH-FIX-OPENSUSE 0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi
Patch35: 0035-PAGE_SIZE-constant-is-not-defined-on-ARM-since-multi.patch
#PATCH-FIX-UPSTREAM 0036-examples-fix-build-dependencies
Patch36: 0036-examples-fix-build-dependencies.patch
#PATCH-FIX-UPSTREAM 0037-examples-ethtool-fix-build
Patch37: 0037-examples-ethtool-fix-build.patch
#
# Patches for build fixes
@@ -138,7 +144,7 @@ BuildRequires: fdupes
BuildRequires: libnuma-devel
BuildRequires: libpcap-devel
BuildRequires: zlib-devel
ExclusiveArch: aarch64 x86_64 %ix86
ExclusiveArch: aarch64 x86_64 %ix86 ppc64le
%description
The Data Plane Development Kit is a set of libraries and drivers for
@@ -228,6 +234,8 @@ as L2 and L3 forwarding.
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
# Build fixes
%patch99 -p1 -z .rtetoolchain
@@ -265,7 +273,7 @@ export EXTRA_CFLAGS="%{optflags} -Wformat -fPIC -Wno-error=array-bounds"
make V=1 O=%{target} T=%{target} %{?_smp_mflags} config
setconf CONFIG_RTE_MACHINE '"%{machine}"'
setconf CONFIG_RTE_MACHINE '"%{machine2}"'
# Disable experimental features
setconf CONFIG_RTE_NEXT_ABI n
setconf CONFIG_RTE_LIBRTE_CRYPTODEV n
@@ -287,6 +295,13 @@ setconf CONFIG_RTE_KNI_PREEMPT_DEFAULT n
setconf CONFIG_RTE_BUILD_SHARED_LIB y
%endif
%ifarch aarch64 ppc64le
setconf CONFIG_RTE_LIBRTE_DISTRIBUTOR n
%endif
%ifarch ppc64le
setconf CONFIG_RTE_LIBRTE_PMD_RING n
%endif
make V=1 O=%{target} %{?_smp_mflags}
make V=1 O=%{target} %{?_smp_mflags} doc-api-html
@@ -340,7 +355,7 @@ endif
EOF
# Fixup target machine mismatch
sed -i -e 's:-%{machine}-:-default-:g' %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk*
sed -i -e 's:-%{machine}-:-%{machine2}-:g' %{buildroot}/%{_sysconfdir}/profile.d/dpdk-sdk*
# Upstream has an option to build a combined library but it's bloatware which
# wont work at all when library versions start moving, replace it with a