public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] benchtests: Generate .d dependency files [BZ #28922]
@ 2022-02-24 21:56 H.J. Lu
  2022-02-25 15:26 ` Carlos O'Donell
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 2022-02-24 21:56 UTC (permalink / raw)
  To: libc-alpha

1. Add all .o files to extra-test-objs.
2. Include ../Rules after extra-test-objs has been set.
---
 benchtests/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/benchtests/Makefile b/benchtests/Makefile
index 9b8df3b3f5..363182ddbb 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -296,11 +296,12 @@ bench-extra-objs = json-lib.o
 extra-objs += $(bench-extra-objs)
 others-extras = $(bench-extra-objs)
 
-include ../Rules
-
 binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
+extra-test-objs += $(addsuffix .o,$(addprefix bench-,$(bench)))
 binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
+extra-test-objs += $(addsuffix .o,$(addprefix bench-,$(benchset)))
 binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
+extra-test-objs += $(addsuffix .o,$(addprefix bench-,$(bench-malloc)))
 
 # The default duration: 1 seconds.
 ifndef BENCH_DURATION
@@ -334,6 +335,9 @@ run-bench = $(test-wrapper-env) \
 	    $($*-ENV) $(test-via-rtld-prefix) $${run}
 
 timing-type := $(objpfx)bench-timing-type
+extra-test-objs += bench-timing-type.o
+
+include ../Rules
 
 # This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
 # for all these modules.
-- 
2.35.1


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

* Re: [PATCH] benchtests: Generate .d dependency files [BZ #28922]
  2022-02-24 21:56 [PATCH] benchtests: Generate .d dependency files [BZ #28922] H.J. Lu
@ 2022-02-25 15:26 ` Carlos O'Donell
  0 siblings, 0 replies; 2+ messages in thread
From: Carlos O'Donell @ 2022-02-25 15:26 UTC (permalink / raw)
  To: H.J. Lu, libc-alpha

On 2/24/22 16:56, H.J. Lu via Libc-alpha wrote:
> 1. Add all .o files to extra-test-objs.
> 2. Include ../Rules after extra-test-objs has been set.

LGTM.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  benchtests/Makefile | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/benchtests/Makefile b/benchtests/Makefile
> index 9b8df3b3f5..363182ddbb 100644
> --- a/benchtests/Makefile
> +++ b/benchtests/Makefile
> @@ -296,11 +296,12 @@ bench-extra-objs = json-lib.o
>  extra-objs += $(bench-extra-objs)
>  others-extras = $(bench-extra-objs)
>  
> -include ../Rules
> -

OK. Should be *after* all of these settings.

>  binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
> +extra-test-objs += $(addsuffix .o,$(addprefix bench-,$(bench)))
>  binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
> +extra-test-objs += $(addsuffix .o,$(addprefix bench-,$(benchset)))
>  binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
> +extra-test-objs += $(addsuffix .o,$(addprefix bench-,$(bench-malloc)))
>  
>  # The default duration: 1 seconds.
>  ifndef BENCH_DURATION
> @@ -334,6 +335,9 @@ run-bench = $(test-wrapper-env) \
>  	    $($*-ENV) $(test-via-rtld-prefix) $${run}
>  
>  timing-type := $(objpfx)bench-timing-type
> +extra-test-objs += bench-timing-type.o
> +
> +include ../Rules

OK.

>  
>  # This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
>  # for all these modules.


-- 
Cheers,
Carlos.


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

end of thread, other threads:[~2022-02-25 15:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 21:56 [PATCH] benchtests: Generate .d dependency files [BZ #28922] H.J. Lu
2022-02-25 15:26 ` Carlos O'Donell

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).