1 |
On 31-07-2008 11:29:39 +0200, Michael Haubenwallner wrote: |
2 |
> > I initially had in mind sort of the same, but with the cache in the back |
3 |
> > of my head. Given that you require getopt some and other, you just need |
4 |
> > to get those .o files in a libgnu.a. I don't think a .a file with more |
5 |
> > than you need is a problem (the linker extracts only what it needs, I |
6 |
> > guess), which means one can simply create the archive of all .o files |
7 |
> > available. If we'd just have a directory somewhere, where Portage dumps |
8 |
> > the .o files to, creating the gnulib.a would be trivial, and the cache |
9 |
> > would be there immediately. Given that it's probably a zipf |
10 |
> > distribution, the cache would be highly beneficial right from the start, |
11 |
> > so why not just do it that way? |
12 |
> |
13 |
> It's not that easy: gnulib .o files have dependencies on others. |
14 |
> Additionally there are some headers, which must match the objects when |
15 |
> used. And some of these headers hide system headers, or do #include_next |
16 |
> on them, with some wrappers #defined. |
17 |
> |
18 |
> (defining term "libgnu" to "libgnu.a and the headers" here) |
19 |
> |
20 |
> We could recreate the cached "libgnu" from scratch each time a package |
21 |
> requires another gnulib module not in the cache yet. |
22 |
> But I'm afraid this breaks already-installed packages when remerged, as |
23 |
> their configure might find another gnulib module available then, while |
24 |
> they could still work without it. |
25 |
> The difference to the non-cached libgnu out of gnulib.ebuild compared to |
26 |
> a cached one is that such problems are reproducible using the non-cached |
27 |
> one. |
28 |
> |
29 |
> This having said, I don't like one single growing _cached_ libgnu. |
30 |
> Instead I'd cache one libgnu for each used set of gnulib-modules. |
31 |
> This cache is pruned when reinstalling dev-libs/gnulib. |
32 |
> |
33 |
> This would result in something like |
34 |
> /usr/lib/gnulib/getopt-strcasestr-xvasprintf/{include,lib}/ |
35 |
> /usr/lib/gnulib/another-getopt-strcasestr-xvasprintf-yetanother/{include,lib}/ |
36 |
|
37 |
Why don't we just make sets of commonly used functions then? How long |
38 |
does it take to build just *all* of them? |
39 |
|
40 |
> Or we go with the libgnu from gnulib.ebuild as done currently, and have |
41 |
> this being the growing one, but easier to control. |
42 |
> |
43 |
> Btw, seems the solaris patch for portage-utils can be reduced from >20k |
44 |
> to ~3k using gnulib. |
45 |
|
46 |
The largest part of the patch is in the format specifiers, which are not |
47 |
necessary if you allow warnings. |
48 |
|
49 |
|
50 |
-- |
51 |
Fabian Groffen |
52 |
Gentoo on a different level |