aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makerules b/Makerules
index 1899eb7f89..56f8cc89e6 100644
--- a/Makerules
+++ b/Makerules
@@ -553,10 +553,10 @@ ifeq (yes,$(build-shared))
lib%.so: lib%_pic.a; $(build-shlib)
define build-shlib
-$(LINK.o) -shared -o $@ -Wl,-soname \
- -Wl,lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
+$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
+ -Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
$(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
- -L$(firstword $(objdir) .) -L$(common-objpfx:%/=%) \
+ -Wl,-rpath-link=$(common-objdir) -Wl,-rpath=$(libdir) \
-Wl,--whole-archive $^ $(LDLIBS-$(@F:lib%.so=%).so)
endef
@@ -565,7 +565,7 @@ endef
# since we define our own `.init' section specially.
LDFLAGS-c.so = -nostdlib -nostartfiles
# Give libc.so an entry point and make it directly runnable itself.
-LDFLAGS-c.so += -Wl,-dynamic-linker -Wl,/lib/ld.so -e __libc_print_version
+LDFLAGS-c.so += -e __libc_print_version
# Use our own special initializer and finalizer files for libc.so.
elfobjdir := $(firstword $(objdir) $(..)elf)
$(common-objpfx)libc.so: $(elfobjdir)/soinit.so \