diff --git a/Makefile b/Makefile
index b7da7f8f2fb4259001f949aef7605fcb7cc6100f..9d36ce6b94e8d0cff81edae276a5d59ea3392267 100644
--- a/Makefile
+++ b/Makefile
@@ -89,7 +89,7 @@ $(BUILD)/release/libc.a: $(BUILD)/release/librelibc.a $(BUILD)/pthreads-emb/libp
 	ar -M < "$@.mri"
 
 $(BUILD)/release/libc.so: $(BUILD)/release/librelibc.patched.a $(BUILD)/pthreads-emb/libpthread.a $(BUILD)/openlibm/libopenlibm.a
-	$(CC) -shared -Wl,--whole-archive $^ -Wl,--no-whole-archive -o $@
+	$(CC) -nostdlib -shared -Wl,--whole-archive $^ -Wl,--no-whole-archive -o $@
 
 $(BUILD)/debug/librelibc.a: $(SRC)
 	$(CARGO) rustc $(CARGOFLAGS) -- --emit link=$@ $(RUSTCFLAGS)