public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] New make target to only build benchmark binaries
@ 2016-04-20  3:20 Siddhesh Poyarekar
  2016-04-20  3:57 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Siddhesh Poyarekar @ 2016-04-20  3:20 UTC (permalink / raw)
  To: libc-alpha

For situations where we are cross-building or where we want to avoid
building on the target system, we want a way to only build benchmarks
and then copy them over to the target system to run them.  I have also
added a simple enhancement for the 'bench' target where all benchmark
binaries are built and then the benchmarks executed.

Tested on arm.  I'll push this tomorrow if there are no objections.

	Makefile.in (bench-build): New target.
	Rules (PHONY): Add bench-build target.
	benchtests/Makefile (bench): Depend on bench-build.
	(bench-build): New target.
---
 Makefile.in         | 2 +-
 Rules               | 2 +-
 benchtests/Makefile | 5 ++++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 710ce7e..3fe9e73 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -12,7 +12,7 @@ install:
 	LC_ALL=C; export LC_ALL; \
 	$(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
 
-bench bench-clean:
+bench bench-clean bench-build:
 	$(MAKE) -C $(srcdir)/benchtests $(PARALLELMFLAGS) objdir=`pwd` $@
 
 # Convenience target to rebuild ULPs for all math tests.
diff --git a/Rules b/Rules
index d8093b3..8306d36 100644
--- a/Rules
+++ b/Rules
@@ -83,7 +83,7 @@ common-generated += dummy.o dummy.c
 \f
 # This makes all the auxiliary and test programs.
 
-.PHONY: others tests bench
+.PHONY: others tests bench bench-build
 
 ifeq ($(build-programs),yes)
 others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs))
diff --git a/benchtests/Makefile b/benchtests/Makefile
index 61077ea..a05974e 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -128,7 +128,10 @@ bench-clean:
 	rm -f $(binaries-bench-malloc) $(addsuffix .o,$(binaries-bench-malloc))
 	rm -f $(timing-type) $(addsuffix .o,$(timing-type))
 
-bench: $(timing-type) $(gen-locales) bench-set bench-func bench-malloc
+bench: $(timing-type) $(gen-locales) bench-build bench-set bench-func \
+	bench-malloc
+# Target to only build the benchmark without running it.
+bench-build: $(binaries-bench) $(binaries-benchset) $(binaries-bench-malloc)
 
 bench-set: $(binaries-benchset)
 	for run in $^; do \
-- 
2.5.5

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] New make target to only build benchmark binaries
  2016-04-20  3:20 [PATCH] New make target to only build benchmark binaries Siddhesh Poyarekar
@ 2016-04-20  3:57 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2016-04-20  3:57 UTC (permalink / raw)
  To: Siddhesh Poyarekar; +Cc: libc-alpha

[-- Attachment #1: Type: text/plain, Size: 403 bytes --]

On 20 Apr 2016 08:49, Siddhesh Poyarekar wrote:
> For situations where we are cross-building or where we want to avoid
> building on the target system, we want a way to only build benchmarks
> and then copy them over to the target system to run them.  I have also
> added a simple enhancement for the 'bench' target where all benchmark
> binaries are built and then the benchmarks executed.

lgtm
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-04-20  3:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-20  3:20 [PATCH] New make target to only build benchmark binaries Siddhesh Poyarekar
2016-04-20  3:57 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).