All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "Frédéric Pierret (fepitre)" <frederic.pierret@qubes-os.org>,
	"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.pau@citrix.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v1 2/2] Strip build path directories in tools, xen and xen/arch/x86
Date: Wed, 19 Mar 2025 14:40:33 +0100	[thread overview]
Message-ID: <Z9rJUWCARMQYqNXr@mail-itl> (raw)
In-Reply-To: <943644a3-45f2-46ef-a54b-6dd0bc6171ed@suse.com>

[-- Attachment #1: Type: text/plain, Size: 2643 bytes --]

On Wed, Mar 19, 2025 at 01:43:59PM +0100, Jan Beulich wrote:
> On 19.03.2025 12:58, Marek Marczykowski-Górecki wrote:
> > On Wed, Mar 19, 2025 at 10:43:12AM +0100, Jan Beulich wrote:
> >> On 19.03.2025 10:15, Jan Beulich wrote:
> >>> On 18.03.2025 18:01, Marek Marczykowski-Górecki wrote:
> >>>> --- a/xen/Makefile
> >>>> +++ b/xen/Makefile
> >>>> @@ -411,6 +411,8 @@ ifneq ($(CONFIG_CC_IS_CLANG),y)
> >>>>  CFLAGS += -Wa,--strip-local-absolute
> >>>>  endif
> >>>>  
> >>>> +$(call cc-option-add CFLAGS,CC,-ffile-prefix-map=$(XEN_ROOT)=.)
> >>>
> >>> This is lacking a comma:
> >>>
> >>> $(call cc-option-add,CFLAGS,CC,-ffile-prefix-map=$(XEN_ROOT)=.)
> >>
> >> And then, having tried the correct form (seeing the option then is passed
> >> to the compiler), I can't spot any difference in the resulting
> >> xen-syms.map. There were a few absolute paths there before (for
> >> arch/x86/x86_64/kexec_reloc.S and arch/x86/acpi/wakeup_prot.S), and the
> >> exact same ones are present afterwards.
> > 
> > I'm not sure about xen-syms.map, it's about build path included in
> > xen-syms. It appears at least once in .debug_str and once in
> > .debug_line_str.
> 
> In which case -fdebug-prefix-map= may suffice, which is available on
> more compiler versions? And then only if DEBUG_INFO=y?

Oh, and xen.efi is full of build path. Binary on plain staging has 790
occurrences. But there, -fdebug-prefix-map= also helps.

But also I don't think -fdebug-prefix-map= will be enough for tools, it
looks like at least libxl has build path embedded in .rodata too.

> > But also, I see the patch lost a chunk during rebase (from before
> > 4.17...), that adjusts XEN_ROOT to use $(realpath ...). That's the part
> > even mentioned in the commit message...
> > 
> > I'll send v2 shortly.
> 
> Provided there's actually a need. I was in fact wondering whether this
> was known to have significant effect prior to Anthony's work to make
> out-of-tree builds possible (plus less related adjustments), but may
> have lost most of its functionality since then (yet was still carried
> forward for all the time).

There are clearly some build path embedding left. And
-ffile-prefix-map=/-fdebug-prefix-map= doesn't work correctly with
XEN_ROOT having xen/.. at the end.
BTW, would it be acceptable to have this?

    $(call cc-option-add,CFLAGS,CC,-fdebug-prefix-map=$(realpath $(XEN_ROOT))=.)

It may be less efficient (if make doesn't cache result), but helps
especially in tools, where XEN_ROOT is set in _a lot_ of places.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2025-03-19 13:41 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 17:01 [PATCH v1 0/2] Improve reproducibility of build artifacts Marek Marczykowski-Górecki
2025-03-18 17:01 ` [PATCH v1 1/2] docs/xen-headers: use alphabetical sorting for @incontents Marek Marczykowski-Górecki
2025-03-19 11:19   ` Anthony PERARD
2025-03-19 11:36     ` Marek Marczykowski-Górecki
2025-03-18 17:01 ` [PATCH v1 2/2] Strip build path directories in tools, xen and xen/arch/x86 Marek Marczykowski-Górecki
2025-03-19  8:45   ` Jan Beulich
2025-03-19  9:15   ` Jan Beulich
2025-03-19  9:43     ` Jan Beulich
2025-03-19 11:58       ` Marek Marczykowski-Górecki
2025-03-19 12:43         ` Jan Beulich
2025-03-19 13:40           ` Marek Marczykowski-Górecki [this message]
2025-03-19 14:26             ` Jan Beulich
2025-03-20 10:18             ` Anthony PERARD
2025-03-20 12:51               ` Marek Marczykowski-Górecki
2025-03-20 13:49                 ` Jan Beulich
2025-03-20 13:59                   ` Marek Marczykowski-Górecki
2025-03-20 14:36                     ` Anthony PERARD
2025-03-20 15:11                       ` Jan Beulich
2025-03-20 15:17                       ` Marek Marczykowski-Górecki
2025-03-20 15:21                         ` Jan Beulich
2025-03-20 15:32                           ` Marek Marczykowski-Górecki
2025-03-20 15:48                             ` Jan Beulich
2025-03-20 15:58                               ` Marek Marczykowski-Górecki
2025-03-20 16:09                                 ` Jan Beulich
2025-03-20 17:29                                   ` Marek Marczykowski-Górecki

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=Z9rJUWCARMQYqNXr@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=frederic.pierret@qubes-os.org \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=roger.pau@citrix.com \
    --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.