buildmisc: config
@cd miscmods && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) \
CC="$(CC)" CFLAGS="$(CFLAGS)" \
- CFLAGS_DYNAMIC="$(CFLAGS_DYNAMIC)" HDRS="../version.h $(PHDRS)" \
+ CFLAGS_DYNAMIC="$(CFLAGS_DYNAMIC)" \
+ LDFLAGS_PARTIAL="$(LDFLAGS_PARTIAL)" HDRS="../version.h $(PHDRS)" \
FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" \
INCLUDE="$(INCLUDE) $(IPV6_INCLUDE)"
@echo " "
# Dynamically loaded modules need to be built with -fPIC
CFLAGS_DYNAMIC=-shared -rdynamic -fPIC
+# Partial-linking needs -nostdlib
+LDFLAGS_PARTIAL=-nostdlib
+
# FreeBSD always ships with Berkeley DB
USE_DB=yes
dkim.o:
@echo "$(CC) dkim.c dkim_transport.c pdkim.c signing.c"
- $(FE)$(CC) -r -nostdlib $(CFLAGS) $(INCLUDE) \
+ $(FE)$(CC) -r $(LDFLAGS_PARTIAL) $(CFLAGS) $(INCLUDE) \
dkim.c dkim_transport.c pdkim.c signing.c -o $@
dkim.so:
#include "../exim.h"
+#include "arc_api.h"
#ifndef DISABLE_DKIM /* rest of file */