guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Experimenting with reduced gcc-lib


From: Julien Lepiller
Subject: Re: Experimenting with reduced gcc-lib
Date: Thu, 15 Dec 2022 17:59:38 +0100
User-agent: K-9 Mail for Android


Le 15 décembre 2022 15:34:02 GMT+01:00, "Ludovic Courtès" <ludo@gnu.org> a 
écrit :
>Hello!
>
>Julien Lepiller <julien@lepiller.eu> skribis:
>
>> Before the patch we get:
>>
>> guix size perl
>> total: 147.7 MiB
>>
>> After the patch:
>>
>> ./pre-inst-env guix size perl
>> total: 114.5 MiB
>
>Nice!
>
>> I don't want to push that patch as is, because libstdc++.so is still in
>> the gcc-static-lib output and will bring all the useless stuff with it.
>> C++ programs will bring back the remaining 33.2 MiB.
>
>It wouldn’t be worse than the current situation though?
>
>> Another possible target is glibc, since the only useful bits in there
>> are libc.so and ld-linux.so (I think?). This could reduce the closure
>> of our packs by another ~40 MiB (I think our systems would still need
>> most of the content of this package).
>
>‘share/i18n’ is 16 MiB and ‘lib/iconv’ is 8 MiB.  Now, separating them
>without introducing loss of functionality may be tricky.
>
>> From bff8567b0770455397d44f1ed304a67681b472c9 Mon Sep 17 00:00:00 2001
>> From: Julien Lepiller <julien@lepiller.eu>
>> Date: Thu, 8 Dec 2022 22:29:01 +0100
>> Subject: [PATCH] gnu: gcc: Separate lib output.
>>
>> * gnu/packages/gcc.scm (gcc-4.7): Replace `lib' output with `static-lib'
>>   and `shared-lib'.
>> * gnu/packages/commencement.scm (gcc-boot0): Update accordingly.
>> ---
>>  gnu/packages/commencement.scm |  6 +++---
>>  gnu/packages/gcc.scm          | 39 +++++++++++++++++++++++++----------
>>  gnu/tests/mail.trs            |  0
>>  3 files changed, 31 insertions(+), 14 deletions(-)
>>  create mode 100644 gnu/tests/mail.trs
>
>Oops?

Oopsie :)

>
>>         (outputs '("out"                    ;commands, etc. (60+ MiB)
>> -                  "lib"                    ;libgcc_s, libgomp, etc. (15+ 
>> MiB)
>> +                  "shared-lib"             ;libgcc_s, libgomp, etc. (5+ MiB)
>> +                  "static-lib"             ;object code libraries and 
>> internal data files of GCC. (10+ MiB)
>
>The convention is to use “lib” for shared libraries and “static” for
>static libraries.

But using lib introduces a --libdir argument which is used to install static 
libs…

>
>Is libgomp in “lib”?  Is it found when linking with ‘-fopenmp’?

Well, shared-lib should be renaimed into libgcc, because it's the only library 
there.

Libgomp amd all other libs are in static-lib (which is not well named either 
^^'). It will be found I think but not tested (it find libstdc++ in the same 
directory).

>
>Thanks for this work; we really need to do something about package
>sizes!
>
>Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]