|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] Strip build path directories in tools and hypervisor
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@xxxxxxxxxxxxxxxxxxxxxx> > > 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:
signature.asc
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |