From nobody Mon Feb 9 08:11:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1600078570; cv=none; d=zohomail.com; s=zohoarc; b=CK/Sc7TXv8WBjSHAmgkiVuXm007dF/nVpnVUQq+j8N4ZjI0Xg4S4yJ4IjR98GcCb6CQJmB4VhMausdVFb7MQAuELrZFtql8rjvrXnCcRqNbi9Lo4RRtSUZvnhH/80i3v5WeA52HRGqvSEq5tRKuHeEyaG9TL4id7Q+IkFqbgGug= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1600078570; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=R+YbBtpjveQB2q6rXUv55NG7YkBwI/Qb/R35stLV8uk=; b=UvB2nk4i8SAui1n6u4kI7DnqfQtOTw0XoDQN/R8wObBKbOxGWV7Oorj4uYJEsIAxqX2yA2/+P+Ygive7ASArYwO3w7N0UHTM8J+p3+RRWWaxiqt76BokhYk1taMZ9I2NcUOhfTXclcT3m/e5WkuEZfyXXfhUJn0EYH/J66hrrh0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1600078570875424.4696663022677; Mon, 14 Sep 2020 03:16:10 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kHlWb-0004L6-8w; Mon, 14 Sep 2020 10:15:53 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kHlWZ-0004L0-JC for xen-devel@lists.xenproject.org; Mon, 14 Sep 2020 10:15:51 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2ff8d569-5982-4986-b1d9-65d333359bd9; Mon, 14 Sep 2020 10:15:40 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 76EC8AD21; Mon, 14 Sep 2020 10:15:55 +0000 (UTC) X-Inumbo-ID: 2ff8d569-5982-4986-b1d9-65d333359bd9 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Subject: [PATCH 1/9] build: use if_changed more consistently (and correctly) for prelink*.o From: Jan Beulich To: "xen-devel@lists.xenproject.org" Cc: Andrew Cooper , Wei Liu , =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= , Julien Grall , Stefano Stabellini , George Dunlap References: Message-ID: <75d94bf1-b419-8a82-2d15-fb02e56109d8@suse.com> Date: Mon, 14 Sep 2020 12:15:39 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Switch to $(call if_changed,ld) where possible; presumably not doing so in e321576f4047 ("xen/build: start using if_changed") right away was an oversight, as it did for Arm in (just) one case. It failed to add prelink.o to $(targets), though, causing - judging from the observed behavior on x86 - undue rebuilds of the final binary (because of prelink.o getting rebuild for $(cmd_prelink.o) being empty, in turn because of .prelink.o.cmd not getting read) during "make install-xen". Signed-off-by: Jan Beulich Acked-by: Julien Grall --- xen/arch/arm/Makefile | 4 +++- xen/arch/x86/Makefile | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 51173d97127e..296c5e68bbc3 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -95,12 +95,14 @@ prelink_lto.o: $(ALL_OBJS) =20 # Link it with all the binary objects prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o - $(LD) $(XEN_LDFLAGS) -r -o $@ $^ + $(call if_changed,ld) else prelink.o: $(ALL_OBJS) FORCE $(call if_changed,ld) endif =20 +targets +=3D prelink.o + $(TARGET)-syms: prelink.o xen.lds $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index 74152f2a0dad..9b368632fb43 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -136,19 +136,21 @@ prelink_lto.o: $(ALL_OBJS) $(LD_LTO) -r -o $@ $^ =20 # Link it with all the binary objects -prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o $(EFI_OBJS-y) - $(LD) $(XEN_LDFLAGS) -r -o $@ $^ +prelink.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) prelink_l= to.o $(EFI_OBJS-y) FORCE + $(call if_changed,ld) =20 -prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) preli= nk_lto.o - $(LD) $(XEN_LDFLAGS) -r -o $@ $^ +prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) preli= nk_lto.o FORCE + $(call if_changed,ld) else -prelink.o: $(ALL_OBJS) $(EFI_OBJS-y) - $(LD) $(XEN_LDFLAGS) -r -o $@ $^ +prelink.o: $(ALL_OBJS) $(EFI_OBJS-y) FORCE + $(call if_changed,ld) =20 -prelink-efi.o: $(ALL_OBJS) - $(LD) $(XEN_LDFLAGS) -r -o $@ $^ +prelink-efi.o: $(ALL_OBJS) FORCE + $(call if_changed,ld) endif =20 +targets +=3D prelink.o prelink-efi.o + $(TARGET)-syms: prelink.o xen.lds $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 --=20 2.22.0