]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
benchtests: Generate .d dependency files [BZ #28922]
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 24 Feb 2022 22:10:35 +0000 (14:10 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 25 Feb 2022 18:35:25 +0000 (10:35 -0800)
1. Add all .o files to extra-objs.
2. Include ../Rules after extra-objs has been set.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
benchtests/Makefile

index 9b8df3b3f5ac01c09d0d6282f8d06951d4bfc37b..d513b29903dd7e1bc4735b234e00fd4faecdd4dd 100644 (file)
@@ -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-objs += $(addsuffix .o,$(addprefix bench-,$(bench)))
 binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
+extra-objs += $(addsuffix .o,$(addprefix bench-,$(benchset)))
 binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
+extra-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-objs += bench-timing-type.o
+
+include ../Rules
 
 # This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
 # for all these modules.