about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/Makefile')
-rw-r--r--sysdeps/mach/hurd/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index 586ca4a20c..f34a577c49 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -184,6 +184,16 @@ link-libc-static := $(link-libc) -Wl,-\( \
 endif
 endif
 
+ifeq ($(subdir),csu)
+
+extra-objs += static-start.o
+
+# We need special startup code for statically linked binaries.
+$(objpfx)crt0.o: $(objpfx)static-start.o $(objpfx)abi-note.o $(objpfx)init.o
+	$(link-relocatable)
+
+endif
+
 ifeq (hurd, $(subdir))
 sysdep_routines += cthreads
 endif