All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: opensbi@lists.infradead.org
Subject: [PATCH] reproducible builds: strip embedded file paths
Date: Thu, 18 Nov 2021 17:05:59 -0800	[thread overview]
Message-ID: <874k89kl8o.fsf@ponder> (raw)

A recent commit 12753d22563f7d2d01f2c6644c7b66b06eb5c90f introduced a
use of __FILE__ to display the file in some debugging output.

Unfortunately, the use of __FILE__ can embed the absolute build path in
the resulting binary, resulting in different binaries depending on which
path the build was performed in.

All previous versions tested in Debian built reproducibly:

  https://tests.reproducible-builds.org/debian/history/amd64/opensbi.html

The attached patch passes -ffile-prefix-map to CFLAGS in the top-level
Makefile, which should strip the top-level build path from the resulting
build. This should be supported in both gcc 8 and clang 10.

This patch was also submitted as a pull request:

  https://github.com/riscv-software-src/opensbi/pull/229


Please CC me with any concerns or questions.


Thanks!


live well,
  vagrant
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Pass-ffile-prefix-map-to-ensure-reproducible-builds-.patch
Type: text/x-diff
Size: 948 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/opensbi/attachments/20211118/b4f783cc/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/opensbi/attachments/20211118/b4f783cc/attachment.sig>

             reply	other threads:[~2021-11-19  1:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19  1:05 Vagrant Cascadian [this message]
2021-11-21 16:40 ` [PATCH] reproducible builds: strip embedded file paths Xiang W
2021-11-21 16:45   ` Jessica Clarke
2021-11-21 19:20   ` Vagrant Cascadian
2021-11-22  1:45     ` Xiang W
2021-11-22  3:59       ` Vagrant Cascadian
2021-11-22  4:43         ` Anup Patel
2021-11-22  5:44           ` Xiang W
2021-11-27  1:48             ` Vagrant Cascadian
2021-11-27  4:20               ` Anup Patel
2021-11-27 11:46               ` Xiang W

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=874k89kl8o.fsf@ponder \
    --to=vagrant@reproducible-builds.org \
    --cc=opensbi@lists.infradead.org \
    /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.