Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: John Keeping <john@metanate.com>
Cc: Romain Naour <romain.naour@gmail.com>,
	Giulio Benetti <giulio.benetti@benettiengineering.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/gcc/gcc-final: map debug prefix when reproducible
Date: Tue, 7 Feb 2023 14:55:03 +0100	[thread overview]
Message-ID: <20230207135503.GF4124@scaer> (raw)
In-Reply-To: <20230206162617.1907911-1-john@metanate.com>

John, All,

On 2023-02-06 16:26 +0000, John Keeping spake thusly:
> When building with BR2_REPRODUCIBLE the toolchain wrapper passes
> -fdebug-prefix-map for all packages that are built.  But this doesn't
> affect the target libraries (like libgcc) built by GCC's build system.
> 
> GCC 4.3 added a configure option to set the debug prefix map for these
> libraries, which is used here to avoid encoding potentially
> non-reproducible build paths into the debug data.

Thanks, this is indeed very interesting. We (briefly) discussed this at
the developers day minutes ago, and the question that was brought up
was: why is not needed for the first-stage compiler?

Indeed, the first-stage compiler builds objects files that are then used
by the C library, we would expect the debug symbols for those to also
need prefix mapping.

Could you look into that, and either pass the option to both the initial
and final gcc if needed, or explain in the commit log why it is not
needed for the initial gcc, please?

In the meantime, I've marked this patch as changes-requested in
patchwork.

Regards,
Yann E. MORIN.

> Signed-off-by: John Keeping <john@metanate.com>
> ---
>  package/gcc/gcc-final/gcc-final.mk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/package/gcc/gcc-final/gcc-final.mk b/package/gcc/gcc-final/gcc-final.mk
> index aa883beb7b..5f222a324c 100644
> --- a/package/gcc/gcc-final/gcc-final.mk
> +++ b/package/gcc/gcc-final/gcc-final.mk
> @@ -108,6 +108,10 @@ else
>  HOST_GCC_FINAL_CONF_OPTS += --disable-libgomp
>  endif
>  
> +ifeq ($(BR2_REPRODUCIBLE),y)
> +HOST_GCC_FINAL_CONF_OPTS += --with-debug-prefix-map=$(BASE_DIR)=buildroot
> +endif
> +
>  # End with user-provided options, so that they can override previously
>  # defined options.
>  HOST_GCC_FINAL_CONF_OPTS += \
> -- 
> 2.39.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2023-02-07 13:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-06 16:26 [Buildroot] [PATCH] package/gcc/gcc-final: map debug prefix when reproducible John Keeping
2023-02-07 13:55 ` Yann E. MORIN [this message]
2023-02-07 20:05   ` John Keeping
2023-02-08  8:05     ` Arnout Vandecappelle
2023-02-08  9:34       ` John Keeping

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=20230207135503.GF4124@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=giulio.benetti@benettiengineering.com \
    --cc=john@metanate.com \
    --cc=romain.naour@gmail.com \
    --cc=thomas.petazzoni@bootlin.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox