From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sNNrEFsUHl92MwAA0tVLHw (envelope-from ) for ; Sun, 26 Jul 2020 23:40:11 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id n6BCDFsUHl/YVgAAB5/wlQ (envelope-from ) for ; Sun, 26 Jul 2020 23:40:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A83F89400C7 for ; Sun, 26 Jul 2020 23:40:10 +0000 (UTC) Received: from localhost ([::1]:42114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jzqFU-0000Yb-F3 for larch@yhetil.org; Sun, 26 Jul 2020 19:40:08 -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?Q?K=C4=85dzio=C5=82ka?= 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?Q?K=C4=85dzio=C5=82ka?= 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 Content-Transfer-Encoding: 8bit X-Qmailux-2.08st: added fake Content-Type header Content-Type: text/plain 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-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 2.49 X-TUID: flFRGDqLwHSp 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