netperf: fix compilation with GCC10
authorTony Ambardar <redacted>
Sat, 8 Aug 2020 17:39:22 +0000 (10:39 -0700)
committerTony Ambardar <redacted>
Sun, 9 Aug 2020 07:02:48 +0000 (00:02 -0700)
GCC10 defaults to -fno-common, which breaks compilation when there are
multiple definitions of implicit "extern" variables. Remove the extra
definitions.

Signed-off-by: Tony Ambardar <redacted>
net/netperf/Makefile
net/netperf/patches/010-gcc10_multiple_definition_fix.patch [new file with mode: 0644]

index 032ded5866f2998b72a4714e86a79ebaf400f197..9564a4c604a89728f65bbfab9b51f074209c5f03 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netperf
 PKG_VERSION:=2.7.0
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_LICENSE:=Custom
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
diff --git a/net/netperf/patches/010-gcc10_multiple_definition_fix.patch b/net/netperf/patches/010-gcc10_multiple_definition_fix.patch
new file mode 100644 (file)
index 0000000..3a1e010
--- /dev/null
@@ -0,0 +1,19 @@
+--- a/src/nettest_omni.c
++++ b/src/nettest_omni.c
+@@ -454,16 +454,6 @@ static  int remote_cpu_method;
+ static int client_port_min = 5000;
+ static int client_port_max = 65535;
+- /* different options for the sockets                         */
+-
+-int
+-  loc_nodelay,                /* don't/do use NODELAY locally         */
+-  rem_nodelay,                /* don't/do use NODELAY remotely        */
+-  loc_sndavoid,               /* avoid send copies locally            */
+-  loc_rcvavoid,               /* avoid recv copies locally            */
+-  rem_sndavoid,               /* avoid send copies remotely           */
+-  rem_rcvavoid;       /* avoid recv_copies remotely           */
+-
+ extern int
+   loc_tcpcork,
+   rem_tcpcork,
git clone https://git.99rst.org/PROJECT