Skip to contentSkip to conversation

whetstone: new benchmark package

PATCH New Mike Frysinger 2 participants 5 messages Nov 20, 2010 – Dec 8, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 whetstone: new benchmark package

---
 package/Config.in              |    1 +
 package/whetstone/Config.in    |    6 ++++++
 package/whetstone/whetstone.mk |   37 +++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 package/whetstone/Config.in
 create mode 100644 package/whetstone/whetstone.mk
package/Config.in +1 -0
index 0b131a0..407facc 100644
@@ -27,6 +27,7 @@ source "package/memstat/Config.in"
 source "package/netperf/Config.in"
 source "package/oprofile/Config.in"
 source "package/strace/Config.in"
+source "package/whetstone/Config.in"
 source "package/valgrind/Config.in"
 endmenu
 
package/whetstone/Config.in new file +6 -0
new file mode 100644
index 0000000..7a68160
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_WHETSTONE
+	bool "whetstone"
+	help
+	  C Converted Whetstone Double Precision Benchmark
+
+	  http://www.netlib.org/benchmark/
package/whetstone/whetstone.mk new file +37 -0
new file mode 100644
index 0000000..e043f3c
@@ -0,0 +1,37 @@
+#############################################################
+#
+# whetstone
+#
+#############################################################
+
+WHETSTONE_VERSION = 1.2
+WHETSTONE_SOURCE = whetstone.c
+WHETSTONE_SITE = http://www.netlib.org/benchmark/
+
+define WHETSTONE_BUILD_CMDS
+	$(MAKE) \
+		CC="$(TARGET_CC)" 
+		CFLAGS="$(TARGET_CFLAGS) -Wall -DNO_PROTOTYPES=1"
+		LDLIBS="-lm" \
+		-C $(@D) whetstone
+endef
+
+define WHETSTONE_CLEAN_CMDS
+	rm -f $(@D)/whetstone
+endef
+
+define WHETSTONE_INSTALL_TARGET_CMDS
+	$(INSTALL) -D $(@D)/whetstone $(TARGET_DIR)/bin/whetstone
+endef
+
+define WHETSTONE_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/bin/whetstone
+endef
+
+$(eval $(call GENTARGETS,package,whetstone))
+
+$(BUILD_DIR)/whetstone-$(WHETSTONE_VERSION)/.stamp_extracted:
+	@$(call MESSAGE,"Extracting")
+	$(Q)mkdir -p $(@D)
+	$(Q)cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/
+	$(Q)touch $@
Signature · 1 line
1.7.3.2
#1 lore raw

PATCH v2 1/1 whetstone: new benchmark package

---
v2
- tweak flag passing when building

 package/Config.in              |    1 +
 package/whetstone/Config.in    |    6 ++++++
 package/whetstone/whetstone.mk |   37 +++++++++++++++++++++++++++++++++++++
 3 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 package/whetstone/Config.in
 create mode 100644 package/whetstone/whetstone.mk
package/Config.in +1 -0
index 0b131a0..407facc 100644
@@ -27,6 +27,7 @@ source "package/memstat/Config.in"
 source "package/netperf/Config.in"
 source "package/oprofile/Config.in"
 source "package/strace/Config.in"
+source "package/whetstone/Config.in"
 source "package/valgrind/Config.in"
 endmenu
 
package/whetstone/Config.in new file +6 -0
new file mode 100644
index 0000000..7a68160
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_WHETSTONE
+	bool "whetstone"
+	help
+	  C Converted Whetstone Double Precision Benchmark
+
+	  http://www.netlib.org/benchmark/
package/whetstone/whetstone.mk new file +37 -0
new file mode 100644
index 0000000..ab3c147
@@ -0,0 +1,37 @@
+#############################################################
+#
+# whetstone
+#
+#############################################################
+
+WHETSTONE_VERSION = 1.2
+WHETSTONE_SOURCE = whetstone.c
+WHETSTONE_SITE = http://www.netlib.org/benchmark/
+
+define WHETSTONE_BUILD_CMDS
+	CFLAGS="$(TARGET_CFLAGS) -Wall -DNO_PROTOTYPES=1" \
+	$(MAKE) \
+		CC="$(TARGET_CC)" \
+		LDLIBS="-lm" \
+		-C $(@D) whetstone
+endef
+
+define WHETSTONE_CLEAN_CMDS
+	rm -f $(@D)/whetstone
+endef
+
+define WHETSTONE_INSTALL_TARGET_CMDS
+	$(INSTALL) -D $(@D)/whetstone $(TARGET_DIR)/bin/whetstone
+endef
+
+define WHETSTONE_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/bin/whetstone
+endef
+
+$(eval $(call GENTARGETS,package,whetstone))
+
+$(BUILD_DIR)/whetstone-$(WHETSTONE_VERSION)/.stamp_extracted:
+	@$(call MESSAGE,"Extracting")
+	$(Q)mkdir -p $(@D)
+	$(Q)cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/
+	$(Q)touch $@
Signature · 1 line
1.7.3.2
#2 lore raw

PATCH v2 1/1 whetstone: new benchmark package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Mike" == Mike Frysinger <[email protected]> writes:

Mike> Signed-off-by: Mike Frysinger <[email protected]> Mike> ---
Mike> v2
Mike> - tweak flag passing when building

Mike> diff --git a/package/whetstone/Config.in b/package/whetstone/Config.in Mike> new file mode 100644
Mike> index 0000000..7a68160
Mike> --- /dev/null
Mike> +++ b/package/whetstone/Config.in
Mike> @@ -0,0 +1,6 @@
Mike> +config BR2_PACKAGE_WHETSTONE
Mike> + bool "whetstone"
Mike> + help
Mike> + C Converted Whetstone Double Precision Benchmark
Mike> +
Mike> + http://www.netlib.org/benchmark/
Mike> diff --git a/package/whetstone/whetstone.mk b/package/whetstone/whetstone.mk Mike> new file mode 100644
Mike> index 0000000..ab3c147
Mike> --- /dev/null
Mike> +++ b/package/whetstone/whetstone.mk
Mike> @@ -0,0 +1,37 @@
Mike> +############################################################# Mike> +#
Mike> +# whetstone
Mike> +#
Mike> +############################################################# Mike> +
Mike> +WHETSTONE_VERSION = 1.2
Mike> +WHETSTONE_SOURCE = whetstone.c
Mike> +WHETSTONE_SITE = http://www.netlib.org/benchmark/
Mike> +
Mike> +define WHETSTONE_BUILD_CMDS
Mike> + CFLAGS="$(TARGET_CFLAGS) -Wall -DNO_PROTOTYPES=1" \
Mike> + $(MAKE) \
Mike> + CC="$(TARGET_CC)" \
Mike> + LDLIBS="-lm" \
Mike> + -C $(@D) whetstone

Please don't add hardcoded cflags like -Wall. As it's a single file, I would prefer to call $(TARGET_CC) directly instead of using make.

Also don't forget TARGET_LDFLAGS.

Mike> +endef
Mike> +
Mike> +define WHETSTONE_CLEAN_CMDS
Mike> + rm -f $(@D)/whetstone
Mike> +endef
Mike> +
Mike> +define WHETSTONE_INSTALL_TARGET_CMDS
Mike> + $(INSTALL) -D $(@D)/whetstone $(TARGET_DIR)/bin/whetstone

I would have expected it to get installed into /usr/bin

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH v3 1/1 whetstone: new benchmark package

In reply to Mike Frysinger

---
v3
- leverage TARGET_CONFIGURE_OPTS
- install into /usr/bin

 package/Config.in              |    1 +
 package/whetstone/Config.in    |    6 ++++++
 package/whetstone/whetstone.mk |   33 +++++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 0 deletions(-)
 create mode 100644 package/whetstone/Config.in
 create mode 100644 package/whetstone/whetstone.mk
package/Config.in +1 -0
index d3629ff..d6e0a55 100644
@@ -27,6 +27,7 @@ source "package/memstat/Config.in"
 source "package/netperf/Config.in"
 source "package/oprofile/Config.in"
 source "package/strace/Config.in"
+source "package/whetstone/Config.in"
 source "package/valgrind/Config.in"
 endmenu
 
package/whetstone/Config.in new file +6 -0
new file mode 100644
index 0000000..7a68160
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_WHETSTONE
+	bool "whetstone"
+	help
+	  C Converted Whetstone Double Precision Benchmark
+
+	  http://www.netlib.org/benchmark/
package/whetstone/whetstone.mk new file +33 -0
new file mode 100644
index 0000000..d47fbcd
@@ -0,0 +1,33 @@
+#############################################################
+#
+# whetstone
+#
+#############################################################
+
+WHETSTONE_VERSION = 1.2
+WHETSTONE_SOURCE = whetstone.c
+WHETSTONE_SITE = http://www.netlib.org/benchmark/
+
+define WHETSTONE_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(MAKE) LDLIBS="-lm" -C $(@D) whetstone
+endef
+
+define WHETSTONE_CLEAN_CMDS
+	rm -f $(@D)/whetstone
+endef
+
+define WHETSTONE_INSTALL_TARGET_CMDS
+	$(INSTALL) -D $(@D)/whetstone $(TARGET_DIR)/usr/bin/whetstone
+endef
+
+define WHETSTONE_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/bin/whetstone
+endef
+
+$(eval $(call GENTARGETS,package,whetstone))
+
+$(BUILD_DIR)/whetstone-$(WHETSTONE_VERSION)/.stamp_extracted:
+	@$(call MESSAGE,"Extracting")
+	$(Q)mkdir -p $(@D)
+	$(Q)cp $(DL_DIR)/$($(PKG)_SOURCE) $(@D)/
+	$(Q)touch $@
Signature · 1 line
1.7.3.2
#4 lore raw

PATCH v3 1/1 whetstone: new benchmark package

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Mike" == Mike Frysinger <[email protected]> writes:

Mike> Acked-by: Thomas Petazzoni <[email protected]> Mike> Signed-off-by: Mike Frysinger <[email protected]> Mike> ---
Mike> v3

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard