summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-04-24 14:13:09 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-04-24 15:43:08 +0200
commit426bebcff5daa95a78dd7acb38750f57f7faaeef (patch)
tree6ad7760f4f981f426789ba4fa4e113e6104dfe28
parenta37ecef5e2bc417d2708abafe960c1296c627a0f (diff)
downloadglibc-fw/more-bind-now.tar.gz
benchtests: Enable BIND_NOW if configured with --enable-bind-nowfw/more-bind-now
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.
-rw-r--r--ChangeLog7
-rw-r--r--benchtests/Makefile12
2 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 1eec6b7e84..70e9326258 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2019-04-24 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-24 Florian Weimer <fweimer@redhat.com>
+
Also enable BIND_NOW for programs if --enable-bind-now.
* Makeconfig [$(bind-now)] (link-extra-flags): Add -Wl,-z,now.
(+link-pie): Use $(link-extra-flags).
diff --git a/benchtests/Makefile b/benchtests/Makefile
index cdc89488d6..d294bbbb7e 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -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); \