[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#42555: closed ([PATCH core-updates] build-system/gnu: strip with --s
From: |
GNU bug Tracking System |
Subject: |
bug#42555: closed ([PATCH core-updates] build-system/gnu: strip with --strip-unneeded) |
Date: |
Sat, 19 Sep 2020 13:55:02 +0000 |
Your message dated Sat, 19 Sep 2020 15:49:31 +0200
with message-id <C5RE6M5VJN1J.1FA1WPBHZPQ0S@gravity>
and subject line Re: [bug#42555] [PATCH v2 core-updates] build-system/gnu:
strip with --strip-unneeded
has caused the debbugs.gnu.org bug report #42555,
regarding [PATCH core-updates] build-system/gnu: strip with --strip-unneeded
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)
--
42555: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42555
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message ---
Subject: |
[PATCH core-updates] build-system/gnu: strip with --strip-unneeded |
Date: |
Mon, 27 Jul 2020 01:38:50 +0200 |
Apart from debug information, one can also strip some symbols. This can
be a significant difference, qtbase:out consists of about 5 MB of those
symbols. As per [1], --strip-debug is included in --strip-unneeded, and
the debug files created also contain a copy of the information removed
by --strip-unneeded.
Linux From Scratch suggests that this option shouldn't be used on static
libraries [2], however other sources [3] indicate otherwise. Building a
toolchain with this patch succeeds, and the result works fine for
'gcc -static hello-world.c'.
[1]: https://stackoverflow.com/a/52555093
[2]: http://www.linuxfromscratch.org/lfs/view/9.1/chapter05/stripping.html
[3]: https://www.technovelty.org/linux/stripping-shared-libraries.html
* guix/build/gnu-build-system.scm (strip): Use --strip-unneeded.
---
guix/build/gnu-build-system.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 2e7dff2034..d3347c9518 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -425,7 +425,7 @@ makefiles."
(objcopy-command (if target
(string-append target "-objcopy")
"objcopy"))
- (strip-flags '("--strip-debug"
+ (strip-flags '("--strip-unneeded"
"--enable-deterministic-archives"))
(strip-directories '("lib" "lib64" "libexec"
"bin" "sbin"))
--
2.27.0
--- End Message ---
--- Begin Message ---
Subject: |
Re: [bug#42555] [PATCH v2 core-updates] build-system/gnu: strip with --strip-unneeded |
Date: |
Sat, 19 Sep 2020 15:49:31 +0200 |
On Sat Sep 19, 2020 at 4:49 PM CEST, Ludovic Courtès wrote:
> Hi Jakub,
>
> Jakub Kądziołka <kuba@kadziolka.net> skribis:
>
> > Apart from debug information, one can also strip some symbols. This can
> > be a significant difference, the closure of gcc-toolchain@7 got reduced
> > by 15 MB in my tests.
>
> Nice! Now’s a good time to get that patch in on ‘core-updates’.
Thanks. Patch pushed (with a small hiccup...)
> > [1]: https://stackoverflow.com/a/52555093
>
> Perhaps we can omit this one. In general, I think it’s safer to refer
> to “primary sources” as Wikipedians would say.
The problem with "primary sources" is that the docs on this are quite
sparse. I think this link is much more comprehensive.
> > [2]: http://www.linuxfromscratch.org/lfs/view/9.1/chapter05/stripping.html
> > [3]: https://www.technovelty.org/linux/stripping-shared-libraries.html
> >
> > * guix/build/gnu-build-system.scm (strip): Use --strip-unneeded.
> > * guix/build-system/gnu.scm (static-package, gnu-build, gnu-cross-build):
> > Likewise.
>
> LGTM!
>
> For the record, I tried ‘--strip-all’ before, but that was
> problematic
> for some reason:
>
> https://lists.gnu.org/archive/html/guix-devel/2018-03/msg00135.html
The docs for --strip-all say "Do not copy relocation and symbol
information", so I would expect some relocation and/or linking use case
to get broken...
Regards,
Jakub Kądziołka
--- End Message ---
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#42555: closed ([PATCH core-updates] build-system/gnu: strip with --strip-unneeded),
GNU bug Tracking System <=