diff mbox series

[XEN,v3,21/23] xen/build: Use if_changed for prelink*.o

Message ID 20200226113355.2532224-22-anthony.perard@citrix.com (mailing list archive)
State Superseded
Headers show
Series xen: Build system improvements | expand

Commit Message

Anthony PERARD Feb. 26, 2020, 11:33 a.m. UTC
We change the dependencies of prelink-efi.o so that we can use the
same command line. The dependency on efi/built_in.o isn't needed
because, we already have:
    efi/*.o: efi/built_in.o
to build efi/*.o files that prelink-efi.o needs.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 xen/arch/x86/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Roger Pau Monné Feb. 27, 2020, 1:16 p.m. UTC | #1
On Wed, Feb 26, 2020 at 11:33:53AM +0000, Anthony PERARD wrote:
> We change the dependencies of prelink-efi.o so that we can use the
> same command line. The dependency on efi/built_in.o isn't needed
> because, we already have:
>     efi/*.o: efi/built_in.o
> to build efi/*.o files that prelink-efi.o needs.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.
Jan Beulich March 4, 2020, 4:12 p.m. UTC | #2
On 27.02.2020 14:16, Roger Pau Monné wrote:
> On Wed, Feb 26, 2020 at 11:33:53AM +0000, Anthony PERARD wrote:
>> We change the dependencies of prelink-efi.o so that we can use the
>> same command line. The dependency on efi/built_in.o isn't needed
>> because, we already have:
>>     efi/*.o: efi/built_in.o
>> to build efi/*.o files that prelink-efi.o needs.
>>
>> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> 
> Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

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

Patch

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 1be94846e11f..55c6ae8ce0d2 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -131,11 +131,11 @@  prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_lto.o
 prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink-efi_lto.o efi/boot.init.o
 	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
 else
-prelink.o: $(ALL_OBJS)
-	$(LD) $(XEN_LDFLAGS) -r -o $@ $^
+prelink.o: $(ALL_OBJS) FORCE
+	$(call if_changed,ld)
 
-prelink-efi.o: $(ALL_OBJS) efi/boot.init.o efi/runtime.o efi/compat.o
-	$(LD) $(XEN_LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^)
+prelink-efi.o: $(filter-out %/efi/built_in.o,$(ALL_OBJS)) efi/boot.init.o efi/runtime.o efi/compat.o FORCE
+	$(call if_changed,ld)
 endif
 
 $(TARGET)-syms: prelink.o xen.lds