--- a/src/miscmods/Makefile
+++ b/src/miscmods/Makefile
@@ -62,7 +62,7 @@ dkim.o:
 	$(FE)$(CC) -c $(CFLAGS) $(INCLUDE) pdkim.c
 	$(FE)$(CC) -c $(CFLAGS) $(INCLUDE) $(TLS_INCLUDE) signing.c
 	$(FE)mv dkim.o dkim_tmp.o
-	$(FE)ld -r -o dkim.o $(LDFLAGS_PARTIAL) \
+	$(FE)$(CC) -r -o dkim.o $(LDFLAGS_PARTIAL) \
 		dkim_tmp.o dkim_transport.o pdkim.o signing.o
 
 # Similarly, we want a single .so for the dynamic-load module
