unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#42555] [PATCH core-updates] build-system/gnu: strip with --strip-unneeded
@ 2020-07-26 23:38 Jakub Kądziołka
  2020-07-30  0:21 ` [bug#42555] [PATCH v2 " Jakub Kądziołka
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Kądziołka @ 2020-07-26 23:38 UTC (permalink / raw)
  To: 42555

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





^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-19 13:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-26 23:38 [bug#42555] [PATCH core-updates] build-system/gnu: strip with --strip-unneeded Jakub Kądziołka
2020-07-30  0:21 ` [bug#42555] [PATCH v2 " Jakub Kądziołka
2020-09-19 12:49   ` Ludovic Courtès
2020-09-19 13:49     ` bug#42555: " Jakub Kądziołka

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).