summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorJakub Kądziołka <kuba@kadziolka.net>2020-07-30 02:21:54 +0200
committerJakub Kądziołka <kuba@kadziolka.net>2020-09-19 15:43:03 +0200
commite0f31baacc6ad30096a332b69433c85f5830bb2c (patch)
tree9a832fcf2abc48e979062597aa47f57ad75d6b73 /tests
parentf32a6055a5d67b48abc74fb69652fab1a2058ffe (diff)
downloadguix-e0f31baacc6ad30096a332b69433c85f5830bb2c.tar.gz
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.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions