On Mon, May 5, 2014 at 9:37 AM, Viktor Dukhovni wrote: > On Sun, May 04, 2014 at 11:59:55PM +0100, Matt Caswell wrote: >> > As far as I understand if you want to have both -lssl -lcrypto you >> > should use "openssl" instead of "libssl"? >> > >> > Anyway, I think this makes perfect sense and if things break it's >> > easy enough to fix it. >> >> I'd be interested to hear what other people think about this. I have >> to say I was in two minds about it. > > The OpenSSL documentation does not indicate which "-l" option provides > a particular function. Here are some of the more commonly used whose > "origin" is not necessarily obvious > > ... > > I can dig up more reasons why few realistic applications can get > by with explicit linkage to libssl alone. Since even those that > only directly drag in symbols from libssl still ultimately depend > on libcrypto, the cost of explicitly including -lcrypto seems to > me to be outweighed by the benefit of making life easier for users > by always providing both. > > What is the motivation to attempt to avoid "-lcrypto" here?
in case people don't actually know what is going on, openssl provides *three* pkg-config files: libssl.pc libcrypto.pc openssl.pc if you want to link against "openssl" and not worry about which libraries are required, then just use `pkg-config --libs openssl`. i am merely fixing `pkg-config --libs libssl` to not output -lcrypto all the time since people aren't asking for libcrypto here -- they're asking for libssl. my patch also fixes openssl.pc to use proper dependency lines instead of hand duplicating information already found in libssl.pc and libcrypto.pc. even if people want to keep -lcrypto in libssl.pc (even though it makes no sense), that second hunk in my patch changes nothing from the end user's point of view -- it just cleans up the internals of the generated pkg-config files. -mike ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [email protected]
