From: Jeremy Harris Date: Fri, 6 Sep 2024 13:19:38 +0000 (+0100) Subject: Fix dkim-static build for Solaris X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/dff7867f39b72466ba376333a029121dde448cd8 Fix dkim-static build for Solaris Broken-by: 44876330aea2 --- diff --git a/src/OS/Makefile-Base b/src/OS/Makefile-Base index 857c44776..ccbe3ccdd 100644 --- a/src/OS/Makefile-Base +++ b/src/OS/Makefile-Base @@ -1068,7 +1068,8 @@ buildauths: config 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 " " diff --git a/src/OS/Makefile-FreeBSD b/src/OS/Makefile-FreeBSD index ca1073e11..5f01b84e6 100644 --- a/src/OS/Makefile-FreeBSD +++ b/src/OS/Makefile-FreeBSD @@ -20,6 +20,9 @@ LIBS=-lcrypt -lm -lutil -lexecinfo # 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 diff --git a/src/src/miscmods/Makefile b/src/src/miscmods/Makefile index 64a66276f..a4ffcfc92 100644 --- a/src/src/miscmods/Makefile +++ b/src/src/miscmods/Makefile @@ -41,7 +41,7 @@ spf.o spf.so: $(HDRS) spf.h spf.c 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: diff --git a/src/src/miscmods/dkim_transport.c b/src/src/miscmods/dkim_transport.c index e2d1705e3..f367df1ad 100644 --- a/src/src/miscmods/dkim_transport.c +++ b/src/src/miscmods/dkim_transport.c @@ -11,6 +11,7 @@ #include "../exim.h" +#include "arc_api.h" #ifndef DISABLE_DKIM /* rest of file */