All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Kroon <jacob.kroon@gmail.com>
To: Khem Raj <raj.khem@gmail.com>, openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] bitbake.conf: Add -fcanon-prefix-map to DEBUG_PREFIX_MAP
Date: Sat, 27 May 2023 07:27:00 +0200	[thread overview]
Message-ID: <c60b519b-6b54-511c-1cae-65ffca65d35f@gmail.com> (raw)
In-Reply-To: <20230428032030.2047920-1-raj.khem@gmail.com>

On 4/28/23 05:20, Khem Raj wrote:
> This should help canonicalize the relative paths and symlinks
> during cross compile, -fcanon-prefix-map is newly added in gcc-13+ [1]
> 
> [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108464#c8
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>   meta/conf/bitbake.conf | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index d94ffe1df9..453bef37a9 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -644,7 +644,8 @@ EXTRA_OEMAKE:prepend:task-install = "${PARALLEL_MAKEINST} "
>   # Optimization flags.
>   ##################################################################
>   # Beware: applied last to first
> -DEBUG_PREFIX_MAP ?= "-fmacro-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
> +DEBUG_PREFIX_MAP ?= "-fcanon-prefix-map \
> + -fmacro-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
>    -fdebug-prefix-map=${S}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
>    -fmacro-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
>    -fdebug-prefix-map=${B}=/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR} \
> 

Maybe we can take the opportunity to also cleanup DEBUG_PREFIX_MAP by 
replacing debug/macro/canon with a single -ffile-prefix-map ?

 From the gcc 13.1.1 manpage:

> -ffile-prefix-map=old=new
>            When compiling files residing in directory old, record any references to them in the result of the
>            compilation as if the files resided in directory new instead.  Specifying this option is equivalent to
>            specifying all the individual -f*-prefix-map options.  This can be used to make reproducible builds
>            that are location independent.  Directories referenced by directives are not affected by these options.
>            See also -fmacro-prefix-map, -fdebug-prefix-map, -fprofile-prefix-map and -fcanon-prefix-map.

Jacob


  parent reply	other threads:[~2023-05-27  5:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-28  3:20 [PATCH] bitbake.conf: Add -fcanon-prefix-map to DEBUG_PREFIX_MAP Khem Raj
2023-04-28 11:17 ` [OE-core] " Martin Jansa
2023-04-28 13:44   ` Khem Raj
2023-05-27  5:27 ` Jacob Kroon [this message]
2023-05-27  7:50   ` Khem Raj
2023-05-27  8:16   ` Richard Purdie

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=c60b519b-6b54-511c-1cae-65ffca65d35f@gmail.com \
    --to=jacob.kroon@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=raj.khem@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.