Thread (3 messages) flat view 3 messages, 2 authors, 2016-08-13

Re: [PATCH] Makefile: Add NEEDS_CRYPTO_WITH_SSL

From: Alex Riesen <hidden>
Date: 2016-08-13 23:17:18
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

On Sat, Aug 15, 2009 at 18:46, Brian
Gernhardt[off-list ref] wrote:
 After adding BLK_SHA1 to my config.mak, git-imap-send started giving me link
 errors:

 Undefined symbols:
   "_ERR_get_error", referenced from:
       _ssl_socket_perror in imap-send.o
   "_ERR_error_string", referenced from:
       _ssl_socket_perror in imap-send.o

 Some investigation led me to the fact that BLK_SHA1 removes LIB_4_CRYPTO from
 EXTLIBS.  That let me find the missing functions in libcrypto.  At first I
 considered making NEEDS_SSL_WITH_CRYPTO add -lcrypto to the SSL build flags
 but decided to go this route in case there are platforms that need it one way
 around and not the other.
As imap-send is the only one which uses the symbols, why not just add
LIB_4_CRYPTO
to its linking command? Like in the broken GMail-patch below:
diff --git a/Makefile b/Makefile
index 02ff867..33971f3 100644
--- a/Makefile
+++ b/Makefile
@@ -1503,7 +1503,7 @@ git-%$X: %.o $(GITLIBS)

 git-imap-send$X: imap-send.o $(GITLIBS)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
-		$(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL)
+		$(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO)

 http.o http-walker.o http-push.o: http.h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help