Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com>
---
 patches/netperf-2.7.0/0001-fix-inlining.patch | 46 ++++++++++++++++
 patches/netperf-2.7.0/series                  |  4 ++
 rules/netperf.in                              |  9 ++++
 rules/netperf.make                            | 75 +++++++++++++++++++++++++++
 4 files changed, 134 insertions(+)
 create mode 100644 patches/netperf-2.7.0/0001-fix-inlining.patch
 create mode 100644 patches/netperf-2.7.0/series
 create mode 100644 rules/netperf.in
 create mode 100644 rules/netperf.make

diff --git a/patches/netperf-2.7.0/0001-fix-inlining.patch 
b/patches/netperf-2.7.0/0001-fix-inlining.patch
new file mode 100644
index 000000000..1e6689da7
--- /dev/null
+++ b/patches/netperf-2.7.0/0001-fix-inlining.patch
@@ -0,0 +1,46 @@
+From 68cfbafb9f239950065e6a0ed7ca60c12668740f Mon Sep 17 00:00:00 2001
+From: Clemens Gruber <clemens.gru...@pqgruber.com>
+Date: Thu, 15 Dec 2016 16:14:01 +0100
+Subject: [PATCH] fix inlining
+
+Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com>
+---
+ src/netlib.c | 14 +-------------
+ 1 file changed, 1 insertion(+), 13 deletions(-)
+
+diff --git a/src/netlib.c b/src/netlib.c
+index f3a3fe5e00ab..4465d0f1b5f3 100644
+--- a/src/netlib.c
++++ b/src/netlib.c
+@@ -3997,11 +3997,7 @@ void demo_stream_setup(uint32_t a, uint32_t b) {
+   }
+ }
+ 
+-#ifdef WIN32
+-__forceinline void demo_interval_display(double actual_interval)
+-#else
+-  inline void demo_interval_display(double actual_interval)
+-#endif
++void demo_interval_display(double actual_interval)
+ {
+   static int count = 0;
+   struct timeval now;
+@@ -4060,15 +4056,7 @@ __forceinline void demo_interval_display(double 
actual_interval)
+    important compilers have supported such a construct so it should
+    not be a big deal. raj 2012-01-23 */
+ 
+-#ifdef WIN32
+-/* It would seem that the Microsoft compiler will not inline across
+-   source files. So there is little point in having an inline
+-   directive in that situation.  Of course that makes me wonder if an
+-   inline directive has to appear in netlib.h... */
+ void demo_interval_tick(uint32_t units)
+-#else
+-  inline void demo_interval_tick(uint32_t units)
+-#endif
+ {
+   double actual_interval = 0.0;
+ 
+-- 
+2.10.2
+
diff --git a/patches/netperf-2.7.0/series b/patches/netperf-2.7.0/series
new file mode 100644
index 000000000..54488afdf
--- /dev/null
+++ b/patches/netperf-2.7.0/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-fix-inlining.patch
+# ce464498af68ff457cdb324c32f1c72b  - git-ptx-patches magic
diff --git a/rules/netperf.in b/rules/netperf.in
new file mode 100644
index 000000000..893852696
--- /dev/null
+++ b/rules/netperf.in
@@ -0,0 +1,9 @@
+## SECTION=networking
+
+config NETPERF
+       bool
+       prompt "netperf"
+       select LIBC_M
+       help
+         netperf is a benchmark that can be used to measure the
+         performance of many different types of networking.
diff --git a/rules/netperf.make b/rules/netperf.make
new file mode 100644
index 000000000..a317fe529
--- /dev/null
+++ b/rules/netperf.make
@@ -0,0 +1,75 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Clemens Gruber <clemens.gru...@pqgruber.com>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_NETPERF) += netperf
+
+#
+# Paths and names
+#
+NETPERF_VERSION        := 2.7.0
+NETPERF_MD5    := ad1c5342d61f297c417a93133aeba65a
+NETPERF                := netperf-$(NETPERF_VERSION)
+NETPERF_SUFFIX := tar.bz2
+NETPERF_URL    := ftp://ftp.netperf.org/netperf/$(NETPERF).$(NETPERF_SUFFIX)
+NETPERF_SOURCE := $(SRCDIR)/$(NETPERF).$(NETPERF_SUFFIX)
+NETPERF_DIR    := $(BUILDDIR)/$(NETPERF)
+NETPERF_LICENSE        := HP
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+#
+# autoconf
+#
+NETPERF_CONF_TOOL      := autoconf
+NETPERF_CONF_OPT       := \
+       $(CROSS_AUTOCONF_USR) \
+       $(GLOBAL_LARGE_FILE_OPTION) \
+       --disable-histogram \
+       --disable-dirty \
+       --enable-demo \
+       --disable-unixdomain \
+       --disable-dlpi \
+       --disable-dccp \
+       --enable-omni \
+       --disable-xti \
+       --disable-sdp \
+       --disable-exs \
+       --disable-sctp \
+       --disable-intervals \
+       --disable-spin \
+       --enable-burst \
+       --enable-cpuutil=procstat
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/netperf.targetinstall:
+       @$(call targetinfo)
+
+       @$(call install_init, netperf)
+       @$(call install_fixup, netperf, PRIORITY, optional)
+       @$(call install_fixup, netperf, SECTION, base)
+       @$(call install_fixup, netperf, AUTHOR, "Clemens Gruber 
<clemens.gru...@pqgruber.com>")
+       @$(call install_fixup, netperf, DESCRIPTION, missing)
+
+       @$(call install_alternative, netperf, 0, 0, 0755, /usr/bin/netperf)
+       @$(call install_alternative, netperf, 0, 0, 0755, /usr/bin/netserver)
+
+       @$(call install_finish, netperf)
+
+       @$(call touch)
+
+# vim: syntax=make
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to