Page MenuHomeFreeBSD

lib/libcrypt: unbundle hash functions
ClosedPublic

Authored by fuz on Fri, Oct 11, 3:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 5, 2:04 AM
Unknown Object (File)
Mon, Nov 4, 5:54 AM
Unknown Object (File)
Mon, Nov 4, 3:17 AM
Unknown Object (File)
Sun, Nov 3, 3:27 PM
Unknown Object (File)
Thu, Oct 31, 12:20 AM
Unknown Object (File)
Tue, Oct 29, 5:01 AM
Unknown Object (File)
Tue, Oct 29, 12:37 AM
Unknown Object (File)
Mon, Oct 28, 10:05 PM
Subscribers

Details

Summary

libcrypt bundles the various hash functions it needs,
duplicating code that is also found in libmd.
Unbundle the hash functions and apply the same hack used
for libncursesw so static consumers link -lmd in addition
to -lcrypt.

Test Plan

builds fine, passes test suite.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

fuz requested review of this revision.Fri, Oct 11, 3:50 PM

Add missing SUBDIR_DEPENDS for libcrypt, which now depends on libmd.

Doesn't seem to be doing the trick completely though?

Uploaded the wrong patch, should be fine now.

Correctly register the build dependency of libcrypt on libmd.
Thanks to @bapt for how to do this. Not sure why there are
apparently three or more places in which library dependencies
are registered.

Add a dependency to the realinstall target of libcrypt.
Apparently that is needed for the ldscript shim to be installed.

LGTM, assuming it didn't break something linking against libcrypt... the double underscore aliasing stuff seems a little suspicious.

In D47062#1073317, @fuz wrote:

Correctly register the build dependency of libcrypt on libmd.
Thanks to @bapt for how to do this. Not sure why there are
apparently three or more places in which library dependencies
are registered.

SUBDIR_DEPEND are used for tree walks, but can't be used in the earlier phases of buildworld as we have to more surgically construct the world objdir to avoid using/linking against things from the host system accidentally. It'd be nice if we could generate at least some of the Makefile.inc1 glue from lib/Makefile, but we simply don't today.

lib/libcrypt/Makefile
32

Oh dear

This revision is now accepted and ready to land.Wed, Oct 23, 2:09 PM
This revision was automatically updated to reflect the committed changes.