[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch core-updates updated: build-system/gnu: strip with --strip-unneed
From: |
guix-commits |
Subject: |
branch core-updates updated: build-system/gnu: strip with --strip-unneeded [v2] |
Date: |
Sat, 19 Sep 2020 09:44:12 -0400 |
This is an automated email from the git hooks/post-receive script.
niedzejkob pushed a commit to branch core-updates
in repository guix.
The following commit(s) were added to refs/heads/core-updates by this push:
new e0f31ba build-system/gnu: strip with --strip-unneeded [v2]
e0f31ba is described below
commit e0f31baacc6ad30096a332b69433c85f5830bb2c
Author: Jakub Kądziołka <kuba@kadziolka.net>
AuthorDate: Thu Jul 30 02:21:54 2020 +0200
build-system/gnu: strip with --strip-unneeded [v2]
[Accidentally pushed patch v1, this commit contains the rest of the
changes. Revised commit message follows.]
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.
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-system/gnu.scm (static-package, gnu-build, gnu-cross-build):
Likewise.
---
guix/build-system/gnu.scm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/guix/build-system/gnu.scm b/guix/build-system/gnu.scm
index 6b481ad..2c23197 100644
--- a/guix/build-system/gnu.scm
+++ b/guix/build-system/gnu.scm
@@ -215,7 +215,7 @@ use `--strip-all' as the arguments to `strip'."
(arguments
(let ((a (default-keyword-arguments (package-arguments p)
'(#:configure-flags '()
- #:strip-flags '("--strip-debug")))))
+ #:strip-flags '("--strip-unneeded")))))
(substitute-keyword-arguments a
((#:configure-flags flags)
`(cons* "--disable-shared" "LDFLAGS=-static" ,flags))
@@ -337,7 +337,7 @@ standard packages used as implicit inputs of the GNU build
system."
(parallel-tests? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"
+ (strip-flags ''("--strip-unneeded"
"--enable-deterministic-archives"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
@@ -492,7 +492,7 @@ is one of `host' or `target'."
(parallel-build? #t) (parallel-tests? #t)
(patch-shebangs? #t)
(strip-binaries? #t)
- (strip-flags ''("--strip-debug"
+ (strip-flags ''("--strip-unneeded"
"--enable-deterministic-archives"))
(strip-directories ''("lib" "lib64" "libexec"
"bin" "sbin"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch core-updates updated: build-system/gnu: strip with --strip-unneeded [v2],
guix-commits <=