arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone

Blame SOURCES/glibc-rh1406732-3.patch

147e83
This patch is based on the following upstream commit:
147e83
147e83
commit b5ffdc48c20ae865b197b67e5a9068a528fbc198
147e83
Author: Florian Weimer <fweimer@redhat.com>
147e83
Date:   Thu Apr 25 10:41:52 2019 +0200
147e83
147e83
    benchtests: Enable BIND_NOW if configured with --enable-bind-now
147e83
    
147e83
    Benchmarks should reflect distribution build policies, so it makes
147e83
    sense to honor the BIND_NOW configuration for them.
147e83
    
147e83
    This commit keeps using $(+link-tests), so that the benchmarks are
147e83
    linked according to the --enable-hardcoded-path-in-tests configure
147e83
    option.
147e83
    
147e83
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
147e83
147e83
diff --git a/benchtests/Makefile b/benchtests/Makefile
147e83
index 911b6df04cc323ac..bb02d26e1847d424 100644
147e83
--- a/benchtests/Makefile
147e83
+++ b/benchtests/Makefile
147e83
@@ -153,12 +153,20 @@ bench-func: $(binaries-bench)
147e83
 	$(PYTHON) scripts/validate_benchout.py $(objpfx)bench.out \
147e83
 		scripts/benchout.schema.json
147e83
 
147e83
-$(timing-type) $(binaries-bench) $(binaries-benchset) \
147e83
-	$(binaries-bench-malloc): %: %.o $(objpfx)json-lib.o \
147e83
+ifeq ($(bind-now),yes)
147e83
+link-bench-bind-now = -Wl,-z,now
147e83
+endif
147e83
+
147e83
+bench-link-targets = $(timing-type) $(binaries-bench) $(binaries-benchset) \
147e83
+	$(binaries-bench-malloc)
147e83
+
147e83
+$(bench-link-targets): %: %.o $(objpfx)json-lib.o \
147e83
   $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \
147e83
   $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit)
147e83
 	$(+link)
147e83
 
147e83
+$(bench-link-targets): LDFLAGS += $(link-bench-bind-now)
147e83
+
147e83
 $(objpfx)bench-%.c: %-inputs $(bench-deps)
147e83
 	{ if [ -n "$($*-INCLUDE)" ]; then \
147e83
 	  cat $($*-INCLUDE); \