aboutsummaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 64282fb..f19a9f7 100644
--- a/Makerules
+++ b/Makerules
@@ -342,8 +342,14 @@ ifeq (yes,$(build-shared))
# on other shared objects.
lib%.so: lib%_pic.a
$(LINK.o) -shared -o $@ -Wl,--whole-archive $< \
+ $(LDFLAGS-$(notdir $*).so) \
-L$(firstword $(objdir) .) -L$(common-objpfx:%/=%) \
$(LDLIBS-$(notdir $*).so)
+
+# Don't try to use -lc when making libc.so itself.
+# Also omits crti.o and crtn.o, which we do not want
+# since we define our own `.init' section specially.
+LDFLAGS-c.so = -nostdlib
endif
libobjs: $(foreach o,$(object-suffixes),\