From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 14 12:32:11 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DAFC16A404 for ; Fri, 14 Apr 2006 12:32:11 +0000 (UTC) (envelope-from tomoyuki@pobox.com) Received: from proof.pobox.com (proof.pobox.com [207.106.133.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id E041343D48 for ; Fri, 14 Apr 2006 12:32:10 +0000 (GMT) (envelope-from tomoyuki@pobox.com) Received: from proof (localhost [127.0.0.1]) by proof.pobox.com (Postfix) with ESMTP id EB00EE5179; Fri, 14 Apr 2006 08:32:09 -0400 (EDT) Received: from localhost (ZH076183.ppp.dion.ne.jp [222.3.76.183]) (using SSLv3 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by proof.sasl.smtp.pobox.com (Postfix) with ESMTP id BA7733B3E3; Fri, 14 Apr 2006 08:32:07 -0400 (EDT) Date: Fri, 14 Apr 2006 21:31:52 +0900 (JST) Message-Id: <20060414.213152.74737565.tomoyuki@pobox.com> To: jeremie@le-hen.org From: Tomoyuki Murakami In-Reply-To: <20060413211224.GO71412@obiwan.tataz.chchile.org> References: <20060413211224.GO71412@obiwan.tataz.chchile.org> X-Fingerprint: 3A 3C 3D 8A D3 7F D7 AC 0C 1C 2E C6 E1 8B 12 5B X-PGP-Key-URL: http://www.c-wind.com/tomoyuki@pobox.com.asc X-Mailer: Mew version 4.2.54 on Emacs 21.4 / Mule 5.0 (SAKAKI) X-Face: &9m:"[g#xi7*b@EePhiQRN|!8v_ZLJ2y36k=5R22P_.h].I8ti_*00uUULxu-o, 1)qF==5\ gB6^TJo0,+L!y?=zxth0iJbo65d List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Apr 2006 12:32:11 -0000 ----Security_Multipart(Fri_Apr_14_21_31_52_2006_253)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit >>> On Thu, 13 Apr 2006 23:12:24 +0200, >>> Jeremie Le Hen wrote: jeremie> If I comment out the variable assignements : jeremie> % .if !defined(NO_CRYPT) && !defined(NO_OPENSSL) jeremie> % #CFLAGS+= -DWITH_SSL jeremie> % #DPADD= ${LIBSSL} ${LIBCRYPTO} jeremie> % #LDADD= -lssl -lcrypto jeremie> % .endif jeremie> jeremie> The resulting linker command is now : jeremie> % /usr/bin/ld -V -Bshareable -o libfetch.so.4 /usr/lib/crti.o /usr/lib/crtbeginS.o -L/usr/lib -x -soname libfetch.so.4 file.So http.So ftp.So common.So fetch.So -lgcc_pic -lgcc_pic /usr/lib/crtendS.o /usr/lib/crtn.o jeremie> jeremie> As you can see, we don't have "-lssl -lcrypto" any more. However, ldd(1) jeremie> still says that libfetch.so is linked against those libraries : jeremie> % jarjarbinks# ldd libfetch.so jeremie> % libfetch.so: jeremie> % libssl.so.4 => /usr/lib/libssl.so.4 (0x2c72e000) jeremie> % libcrypto.so.4 => /lib/libcrypto.so.4 (0x2cd74000) jeremie> jeremie> Only linking addresses change, but they do at every compilation. jeremie> jeremie> I would be glad if someone could explain why this happens. Makefile of libfetch includes .include at last line, and, you can see /usr/share/mk/bsd.lib.mk includes bsd.libnames.mk this makefile has .... .if defined(LDFLAGS) && !empty(LDFLAGS:M-static) .if !defined(NO_KERBEROS) && !defined(NOCRYPT) && !defined(NO_OPENSSL) LIBPAM+= ${LIBKRB5} ${LIBASN1} ${LIBCRYPTO} ${LIBCRYPT} \ ${LIBROKEN} ${LIBCOM_ERR} MINUSLPAM+= -lkrb5 -lasn1 -lcrypto -lcrypt -lroken -lcom_err .endif LIBPAM+= ${LIBRADIUS} ${LIBTACPLUS} ${LIBCRYPT} \ ${LIBUTIL} ${LIBOPIE} ${LIBMD} MINUSLPAM+= -lradius -ltacplus -lcrypt \ -lutil -lopie -lmd .... So, if you wouldn't like to do with -lssl and -lcrypto, define NO_CRYPTO and NO_OPENSSL appropriately. e.g. in make.conf. --- Tomo ----Security_Multipart(Fri_Apr_14_21_31_52_2006_253)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iQCVAwUARD+WPscdBA2xrHKhAQIT7QP7BUxbukLWLYdgs/xveGrm57MAQuM29Cht ECTB6d6o5a2QGkeuSXuPndeASqz5u/YMdcJHoQjmd3YR9dAd4nOWbtKaDcwvppML z1k82Qmn09NYUSpLwEZxqWpHc/RDAFo6NW9xpPjtnCYHAdzQyu0FE1z25h+SvYn3 op8yfFzzzzE= =Lx3J -----END PGP SIGNATURE----- ----Security_Multipart(Fri_Apr_14_21_31_52_2006_253)----