diff options
author | Jakub Kądziołka <kuba@kadziolka.net> | 2020-07-27 01:38:50 +0200 |
---|---|---|
committer | Jakub Kądziołka <kuba@kadziolka.net> | 2020-09-19 15:37:07 +0200 |
commit | f32a6055a5d67b48abc74fb69652fab1a2058ffe (patch) | |
tree | e3ada45a11566043fe915ab9e72d603d2d08f63c | |
parent | d7f776888b1fa4a3d58d4d67a1f137c4291d8843 (diff) |
build-system/gnu: strip with --strip-unneeded
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.
-rw-r--r-- | guix/build/gnu-build-system.scm | 2 |
1 files changed, 1 insertions, 1 deletions
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")) |