iperf:
* Split into two packages. One without threads support and one with multithread support (#2432) * Refresh patches git-svn-id: svn://svn.openwrt.org/openwrt/packages@9036 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a4cce92a16
commit
8d794e4bce
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2007 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -18,7 +18,8 @@ PKG_MD5SUM:=bb658aba58a5af0356f5b1342dfe8f53
|
|||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
define Package/iperf
|
define Package/iperf/Default
|
||||||
|
SUBMENU:=Monitoring
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
DEPENDS:= +uclibcxx
|
DEPENDS:= +uclibcxx
|
||||||
@ -26,30 +27,81 @@ define Package/iperf
|
|||||||
URL:=http://dast.nlanr.net/Projects/Iperf/
|
URL:=http://dast.nlanr.net/Projects/Iperf/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/iperf/description
|
define Package/iperf/Default/description
|
||||||
Iperf is a modern alternative for measuring TCP and UDP bandwidth
|
Iperf is a modern alternative for measuring TCP and UDP bandwidth
|
||||||
performance, allowing the tuning of various parameters and
|
performance, allowing the tuning of various parameters and
|
||||||
characteristics.
|
characteristics.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define Package/iperf
|
||||||
|
$(call Package/iperf/Default)
|
||||||
|
TITLE+= (with single thread support)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/iperf/description
|
||||||
|
$(call Package/iperf/Default/description)
|
||||||
|
This package is built with single thread support.
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define Package/iperf-mt
|
||||||
|
$(call Package/iperf/Default)
|
||||||
|
DEPENDS+= +libpthread
|
||||||
|
TITLE+= (with multithread support)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/iperf-mt/description
|
||||||
|
$(call Package/iperf/Default/description)
|
||||||
|
This package is built with multithread support.
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
define Build/Template
|
||||||
|
|
||||||
|
$(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
|
||||||
|
-$(MAKE) -C $(PKG_BUILD_DIR) clean
|
||||||
|
$(call Build/Configure/Default,$(3))
|
||||||
|
$(MAKE) -C $(PKG_BUILD_DIR)
|
||||||
|
( cd $(PKG_BUILD_DIR)/src; mv -f iperf iperf-$(2) )
|
||||||
|
touch $$@
|
||||||
|
|
||||||
|
$(STAMP_BUILT): $(STAMP_BUILT)-$(2)
|
||||||
|
|
||||||
|
define Package/$(1)/install
|
||||||
|
$(INSTALL_DIR) $$(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $$(PKG_BUILD_DIR)/src/iperf-$(2) $$(1)/usr/bin/iperf
|
||||||
|
endef
|
||||||
|
|
||||||
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
--disable-multicast \
|
--disable-multicast \
|
||||||
--disable-threads \
|
|
||||||
|
|
||||||
CONFIGURE_VARS += \
|
CONFIGURE_VARS += \
|
||||||
CPPFLAGS="$$$$CPPFLAGS -I$(STAGING_DIR)/usr/include/uClibc++" \
|
CXX="g++-uc" \
|
||||||
CXXFLAGS="$$$$CXX_CFLAGS -fno-builtin -fno-rtti -nostdinc++" \
|
CXXFLAGS="$$$$CXX_CFLAGS -fno-rtti" \
|
||||||
LIBS="-nodefaultlibs -luClibc++ -lgcc" \
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
|
||||||
all install
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/iperf/install
|
ifneq ($(SDK)$(CONFIG_PACKAGE_iperf),)
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
define Build/singlethread
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/bin/iperf $(1)/usr/bin/
|
$(call Build/Template,iperf,singlethread, \
|
||||||
|
--disable-threads \
|
||||||
|
)
|
||||||
endef
|
endef
|
||||||
|
endif
|
||||||
|
$(eval $(Build/singlethread))
|
||||||
|
|
||||||
|
ifneq ($(SDK)$(CONFIG_PACKAGE_iperf-mt),)
|
||||||
|
define Build/multithread
|
||||||
|
$(call Build/Template,iperf-mt,multithread, \
|
||||||
|
--enable-threads=posix \
|
||||||
|
LDFLAGS="$(TARGET_LDFLAGS) -lpthread" \
|
||||||
|
ac_cv_func_pthread_cancel=no \
|
||||||
|
)
|
||||||
|
endef
|
||||||
|
endif
|
||||||
|
$(eval $(Build/multithread))
|
||||||
|
|
||||||
$(eval $(call BuildPackage,iperf))
|
$(eval $(call BuildPackage,iperf))
|
||||||
|
$(eval $(call BuildPackage,iperf-mt))
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
--- iperf-2.0.2/compat/Thread.c 2005-05-03 08:15:51.000000000 -0700
|
Index: iperf-2.0.2/compat/Thread.c
|
||||||
+++ iperf-2.0.2.new/compat/Thread.c 2007-06-04 10:41:11.000000000 -0700
|
===================================================================
|
||||||
|
--- iperf-2.0.2.orig/compat/Thread.c 2007-09-26 15:01:48.000000000 +0200
|
||||||
|
+++ iperf-2.0.2/compat/Thread.c 2007-09-26 15:01:49.000000000 +0200
|
||||||
@@ -405,9 +405,13 @@
|
@@ -405,9 +405,13 @@
|
||||||
void thread_rest ( void ) {
|
void thread_rest ( void ) {
|
||||||
#if defined( HAVE_THREAD )
|
#if defined( HAVE_THREAD )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user