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