9832fd
This patch enables building memusagestat with BIND_NOW enabled.
9832fd
9832fd
Upstream, this change was part of the following commit...
9832fd
9832fd
commit f9b645b4b0a10c43753296ce3fa40053fa44606a
9832fd
Author: Mike Frysinger <vapier@gentoo.org>
9832fd
Date:   Wed Apr 24 13:32:22 2019 +0200
9832fd
9832fd
    memusagestat: use local glibc when linking [BZ #18465]
9832fd
9832fd
...but since that commit cannot be backported to RHEL-7, this patch
9832fd
adds only the BIND_NOW linker flag at the appropriate place instead.
9832fd
9832fd
diff --git a/malloc/Makefile b/malloc/Makefile
9832fd
index 476208cf43d211c9..992cec6b03115a76 100644
9832fd
--- a/malloc/Makefile
9832fd
+++ b/malloc/Makefile
9832fd
@@ -142,7 +142,7 @@ lib := memusagestat
9832fd
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
9832fd
 
9832fd
 $(objpfx)memusagestat: $(memusagestat-modules:%=$(objpfx)%.o)
9832fd
-	$(LINK.o) -o $@ $^ $(libgd-LDFLAGS) -lgd -lpng -lz -lm
9832fd
+	$(LINK.o) -Wl,-z,now -o $@ $^ $(libgd-LDFLAGS) -lgd -lpng -lz -lm
9832fd
 
9832fd
 include ../Rules
9832fd