[XEN PATCH v7 38/51] build: use main rune to build host binary x86's mkelf32 and mkreloc

Anthony PERARD posted 51 patches 4 years, 5 months ago
There is a newer version of this series
[XEN PATCH v7 38/51] build: use main rune to build host binary x86's mkelf32 and mkreloc
Posted by Anthony PERARD 4 years, 5 months ago
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/arch/x86/Makefile | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 8d789d25a3ff..4ea8ade7202c 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -81,6 +81,10 @@ endif
 extra-y += asm-macros.i
 extra-y += xen.lds
 
+hostprogs-y += boot/mkelf32
+HOSTCFLAGS_efi/mkreloc.o := -g
+hostprogs-y += efi/mkreloc
+
 # Allows usercopy.c to includes itself
 $(obj)/usercopy.o: CFLAGS-y += -I.
 
@@ -253,16 +257,10 @@ $(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 $@ $<
-
 .PHONY: clean
 clean::
-	rm -f *.lds boot/mkelf32
+	rm -f *.lds
 	rm -f asm-macros.i $(BASEDIR)/arch/x86/include/asm/asm-macros.*
 	rm -f $(BASEDIR)/.xen-syms.[0-9]* $(BASEDIR)/.xen.elf32
-	rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi efi/mkreloc
+	rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.efi
 	rm -f boot/cmdline.S boot/reloc.S boot/*.lnk boot/*.bin
-- 
Anthony PERARD


Re: [XEN PATCH v7 38/51] build: use main rune to build host binary x86's mkelf32 and mkreloc
Posted by Jan Beulich 4 years, 4 months ago
On 24.08.2021 12:50, Anthony PERARD wrote:
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Acked-by: Jan Beulich <jbeulich@suse.com>

> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
> @@ -81,6 +81,10 @@ endif
>  extra-y += asm-macros.i
>  extra-y += xen.lds
>  
> +hostprogs-y += boot/mkelf32
> +HOSTCFLAGS_efi/mkreloc.o := -g

To be honest I don't think this extra option would have been necessary
to retain.

Jan


Re: [XEN PATCH v7 38/51] build: use main rune to build host binary x86's mkelf32 and mkreloc
Posted by Anthony PERARD 4 years, 3 months ago
On Mon, Oct 11, 2021 at 05:56:06PM +0200, Jan Beulich wrote:
> On 24.08.2021 12:50, Anthony PERARD wrote:
> > Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> Acked-by: Jan Beulich <jbeulich@suse.com>
> 
> > --- a/xen/arch/x86/Makefile
> > +++ b/xen/arch/x86/Makefile
> > @@ -81,6 +81,10 @@ endif
> >  extra-y += asm-macros.i
> >  extra-y += xen.lds
> >  
> > +hostprogs-y += boot/mkelf32
> > +HOSTCFLAGS_efi/mkreloc.o := -g
> 
> To be honest I don't think this extra option would have been necessary
> to retain.

Probably not, I'll remove it.

Thanks,

-- 
Anthony PERARD