[Lunar-commits] <moonbase> enchant: no statics
Auke Kok
auke at foo-projects.org
Wed Jun 22 07:03:56 CEST 2011
On 06/21/2011 09:39 PM, wookietreiber wrote:
> On Tue, Jun 21, 2011 at 08:47:11PM -0700, Auke Kok wrote:
>> On 06/21/2011 10:03 AM, wookietreiber wrote:
>>> hi
>>>
>>> I usually figure out about statics after I lin'ed new modules with
>>> lvu install mod, I don't actively search for them
>>>
>>>
>>> suggestion:
>>>
>>> make default configure use --disable-static and, for build important
>>> modules,
>>> like gcc or binutils, use a var in DETAILS, like STATIC=on.
>>>
>>> This would let us easily stay
>>> - static-free for all non-essential stuff, i.e. no rebuilds needed to make
>>> changes visible
>>> - and static-save, i.e. modules required for the build process won't break
>>> instantly with a broken dependency
>>
>> well, frankly, the energy you're putting into making modules non-static
>> is a waste of time. You've got 3000 more modules to do, why not think
>> about it in a creative way?
>>
>> We already have "bad_flags" which removes stuff from CFLAGS and the
>> like, why not extend it to remove things from OPTS too? then we can just
>> do:
>>
>> bad_flags --disable-static
>>
>> in gcc/BUILD
>>
>> and you, personally, can just run:
>>
>> lunar set OPTS --disable-static
>>
>> hint: I'll take a patch against optimize.lunar....
>>
>> Auke
>
> my #1 solution would be that everyone could decide for themselves whether or
> not to build a static/shared only or mixed system. This would be configured
> with a small menu:
>
>
> title: C/C++ modules
>
> [ ] static (tooltip: faster app startup, rebuilds to make changes visible)
> [ ] shared (tooltip: slower app startup, no rebuilds to make changes visible)
>
>
> no selection (default): no modification: modules lin as they normally would
> static only: add --enable-static AND --disable-shared to OPTS
> shared only: add --disable-static AND --enable-shared to OPTS
> both static and shared: add --enable-static AND --enable-shared to OPTS
>
>
> we also have to make the settings easily accessible since still a lot of
> modules do not have configure scripts and require Makefile hacking to enforce
> the kind of build.
>
> what do you think about this solution?
first of all, disabling static libs is something different altogether
than disabling shared libs, which is the stupidest thing to do for a
distro like lunar. Let's not even go there.
second of all, we can think about a UI later, and should just focus on
getting the idea of globally disabling static builds. We do that by
exploring the concept and testing it. If the concept is OK, we write
some code to enable it in the right way. And then, we write some UI
parts if it works properly and is tested by a few developers and
possibly users.
So, step (1) is: test whether having --disable-static in OPTS globally
doesn't break anything.
Since you're the person who's interested in it, please go ahead and run
lunar set OPTS --disable static; lunar rebuild
and report back with the results.
BTW, there's another option that's not that hard: You can easily write a
plugin that POST_BUILD removes all the {/usr,}/lib/lib*.a files from
disk on the fly. This is almost entirely safe and guaranteed not to
break compilation itself, and you can enable/disable and/or integrate in
a UI with very little issues. take a look at the libtool plugin
(hpostbuild-libtool.plugin) on how to do this (10 lines of code needed
or so.)
Auke
More information about the Lunar-dev
mailing list