about summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules9
1 files changed, 9 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 740cc0f247..132165bb38 100644
--- a/Makerules
+++ b/Makerules
@@ -316,6 +316,15 @@ else
 no-whole-archive =
 endif
 
+interp-obj = $(common-objpfx)interp.so
+$(interp-obj): $(common-objpfx)%.so: $(..)%.c
+	$(compile-command.c)
+common-generated += interp.so
+CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"'
+
+$(common-objpfx)libc.so: $(interp-obj)
+$(patsubst %,$(objpfx)%.so,$(extra-libs)): $(interp-obj)
+
 define build-shlib
 $(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS)  \
 	  -B$(csu-objpfx) \