all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Carl Dong <contact@carldong.me>
Cc: Chris Marusich <cmmarusich@gmail.com>, 48721@debbugs.gnu.org
Subject: [bug#48721] [PATCH] gnu: gcc-8: Make static libs reproducible
Date: Sat, 29 May 2021 19:09:06 +0200	[thread overview]
Message-ID: <87lf7x79hp.fsf@gnu.org> (raw)
In-Reply-To: <20210528202335.3442779-1-contact@carldong.me> (Carl Dong's message of "Fri, 28 May 2021 16:23:35 -0400")

Hi Carl,

Carl Dong <contact@carldong.me> 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 ‘core-updates’ maybe?)

I wonder if this explains the issues that Chris Marusich and Léo
stumbled upon while working on the POWER9 port.

I’m 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 ‘guix lint’ 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="/usr/lib:/lib"; fi
> + 	      prelink_cmds_CXX='tpldir=Template.dir~
> + 		rm -rf $tpldir~
> + 		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
> +-		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
> ++		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
> + 	      old_archive_cmds_CXX='tpldir=Template.dir~
> + 		rm -rf $tpldir~
> + 		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
> +-		$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 ‘substitute*’ wouldn’t be an
easy task, so maybe it’s better this way.  WDYT?

Thanks!

Ludo’.




  reply	other threads:[~2021-05-29 17:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 20:23 [bug#48721] [PATCH] gnu: gcc-8: Make static libs reproducible Carl Dong
2021-05-29 17:09 ` Ludovic Courtès [this message]
2021-06-03 20:05   ` [bug#48721] [PATCH v2] " Carl Dong
2021-06-04  7:23     ` Chris Marusich
2021-06-04 15:42       ` Ludovic Courtès
2021-06-04 15:46     ` Ludovic Courtès
2021-06-08 16:03       ` Carl Dong
2021-06-11 14:07         ` Ludovic Courtès
2021-06-11 22:17           ` Carl Dong
2021-06-13  9:49             ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf7x79hp.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=48721@debbugs.gnu.org \
    --cc=cmmarusich@gmail.com \
    --cc=contact@carldong.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.