[systemd-devel] [PATCH 3/6] nss-myhostname: integrate into systemd buildsystem
Bryan Kadzban
bryan at kadzban.is-a-geek.net
Sun Jan 6 10:46:22 PST 2013
Tollef Fog Heen wrote:
> ]] Tom Gundersen
>
>> This was what the old nss-myhostname did. Lennart: any good reason
>> to exclude the .la or should nss-myhostname be treated the same as
>> the other libs?
>
> .la files are only useful for static linking.
Untrue. They're perfectly useful for dynamic linking as well:
http://www.sourceware.org/autobook/autobook/autobook_68.html#SEC68
Second paragraph. Also the page several sections after this one, about
installing a shared library with libtool.
> (I hold that static linking in general is a bad idea and .la files
> should just go away entirely on Linux, but this is not a universally
> held opinion.)
No, because that opinion would defeat the whole purpose of libtool,
which is to have a single interface (in terms of commands that get run)
that's portable both across Unix-like OSes, and across shared vs. static
libraries by adding one flag.
On Linux the .la files are probably not necessary for shared libs, no --
but using libtool to find them still is, if the code ever expects to
compile on another system. And not everyone has the systemd "all the
world is Linux" viewpoint; some projects can't afford to be that
fragmentary toward other Unix implementations.
On the other hand, if nothing else ever has to link against this library
(if it's an nss provider in glibc for instance), then sure, kill the .la
file. But be sure it isn't needed first.
More information about the systemd-devel
mailing list