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

[XEN PATCH v8 39/47] RFC, no-VPATH: x86/boot: workaround gcc including the wrong file


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Thu, 25 Nov 2021 13:39:58 +0000
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 25 Nov 2021 13:47:37 +0000
  • Ironport-data: A9a23:fcohw6IBeLswchRXFE+RApIlxSXFcZb7ZxGr2PjKsXjdYENS0TQCy zNKDDiFbKrcZmukL49+ad60px5XvZHQnNAwQAplqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUZUideSc+EH140Es5xrZj6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2Svssvk tx3sKeUQF8qBpXcuccyC0lhRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsFlgNgjK8/6epsSoHh6wRnSDOo8QICFSKLPjTNd9Glo2JsSRKaCD yYfQQhvdRviWUV1AGwwNZwlnfeYl0PDQQQN/Tp5ooJoujOOnWSdyoPFMtDYZ9iLTsV9hVuDq yTN+GGRKg4eHMySz3yC6H3Erv/Cm2b3VZwfEJW89+V2mxuDy2oLEhoUWFCn5/6jhS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Xcx2/h1AV7AZniAhILLFvAA0WKK+VSJcEeSygce79 YFT0EXMqyIMbEQt6fHCWeDfOrIuOP3kpyVuQ==
  • Ironport-sdr: r23o05NSS7N9utzX3GZjNdfn8NR2ahYDzERWs2Mvd9EoEvJm8StOqMdOmNZHWOmlR/mPybolMn nHTiW5TPhM9OPESq+BRKvzy2mighS0Ex+Os19efb5BwOKU1QrTvEiNgXn4Lglarfzl3yMU1sp0 Lwp5aU7xiy6qx03yLY4bzHWjO0LakUWvf+SznyBVEj9go7fuJ6gNzbRmSQqWFv0F0rH5JpKCly c/66nvr/NIppMXR9RMGVMsN3v/hHr6L+yqF/7AyrucywPqP3d0RcoClDnLnIS4lZ6J23F+NUSF gezsM3C33jAgriFKkBbdVqiK
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

From: Anthony PERARD <anthony.perard@xxxxxxxxx>

we generate cmdline.S and reloc.S, so we should include those
generated file as presented in the build tree, but for file included
with quote, gcc will first look into the directory where the source
file is, that is where head.S is located and thus include cmdline.S
that is present in the source tree when it is dirty. But that the
wrong file as we want to include the file from the build tree. Work
around by using <> to include those file as if the come from the
system, as gcc will first look in directories listed with '-I' on the
command line.

So now we also need to add -I when building in the source tree.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 xen/arch/x86/boot/Makefile | 4 +++-
 xen/arch/x86/boot/head.S   | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/xen/arch/x86/boot/Makefile b/xen/arch/x86/boot/Makefile
index 04ee9da83333..4fc6b1d8ffc2 100644
--- a/xen/arch/x86/boot/Makefile
+++ b/xen/arch/x86/boot/Makefile
@@ -8,7 +8,9 @@ targets += $(head-objs:.S=.o)
 head-objs := $(addprefix $(obj)/, $(head-objs))
 
 ifdef building_out_of_srctree
-$(obj)/head.o: CFLAGS-y += -iquote $(obj)
+$(obj)/head.o: CFLAGS-y += -I$(obj)
+else
+$(obj)/head.o: CFLAGS-y += -I$(src)
 endif
 $(obj)/head.o: $(head-objs)
 
diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
index dd1bea0d10b3..66acd2e9bfc0 100644
--- a/xen/arch/x86/boot/head.S
+++ b/xen/arch/x86/boot/head.S
@@ -772,10 +772,10 @@ trampoline_setup:
         lret
 
 cmdline_parse_early:
-#include "cmdline.S"
+#include <cmdline.S>
 
 reloc:
-#include "reloc.S"
+#include <reloc.S>
 
 ENTRY(trampoline_start)
 #include "trampoline.S"
-- 
Anthony PERARD




 


Rackspace

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