diff mbox series

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

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

Commit Message

Anthony PERARD Aug. 24, 2021, 10:50 a.m. UTC
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/arch/x86/Makefile | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

Comments

Jan Beulich Oct. 11, 2021, 3:56 p.m. UTC | #1
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
Anthony PERARD Oct. 14, 2021, 2:20 p.m. UTC | #2
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,
diff mbox series

Patch

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