From patchwork Sun Jul 26 23:38:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Maja_K=C4=85dzio=C5=82ka?= X-Patchwork-Id: 23390 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8998A27BBE1; Mon, 27 Jul 2020 00:40:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,UNPARSEABLE_RELAY,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 1E32127BBE3 for ; Mon, 27 Jul 2020 00:40:08 +0100 (BST) Received: from localhost ([::1]:42114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jzqFT-0000Yb-Hf for patchwork@mira.cbaines.net; Sun, 26 Jul 2020 19:40:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jzqFO-0000YH-Fn for guix-patches@gnu.org; Sun, 26 Jul 2020 19:40:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42017) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jzqFO-0002BS-53 for guix-patches@gnu.org; Sun, 26 Jul 2020 19:40:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jzqFO-0004In-18 for guix-patches@gnu.org; Sun, 26 Jul 2020 19:40:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#42555] [PATCH core-updates] build-system/gnu: strip with --strip-unneeded Resent-From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 26 Jul 2020 23:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 42555 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 42555@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.159580674416464 (code B ref -1); Sun, 26 Jul 2020 23:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Jul 2020 23:39:04 +0000 Received: from localhost ([127.0.0.1]:53563 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzqES-0004HU-7Y for submit@debbugs.gnu.org; Sun, 26 Jul 2020 19:39:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:44582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jzqEQ-0004HD-1f for submit@debbugs.gnu.org; Sun, 26 Jul 2020 19:39:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56214) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jzqEP-0000W4-Nq for guix-patches@gnu.org; Sun, 26 Jul 2020 19:39:01 -0400 Received: from pat.zlotemysli.pl ([37.59.186.212]:50178) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jzqEN-00027D-BZ for guix-patches@gnu.org; Sun, 26 Jul 2020 19:39:01 -0400 Received: (qmail 13673 invoked by uid 1009); 27 Jul 2020 01:38:56 +0200 Received: from 83.22.51.66.ipv4.supernova.orange.pl (kuba@kadziolka.net@83.22.51.66.ipv4.supernova.orange.pl) by pat.zlotemysli.pl (envelope-from , uid 1002) with qmail-scanner-2.08st (clamdscan: 0.98.6/25884. spamassassin: 3.4.0. perlscan: 2.08st. Clear:RC:1(83.22.51.66):. Processed in 0.055554 secs); 26 Jul 2020 23:38:56 -0000 Received: from 83.22.51.66.ipv4.supernova.orange.pl (HELO localhost.localdomain) (kuba@kadziolka.net@83.22.51.66) by pat.zlotemysli.pl with AES256-SHA encrypted SMTP; 27 Jul 2020 01:38:56 +0200 From: Jakub =?utf-8?b?S8SFZHppb8WCa2E=?= Date: Mon, 27 Jul 2020 01:38:50 +0200 Message-Id: <20200726233850.12321-1-kuba@kadziolka.net> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Qmailux-2.08st: added fake Content-Type header Received-SPF: none client-ip=37.59.186.212; envelope-from=kuba@kadziolka.net; helo=pat.zlotemysli.pl X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/26 19:19:28 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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"))