[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 2/2] Strip build path directories in tools, xen and xen/arch/x86



From: Frédéric Pierret (fepitre) <frederic.pierret@xxxxxxxxxxxx>

Ensure to have a realpath for XEN_ROOT else it fails to substitute
properly pathes in strings sections

Signed-off-by: Frédéric Pierret (fepitre) <frederic.pierret@xxxxxxxxxxxx>
[use cc-option-add]
Signed-off-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
---
 tools/Rules.mk        | 2 ++
 xen/Makefile          | 2 ++
 xen/arch/x86/Makefile | 1 +
 3 files changed, 5 insertions(+)

diff --git a/tools/Rules.mk b/tools/Rules.mk
index 6bd636709ff7..9ed0336c07d5 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -169,6 +169,8 @@ endif
 CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
 CFLAGS += $(CFLAGS-y)
 
+$(call cc-option-add CFLAGS,CC,-ffile-prefix-map=$(XEN_ROOT)=.)
+
 CFLAGS += $(EXTRA_CFLAGS_XEN_TOOLS)
 
 INSTALL_PYTHON_PROG = \
diff --git a/xen/Makefile b/xen/Makefile
index 58fafab33d6f..0d79e259a33e 100644
--- 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)=.)
+
 AFLAGS += -D__ASSEMBLY__
 
 $(call cc-option-add,AFLAGS,CC,-Wa$$(comma)--noexecstack)
diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index f59c9665fdd0..70d0653257d7 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -137,6 +137,7 @@ $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32
        mv $(TMP) $(TARGET)
 
 CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+$(call cc-option-add 
CFLAGS-$(XEN_BUILD_EFI),CC,-ffile-prefix-map=$(XEN_ROOT)=.)
 
 $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
        $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
-- 
git-series 0.9.1



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.