From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] On the usefulness of .la files and .pc files
Date: Wed, 18 Mar 2009 19:47:36 +0100 [thread overview]
Message-ID: <20090318194736.0974ecc6@surf> (raw)
In-Reply-To: <1237397085.6302.16.camel@sven>
Hi Sven,
Le Wed, 18 Mar 2009 18:24:45 +0100,
Sven Neumann <s.neumann@phase-zero.de> a ?crit :
> This tells libtool how to link a particular library.
What do you mean by ? link a particular library ? :
1) How to create the library itself (i.e, the .so file)
2) How to link an application or another library *against* the
considered library ?
> This is mainly useful on platforms that need libraries to be
> explicitly linked.
By ? explicitly linked ?, you mean that when compiling library A, that
depends on B, which itself depends on C, you need to use -lB -lC, while
on Linux, giving -lB is enough ?
> On Linux this is actually not needed and you may safely remove those
> files.
So, why do we keep them and even patch them in Buildroot (see the
$(BUILD_DIR)/%/.stamp_staging_installed: rule in
package/Makefile.autotools.in). If the .la files are not patched (with
the modification of the libdir variable), then the link step of other
libraries or applications depending on the library fail. So the .la
files are clearly used.
> > Many libraries also install a .pc file in /usr/lib/pkgconfig/. It
> > also describe the dependencies, the library name, the flags to
> > compile new applications/libraries on top of the library, etc.
>
> This gives hints on to compile stuff against the library. It is much
> more useful than the .la files as it allows to easily check for the
> presence of a library, it's version, dependencies and what compiler
> flags are needed.
Ok. This is understood.
Thanks for your clarification!
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers and embedded Linux development,
consulting, training and support.
http://free-electrons.com
prev parent reply other threads:[~2009-03-18 18:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 16:44 [Buildroot] On the usefulness of .la files and .pc files Thomas Petazzoni
2009-03-18 17:24 ` Sven Neumann
2009-03-18 18:47 ` Thomas Petazzoni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090318194736.0974ecc6@surf \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox