]> sourceware.org Git - glibc.git/commitdiff
benchtests: Enable BIND_NOW if configured with --enable-bind-now
authorFlorian Weimer <fweimer@redhat.com>
Thu, 25 Apr 2019 08:41:52 +0000 (10:41 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 25 Apr 2019 08:41:52 +0000 (10:41 +0200)
Benchmarks should reflect distribution build policies, so it makes
sense to honor the BIND_NOW configuration for them.

This commit keeps using $(+link-tests), so that the benchmarks are
linked according to the --enable-hardcoded-path-in-tests configure
option.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
ChangeLog
benchtests/Makefile

index 3b678cf37b96a689d48e7e9325797c455cf05c19..d735e1c43713db652c7c4fcc92f4e1bcd9bfa81b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-04-25  Florian Weimer  <fweimer@redhat.com>
+
+       benchtests: Enable BIND_NOW if configured with --enable-bind-now.
+       * benchtests/Makefile [$(bind-now)] (link-bench-bind-now): Set.
+       (bench-link-targets): New variable.
+       ($(binaries-bench) …): Use it.  Set LDFLAGS accordingly.
+
 2019-04-25  Florian Weimer  <fweimer@redhat.com>
 
        Also enable BIND_NOW for programs if --enable-bind-now.
index c9dca7e0111800b075f2eb5e4260afff8703a8cb..b8ac9ead33408241fcb915cb2bf306d93b81d356 100644 (file)
@@ -236,13 +236,21 @@ bench-func: $(binaries-bench)
          scripts/benchout.schema.json; \
        fi
 
-$(timing-type) $(binaries-bench) $(binaries-benchset) \
-       $(binaries-bench-malloc): %: %.o $(objpfx)json-lib.o \
+ifeq ($(bind-now),yes)
+link-bench-bind-now = -Wl,-z,now
+endif
+
+bench-link-targets = $(timing-type) $(binaries-bench) $(binaries-benchset) \
+       $(binaries-bench-malloc)
+
+$(bench-link-targets): %: %.o $(objpfx)json-lib.o \
        $(link-extra-libs-tests) \
   $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
   $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
        $(+link-tests)
 
+$(bench-link-targets): LDFLAGS += $(link-bench-bind-now)
+
 $(objpfx)bench-%.c: %-inputs $(bench-deps)
        { if [ -n "$($*-INCLUDE)" ]; then \
          cat $($*-INCLUDE); \
This page took 0.070277 seconds and 5 git commands to generate.