From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id oHLZIop1smAlBQEAgWs5BA (envelope-from ) for ; Sat, 29 May 2021 19:10:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mBxLHop1smBHOQAAB5/wlQ (envelope-from ) for ; Sat, 29 May 2021 17:10:34 +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 C173722FCE for ; Sat, 29 May 2021 19:10:33 +0200 (CEST) Received: from localhost ([::1]:48308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln2Tn-00088x-TL for larch@yhetil.org; Sat, 29 May 2021 13:10:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49864) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln2TL-00088h-4K for guix-patches@gnu.org; Sat, 29 May 2021 13:10:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46095) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ln2TK-0007yp-0p for guix-patches@gnu.org; Sat, 29 May 2021 13:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ln2TJ-0001Xz-Re for guix-patches@gnu.org; Sat, 29 May 2021 13:10:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48721] [PATCH] gnu: gcc-8: Make static libs reproducible Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 29 May 2021 17:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48721 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Carl Dong Cc: Chris Marusich , 48721@debbugs.gnu.org Received: via spool by 48721-submit@debbugs.gnu.org id=B48721.16223081555887 (code B ref 48721); Sat, 29 May 2021 17:10:01 +0000 Received: (at 48721) by debbugs.gnu.org; 29 May 2021 17:09:15 +0000 Received: from localhost ([127.0.0.1]:57641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln2SY-0001Ws-K6 for submit@debbugs.gnu.org; Sat, 29 May 2021 13:09:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56074) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln2SX-0001Wf-Lk for 48721@debbugs.gnu.org; Sat, 29 May 2021 13:09:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48156) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln2SS-0007ZD-Dq; Sat, 29 May 2021 13:09:08 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40590 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln2SS-0005hh-5R; Sat, 29 May 2021 13:09:08 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210528202335.3442779-1-contact@carldong.me> Date: Sat, 29 May 2021 19:09:06 +0200 In-Reply-To: <20210528202335.3442779-1-contact@carldong.me> (Carl Dong's message of "Fri, 28 May 2021 16:23:35 -0400") Message-ID: <87lf7x79hp.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1622308233; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=ww9EHogKjf02j/nLwPXkyM1Ax6OnVZBNFwDEXxyuBcA=; b=smvbYxvWD6LbXmyZWbsYaqfSUMZU99aSkSiVtdWd9RKz9DE6n7VqIzJ/ck/W2C/2i8hwxS ykPPxybvjDoMz0KzT3VElpaaBQK9WOe9W7xOfWW2J0kW3NUsWC8PFwFT98ksGRmLzMUMst oBNNWv1Ogufqq+GLcr8NI2KcjeICwUjbB59edWMPyDSUBf2H8K21RS1y40wNA13/k+34Xc HL+1I+7s4Ye9UHNLL6DzGocJHF95ECTnAPNrLLm3rwoMrM4jrxx5BRzhOLs8hWEYJhhxkq hbInL5ia2NqzJDe7s48S3k8VZQqoWFKPfo1N0XbuwhvLuZIA38az07NcxU8jeA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622308233; a=rsa-sha256; cv=none; b=SEL/EXxccUzhCg+51IWZr74eHua+BArvFHcti+tJSWyIn5weVLw15qR+MedEy5cdRYHRGe Kws/0YMjnmdq+nvz8ApsXQ4HDZzXo+IxKRmCLyo9coGABRTSXDK1X+nR2pyUW4KaCVbqCp PZlfZsr9ATYgJIzUQLnveL9xNJOCI2DGR2xpqlDMOUpD+8ajr/uCadvVTP+DfHWR741SoO rC86fJchiEHJ/NBM+h9MeNQB9Q+YRehaj6OKOJWRMAGI8t+9UeTtqgxUQA6iobFuZULdGj 1/TpmgFQuA74HcwP9bTwd17wwG6+JFoW5JvwmZ+ccO7S7/JbCGIfQBYmEB9Wog== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Migadu-Spam-Score: -2.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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-Migadu-Queue-Id: C173722FCE X-Spam-Score: -2.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: HZbplZdswzp6 Hi Carl, Carl Dong skribis: > This fixes the nonreproducibility in gcc documented here: > https://reproducible-builds.org/docs/archives/#gnu-libtool > > * gnu/packages/patches/gcc-8-sort-libtool-find-output.patch: New patch. > * gnu/packages/gcc.scm (gcc-8)[source]: Apply it. Well done. Did you observe it in practice? (On =E2=80=98core-updates=E2= =80=99 maybe?) I wonder if this explains the issues that Chris Marusich and L=C3=A9o stumbled upon while working on the POWER9 port. I=E2=80=99m surprised that this is still an issue since this was fixed in Libtool proper long ago, probably before GCC 8 was released. > gnu/packages/gcc.scm | 3 +- > .../gcc-8-sort-libtool-find-output.patch | 392 ++++++++++++++++++ > diff --git a/gnu/packages/patches/gcc-8-sort-libtool-find-output.patch b/= gnu/packages/patches/gcc-8-sort-libtool-find-output.patch > new file mode 100644 > index 0000000000..1dfe3ba132 > --- /dev/null > +++ b/gnu/packages/patches/gcc-8-sort-libtool-find-output.patch Please add a line or two explaining what it does, or =E2=80=98guix lint=E2= =80=99 will be unhappy. :-) > @@ -0,0 +1,392 @@ > +diff --git a/gcc/configure b/gcc/configure > +index 97ba7d7d69c..e37a96f0c0c 100755 > +--- a/gcc/configure > ++++ b/gcc/configure > +@@ -19720,20 +19720,20 @@ if test -z "$aix_libpath"; then aix_libpath=3D= "/usr/lib:/lib"; fi > + prelink_cmds_CXX=3D'tpldir=3DTemplate.dir~ > + rm -rf $tpldir~ > + $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $com= pile_deplibs~ > +- compile_command=3D"$compile_command `find $tpldir -name \*.o | $NL2SP= `"' > ++ compile_command=3D"$compile_command `find $tpldir -name \*.o | sort |= $NL2SP`"' > + old_archive_cmds_CXX=3D'tpldir=3DTemplate.dir~ > + rm -rf $tpldir~ > + $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplib= s~ > +- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | = $NL2SP`~ > ++ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | = sort | $NL2SP`~ The patch is big, but it looks like using =E2=80=98substitute*=E2=80=99 wou= ldn=E2=80=99t be an easy task, so maybe it=E2=80=99s better this way. WDYT? Thanks! Ludo=E2=80=99.