about summary refs log tree commit diff
path: root/Makeconfig
diff options
context:
space:
mode:
Diffstat (limited to 'Makeconfig')
-rw-r--r--Makeconfig3
1 files changed, 2 insertions, 1 deletions
diff --git a/Makeconfig b/Makeconfig
index 38589e7ebe..3134132fcc 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -303,7 +303,8 @@ ifndef +link
 +link = $(CC) -nostdlib -nostartfiles -o $@ \
 	      $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS)  \
 	      $(addprefix $(csu-objpfx),start.o) $(+preinit) \
-	      $(filter-out $(common-objpfx)libc%,$^) \
+	      $(filter-out $(addprefix $(csu-objpfx),start.o) $(+preinit) \
+		$(link-extra-libs) $(common-objpfx)libc% $(+postinit),$^) \
 	      $(link-extra-libs) $(link-libc) $(+postinit)
 endif
 ifndef config-LDFLAGS