Fix dkim-static build for Solaris
authorJeremy Harris <jgh146exb@wizmail.org>
Fri, 6 Sep 2024 13:19:38 +0000 (14:19 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Fri, 6 Sep 2024 13:43:57 +0000 (14:43 +0100)
Broken-by: 44876330aea2
src/OS/Makefile-Base
src/OS/Makefile-FreeBSD
src/src/miscmods/Makefile
src/src/miscmods/dkim_transport.c

index 857c44776726d248e691d0ec067332be4d4fcbe0..ccbe3ccdd0c7639d55eedf84919c095d3bac5699 100644 (file)
@@ -1068,7 +1068,8 @@ buildauths: config
 buildmisc: config
         @cd miscmods && $(MAKE) SHELL=$(SHELL) AR="$(AR)" $(MFLAGS) \
           CC="$(CC)" CFLAGS="$(CFLAGS)" \
 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 " "
             FE="$(FE)" RANLIB="$(RANLIB)" RM_COMMAND="$(RM_COMMAND)" \
             INCLUDE="$(INCLUDE) $(IPV6_INCLUDE)"
         @echo " "
index ca1073e11b75feb2980359c0e4a1ca3a527e8f55..5f01b84e695c121ef7c2337b7ebb7e3de156b5f0 100644 (file)
@@ -20,6 +20,9 @@ LIBS=-lcrypt -lm -lutil -lexecinfo
 # Dynamically loaded modules need to be built with -fPIC
 CFLAGS_DYNAMIC=-shared -rdynamic -fPIC
 
 # 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
 
 # FreeBSD always ships with Berkeley DB
 USE_DB=yes
 
index 64a66276f3a48a538b6697e954b504a2e6db51e1..a4ffcfc92c31e1c4d4b50ca628efb93e10db3919 100644 (file)
@@ -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"
 
 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:
                        dkim.c dkim_transport.c pdkim.c signing.c -o $@
 
 dkim.so:
index e2d1705e3722d32092cfda6a5601f424554a0364..f367df1ad400679855689fe6a2db77c5a35f5314 100644 (file)
@@ -11,6 +11,7 @@
 
 
 #include "../exim.h"
 
 
 #include "../exim.h"
+#include "arc_api.h"
 
 #ifndef DISABLE_DKIM   /* rest of file */
 
 
 #ifndef DISABLE_DKIM   /* rest of file */