-
-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy path1103-Strip-build-path-directories-in-tools-xen-and-xen-ar.patch
55 lines (46 loc) · 1.68 KB
/
1103-Strip-build-path-directories-in-tools-xen-and-xen-ar.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From 2a8b51484175163641d115b9a9ecf6c3db31e438 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?=
Date: Sun, 8 Nov 2020 16:17:29 +0100
Subject: [PATCH] Strip build path directories in tools, xen and xen/arch/x86
Ensure to have a realpath for XEN_ROOT else it fails to substitute
properly pathes in strings sections
---
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 18cf83f5be83..5bb089e6b238 100644
--- a/tools/Rules.mk
+++ b/tools/Rules.mk
@@ -176,6 +176,8 @@ endif
CFLAGS-$(CONFIG_X86_32) += $(call cc-option,$(CC),-mno-tls-direct-seg-refs)
CFLAGS += $(CFLAGS-y)
+CFLAGS += -ffile-prefix-map=$(XEN_ROOT)=.
+
CFLAGS += $(EXTRA_CFLAGS_XEN_TOOLS)
INSTALL_PYTHON_PROG = \
diff --git a/xen/Makefile b/xen/Makefile
index 02e947da95a0..c7340bedbe40 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -408,6 +408,8 @@ ifneq ($(CONFIG_CC_IS_CLANG),y)
CFLAGS += -Wa,--strip-local-absolute
endif
+CFLAGS += -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 d902fb7accd9..898065e78950 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -135,6 +135,7 @@ $(TARGET): $(TARGET)-syms $(efi-y) $(obj)/boot/mkelf32
mv $(TMP) $(TARGET)
CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+CFLAGS-$(XEN_BUILD_EFI) += -ffile-prefix-map=$(XEN_ROOT)=.
$(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
--
2.44.0