about summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules18
1 files changed, 13 insertions, 5 deletions
diff --git a/Makerules b/Makerules
index e8930e32a5..d8fe9775f1 100644
--- a/Makerules
+++ b/Makerules
@@ -649,17 +649,25 @@ mv -f $@.new $@
 endef
 endif
 
-# XXX The following will have to be changed when `ldconfig' is available.
-ifneq (yes,$(cross-compiling))
-ifeq (yes,$(has-ldconfig))
+ifeq (no,$(cross-compiling))
+ifeq (yes,$(build-shared))
+# We need to clean the symbolic link list first.
+symbolic-link-prog := $(common-objpfx)elf/sln
+symbolic-link-list := $(common-objpfx)elf/symlink.list
+install: install-clean-symbolic-link-list
+.PHONY: install-clean-symbolic-link-list
+install-clean-symbolic-link-list:
+	rm -f $(symbolic-link-list)
+
 define make-shlib-link
-@:
+echo $(<F) $@ >> $(symbolic-link-list)
 endef
 endif
 endif
 ifndef make-shlib-link
 define make-shlib-link
-$(make-link)
+rm -f $@
+$(LN_S) $(<F) $@
 endef
 endif