Subject: Re: bug#39941: Disk-image size increase on core-updates.

From: Ludovic Courtès <[email-masked]>
Date: Sun, 15 Mar 2020 18:13:52 +0100

Hi!

Congrats on this, Mathieu!

Mathieu Othacehe <[email-masked]> skribis:

> You'll find a trimmed patch attached. I found the GCC patch upstream
> (pushed in January), after finding the option in the online manual.

[...]

> From d8c45710847b504912670ebccf319354746f06f9 Mon Sep 17 00:00:00 2001
> From: Mathieu Othacehe <[email-masked]>
> Date: Sat, 14 Mar 2020 11:39:52 +0100
> Subject: [PATCH] gnu: cross-gcc: Add a "lib" output.
>
> Add a "lib" output to cross-gcc. This requires an upstream GCC patch adding
> support for --with-toolexeclibdir configure option. This option allows to
> install cross-built GCC libraries in a specific location.
>
> This also fixes the computation of TOOLDIR_BASE_PREFIX, that fails when
> /gnu/store/... directories are involved.

Perhaps add “Fixes <https://bugs.gnu.org/39941>.”

[...]

> +     ;; TOOLDIR_BASE_PREFIX is erroneous when using a separate "lib"
> +     ;; output. Specify it correctly, otherwise GCC won't find its shared
> +     ;; libraries installed in the "lib" output.

How erroneous is it?  Is there a bug report we could link to?

> +++ b/gnu/packages/patches/gcc-7-cross-toolexeclibdir.patch
> @@ -0,0 +1,2654 @@
> +This patch taken from GCC upstream adds support for overriding cross-compiled
> +shared libraries installation path.  This is needed to have a separate "lib"
> +output containing those shared libraries.

Could you add a link to the web view of the commit, if possible?

>From this patch, I think we should keep only the generated bit
(‘configure’ and ‘Makefile.in’ files) and discard everything else.  We
can probably also discard changes in bundled libraries (zlib, libgc,
etc.).

The comment should mention that we’ve stripped things compared to the
upstream commit.

Apologies for suggesting some more tedious work, but I think it’ll be
helpful!  :-)

Thank you!

Ludo’.