Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/gnu/usr.sbin/postfix/tlsmgr



> > LIBCRYPTO is also needed, fixes build on sun2 (static link only, so far).
>
> Could you please tell me where LIBCRYPTO gets defined?
> I can't find it in src/share/mk 

LIBCRYPTO gets defined in a loop in bsd.prog.mk:

.for _lib in \
        asn1 bsdmalloc bz2 c c_pic cdk com_err compat crypt \
        crypto crypto_idea crypto_mdc2 crypto_rc5 \
        curses dbm des edit event \
        form fl g2c gcc gnumalloc gssapi hdb intl ipsec \
        kadm kadm5clnt kadm5srv kafs kdb krb krb5 kstream kvm l \
        m magic menu objc ossaudio pam pcap pci pmc posix pthread pthread_dbg \
        radius resolv rmt roken rpcsvc rt skey sl ss ssh ssl termcap \
        usbhid util wrap y z
.ifndef LIB${_lib:tu}
LIB${_lib:tu}=  ${DESTDIR}/usr/lib/lib${_lib}.a
.MADE:          ${LIB${_lib:tu}}        # Note: ${DESTDIR} will be expanded
.endif
.endfor

> IMHO it needs to be added to bsd.hostprog.mk

Hm, is postfix's tlsmgr a host program?

Though...  It seems to me that the order of the libraries on that link
line is "off" -- I would expect -lcrypto to be needed after -lssl.
For dynamic-linking systems the ordering doesn't matter, but not so
for static-linking systems, of which we still have at least one.  Yes,
I realize that referring explicitly to the *.a fila (via LIBCRYPTO)
was not a great move, and that -l<lib> might be preferable for
referring to common system libraries.

So instead of

> -LDADD+= ${LIBPMASTER} ${LIBPGLOBAL} ${LIBPTLS} ${LIBCRYPTO} ${LIBPUTIL} -lssl
> +LDADD+= ${LIBPMASTER} ${LIBPGLOBAL} ${LIBPTLS} -lcrypto ${LIBPUTIL} -lssl

let me suggest

-DPADD+= ${LIBPMASTER} ${LIBPGLOBAL} ${LIBPTLS} ${LIBCRYPTO} ${LIBPUTIL}
+DPADD+= ${LIBPMASTER} ${LIBPGLOBAL} ${LIBPTLS} ${LIBPUTIL} ${LIBCRYPTO}
-LDADD+= ${LIBPMASTER} ${LIBPGLOBAL} ${LIBPTLS} ${LIBCRYPTO} ${LIBPUTIL} -lssl
+LDADD+= ${LIBPMASTER} ${LIBPGLOBAL} ${LIBPTLS} ${LIBPUTIL} -lssl -lcrypto

With this in place, it links both for i386 and sun2.

Regards,

- Håvard



Home | Main Index | Thread Index | Old Index