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

Re: [Xen-devel] [XEN PATCH v3 20/23] xen/build: factorise generation of the linker scripts



On 26.02.2020 12:33, Anthony PERARD wrote:
> --- a/xen/Rules.mk
> +++ b/xen/Rules.mk
> @@ -230,6 +230,14 @@ cmd_s_S = $(CPP) $(filter-out -Wa$(comma)%,$(a_flags)) 
> $< -o $@
>  %.s: %.S FORCE
>       $(call if_changed,cpp_s_S)
>  
> +# Linker scripts, .lds.S -> .lds
> +quiet_cmd_cc_lds_S = LDS     $@
> +define cmd_cc_lds_S
> +    $(CC) -P -E -Ui386 $(filter-out -Wa$(comma)%,$(a_flags)) -o $@ $<; \

$(CPP)? And then also name the thing cmd_cpp_lds_S?

> +    sed -e 's/.*\.lds\.o:/$(@F):/g' <$(dot-target).d >$(dot-target).d.new; \
> +    mv -f $(dot-target).d.new $(dot-target).d

This would benefit from also switching to move-if-changed at
this occasion.

With you using "define" - is there really a need for adding the
trailing "; \" sequence to the first two lines of the macro?

> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
> @@ -75,6 +75,7 @@ obj-y += hpet.o
>  obj-y += vm_event.o
>  obj-y += xstate.o
>  extra-y += asm-macros.i
> +extra-y += xen.lds
>  
>  x86_emulate.o: x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h
>  
> @@ -197,6 +198,7 @@ endif
>  note_file_option ?= $(note_file)
>  
>  ifeq ($(XEN_BUILD_PE),y)
> +extra-y += efi.lds

Would be nice if this was moved up using

extra-$(XEN_BUILD_PE) += efi.lds

Jan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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