bug-gnulib
[Top][All Lists]
Advanced

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

Re: sort and -lm


From: Pádraig Brady
Subject: Re: sort and -lm
Date: Sat, 7 Oct 2023 12:42:21 +0100
User-agent: Mozilla Thunderbird

On 07/10/2023 04:38, Paul Eggert wrote:
On 2023-10-06 19:33, Bruno Haible wrote:
Why would that be a problem? The average run time of a 'sort' invocation
is long enough that an additional link dependency to libm shouldn't matter.

We've avoided -lm in the past, I think more to avoid the dependency.

If you really want to minimize the startup time, you could load the libcrypto,
needed for the option '--random', using dlopen() ? I wouldn't advocate it as
a solution on all platforms, since libltdl surely has its own set of
portability problems. But guarded by a '#ifdef __GLIBC__', why not?

Yes, that sounds like it might be a win too. I hadn't noticed the
dependency on libcrypto (and libz).


FYI.

coreutils auto links with libcrypto >=3 since it's GPL compat,
and quite a bit faster than the fallback routines.
libz is a transitive dependency of libcrypto.

The auto linking is globally controlled with the --with-openssl
cofigure option, but you could build sort (and md5sum)
without that dependency with:

  ./configure ac_cv_lib_crypto_MD5=no

cheers,
Pádraig



reply via email to

[Prev in Thread] Current Thread [Next in Thread]