From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Anthony PERARD" <anthony.perard@vates.tech>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Michal Orzel" <michal.orzel@amd.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger@xenproject.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2] Strip build path directories in tools and hypervisor
Date: Tue, 22 Sep 2026 15:22:52 +0200 [thread overview]
Message-ID: <arKBLCOvv8SIii9z@mail-itl> (raw)
In-Reply-To: <acdf64df-240a-4186-bf92-ccaf1f83dc60@suse.com>
[-- Attachment #1: Type: text/plain, Size: 2356 bytes --]
On Tue, Sep 22, 2026 at 03:06:35PM +0200, Jan Beulich wrote:
> On 04.09.2025 13:41, Marek Marczykowski-Górecki wrote:
> > Use -fdebug-prefix-map in preference to -ffile-prefix-map, as it's
> > available in earlier toolchain versions. But use it together with
> > -fmacro-prefix-map (if available) for hypervisor build, otherwise it
> > still contains some paths in out-of-tree builds.
> >
> > The out of tree build requires -fdebug-prefix-map mapping for both source
> > dir and object dir - otherwise the latter is included (2 occurrences) in
> > xen-syms. Note the ./xen path for out of tree builds may not be strictly
> > correct choice, but it's consistent across the tree, and just require
> > starting debugger from the source, not object, directory.
> >
> > Ensure to have a realpath for XEN_ROOT else it fails to substitute
> > properly paths in strings sections.
> >
> > Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
>
> Coming back to this, as it was also mentioned at the summit.
>
> > --- a/tools/Makefile
> > +++ b/tools/Makefile
> > @@ -1,4 +1,4 @@
> > -XEN_ROOT = $(CURDIR)/..
> > +XEN_ROOT = $(realpath $(CURDIR)/..)
>
> $(realpath ...) may not be available (with older make), it wants to be
> $(call realpath, ...), allowing use of the fallback in ./Config.mk.
>
> I'm further not really sure if $(realpath ...) is actually meant here;
> to me $(abspath ...) would seem more logical (as we don't want to
> resolve symlinks in the path, but rather keep it as specified / seen).
Honestly, I don't remember all the details a year later... But I think,
based on the commit message, there was some case where XEN_ROOT needed
to textually match the actual directory, possibly when some other
part of the build system embedded a resolved path to the binary anyway.
> And finally - isn't the above rendering redundant ...
>
> > --- a/tools/Rules.mk
> > +++ b/tools/Rules.mk
> > @@ -166,6 +166,8 @@ endif
> > CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
> > CFLAGS += $(CFLAGS-y)
> >
> > +$(call cc-option-add,CFLAGS,CC,-fdebug-prefix-map=$(realpath $(XEN_ROOT))=.)
>
> ... the use of $(realpath ...) here?
This seems to be correct observation.
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2026-09-22 13:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 11:41 [PATCH v2] Strip build path directories in tools and hypervisor Marek Marczykowski-Górecki
2025-09-04 12:58 ` Jan Beulich
2025-09-04 14:27 ` Marek Marczykowski-Górecki
2025-09-05 8:15 ` Jan Beulich
2025-09-05 10:55 ` Marek Marczykowski-Górecki
2026-09-22 13:06 ` Jan Beulich
2026-09-22 13:22 ` Marek Marczykowski-Górecki [this message]
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=arKBLCOvv8SIii9z@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger@xenproject.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/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.