All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/2] toolchain/toolchain-wrapper: handle __FILE__ macro for reproducibility
Date: Mon, 6 Jan 2020 23:28:24 +0100	[thread overview]
Message-ID: <20200106232824.30e88329@windsurf> (raw)
In-Reply-To: <20190831180113.16025-2-itsatharva@gmail.com>

Hello,

On Sat, 31 Aug 2019 23:31:13 +0530
Atharva Lele <itsatharva@gmail.com> wrote:

> Many tools use __FILE__ for debugging and __FILE__ captures the build path.
> This results in non-reproducible images when building in different directories.
> 
> If the config uses GCC 8 or above, we use -ffile-prefix-map=old=new and let gcc
> take care of the path remapping in __FILE__. Since GCC versions before v8 did
> not have this feature, we use a dummy string in that case.
> 
> Signed-off-by: Atharva Lele <itsatharva@gmail.com>

I have applied this patch, with the following changes:

    [Thomas:
     - as suggested by Arnout, use the empty string for the __FILE__ and
       __BASE_FILE__ value
     - as suggested by Romain, also handle __BASE_FILE__ in addition to
       __FILE__
     - pass -Wno-builtin-macro-redefined to avoid build errors when
       -Werror is passed]

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

  parent reply	other threads:[~2020-01-06 22:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-31 18:01 [Buildroot] [PATCH v2 1/2] toolchain/toolchain-wrapper: explicitly set Build ID to none if BR2_REPRODUCIBLE Atharva Lele
2019-08-31 18:01 ` [Buildroot] [PATCH v2 2/2] toolchain/toolchain-wrapper: handle __FILE__ macro for reproducibility Atharva Lele
2019-09-07 14:34   ` Romain Naour
2019-09-16 11:54     ` Atharva Lele
2019-09-16 12:06       ` Arnout Vandecappelle
2020-01-06 22:28   ` Thomas Petazzoni [this message]
2019-09-07 14:13 ` [Buildroot] [PATCH v2 1/2] toolchain/toolchain-wrapper: explicitly set Build ID to none if BR2_REPRODUCIBLE Romain Naour
2019-10-26 15:07 ` Thomas Petazzoni

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=20200106232824.30e88329@windsurf \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /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.