On Fri, May 26, 2023 at 10:27 PM Jacob Kroon <[email protected]> wrote:
>
> 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 <[email protected]>
> > ---
> >   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 ?

Yes, somewhere I had such a patch and I dropped it from my queue IIRC
it was for clang alone maybe
but it is not a simple replacement, we have to adjust
some recipes to this option,

>
>  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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#181796): 
https://lists.openembedded.org/g/openembedded-core/message/181796
Mute This Topic: https://lists.openembedded.org/mt/98551742/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to