Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Samuli Suominen <ssuominen@g.o>
Subject: Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
Date: Tue, 13 Sep 2011 00:46:53 +0300
On 09/13/2011 12:00 AM, Donnie Berkholz wrote:
> On 21:57 Mon 12 Sep     , Michał Górny wrote:
>> Right now, autotools-utils.eclass punts .la files only with
>> USE=-static-libs. We'd like to broaden the range of it and strip .la
>> files when they are not necessary for static linkage as well.
>>
>> The following patch introduces an initial support for that. It assumes
>> that the .la file can be removed if the library is mentioned in any of
>> pkg-config files installed by the package, or if doesn't specify any
>> dependency libs nor linker flags.
> 
> If I understand correctly, this will break for any packages that don't 
> use pkg-config to link. The maintainers will manually need to add 
> pkg-config calls to the ebuilds of anything that could statically link 
> against a library using only libtool and not pkg-config. Is that 
> accurate?

Yes, seems accurate.

I can think of 'export PKG_CONFIG="$($(tc-getPKG_CONFIG) --static)' or
something like 'export FOO_LIBS="$($(tc-getPKG_CONFIG) --libs --static
foo)"' to accomplish getting static flags from an ebuild using
toolchain-funcs.eclass if required.

Or they do it like lvm2 and cryptsetup at upstream level and add
support for statically linking the tools in the build-system.

The .la files are not helping packages not using libtool in any case,
for example, those using cmake as build-system.

And I've yet to see a real, in portage residing, example of where this
would really break anything and when I will, I'll gladly help migrating
it to the example mentioned above... Overall, corner cases that can be
easily worked around, yet punting the *harmful* .la files.

- Samuli


Replies:
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
-- Donnie Berkholz
References:
[PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
-- Michał Górny
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
-- Donnie Berkholz
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
Next by thread:
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
Previous by date:
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.
Next by date:
Re: [PATCH] autotools-utils.eclass: punt unnecessary .la files even w/ USE=static-libs.


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.