diff mbox series

[XEN,v8,24/47] build: use main rune to build host binary x86's mkelf32 and mkreloc

Message ID 20211125134006.1076646-25-anthony.perard@citrix.com (mailing list archive)
State Superseded
Headers show
Series xen: Build system improvements, now with out-of-tree build! | expand

Commit Message

Anthony PERARD Nov. 25, 2021, 1:39 p.m. UTC
Also, remove the HOSTCFLAGS "-g" from "mkreloc" command line.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
---

Notes:
    v8:
    - acked
    - remove the cflags "-g" from "mkreloc"

 xen/arch/x86/Makefile | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 243ca17f701e..e8151bf4b111 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -83,6 +83,9 @@  subdir- += boot
 extra-y += asm-macros.i
 extra-y += xen.lds
 
+hostprogs-y += boot/mkelf32
+hostprogs-y += efi/mkreloc
+
 # Allows usercopy.c to include itself
 $(obj)/usercopy.o: CFLAGS-y += -iquote .
 
@@ -253,17 +256,9 @@  $(obj)/efi.lds: AFLAGS-y += -DEFI
 $(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE
 	$(call if_changed_dep,cpp_lds_S)
 
-$(obj)/boot/mkelf32: $(src)/boot/mkelf32.c
-	$(HOSTCC) $(HOSTCFLAGS) -o $@ $<
-
-$(obj)/efi/mkreloc: $(src)/efi/mkreloc.c
-	$(HOSTCC) $(HOSTCFLAGS) -g -o $@ $<
-
 clean-files := \
-    boot/mkelf32 \
     include/asm/asm-macros.* \
     $(objtree)/.xen-syms.[0-9]* \
     $(objtree)/.xen.elf32 \
     $(objtree)/.xen.efi.[0-9]* \
-    efi/*.efi \
-    efi/mkreloc
+    efi/*.efi