All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Romain Naour <romain.naour@gmail.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH RFC] package/binutils: build deterministic archives by default
Date: Thu, 13 Jan 2022 22:50:56 +0100	[thread overview]
Message-ID: <20220113225056.52fdda1d@windsurf> (raw)
In-Reply-To: <20210929220027.10505-1-romain.naour@gmail.com>

Hello Romain,

On Thu, 30 Sep 2021 00:00:27 +0200
Romain Naour <romain.naour@gmail.com> wrote:

> The option --enable-deterministic-archives that build deterministic
> archives is supported by binutils since binutils 2.23 [1][2].
> 
> See "Static libraries" chapter [3].
> https://reproducible-builds.org/docs/archives/
> 
> Enable this option for target and host variant.
> 
> It was added to Yocto Morty (2.2) in 2016 [4].
> 
> [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=2e30cb575a1d2b1eb8f776356ed59b0722a943d1
> [2] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=9cb80f72d8b8b2f59562692d9385cd5a533e9b3f
> [3] https://reproducible-builds.org/docs/archives
> [4] https://github.com/openembedded/openembedded-core/commit/df0d525c02780b5a0bd7a177a249c55f41797476
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>

The drawback of this approach is that it doesn't address the problem
for external toolchains, which have not necessarily been built with
--enable-deterministic-archives.

We could either pass -D in TARGET_AR (but of course that is subject to
packages obeying to that), or we could extend the toolchain wrapper to
also cover the ar tool ?

For this to be worth the effort, it would be useful to get some actual
case where this is causing a problem. Indeed, in Buildroot, we don't
really care about the reproducibility of .a archives themselves. So
unless their lack of reproducibility trickles down to the
statically-linked executables that result from using those .a, I'm not
sure this is really worth it.

I'll mark the patch as Changes Requested, but feel free to disagree and
put it back in the New state.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

      parent reply	other threads:[~2022-01-13 21:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 22:00 [Buildroot] [PATCH RFC] package/binutils: build deterministic archives by default Romain Naour
2021-10-03 10:14 ` Arnout Vandecappelle
2021-10-03 13:16   ` Romain Naour
2022-01-13 21:50 ` Thomas Petazzoni [this message]

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=20220113225056.52fdda1d@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@buildroot.org \
    --cc=romain.naour@gmail.com \
    /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.
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.