OpenSBI Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] reproducible builds: strip embedded file paths
@ 2021-11-19  1:05 Vagrant Cascadian
  2021-11-21 16:40 ` Xiang W
  0 siblings, 1 reply; 11+ messages in thread
From: Vagrant Cascadian @ 2021-11-19  1:05 UTC (permalink / raw)
  To: opensbi

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>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-27 11:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-19  1:05 [PATCH] reproducible builds: strip embedded file paths Vagrant Cascadian
2021-11-21 16:40 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox