From nobody Sat May 4 21:36:57 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1574186428; cv=none; d=zoho.com; s=zohoarc; b=JsqgzZN59j7yq4G54IHnU7YzsRSRCj8Uw+68NP97cSOTe3nK0hr4oaoJO9ez4XtaKqqU28r3Cf0fY0xXi97S34diSYDmKqIhPzAhwuM9i5QKs0PcoNFqKMKsOqd9uPw9bTA4hjXIwLEB+wPvA2m312zBfTni7wrQkpc7YsyaC7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1574186428; 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=XOBWV2dUcdxydVGveqRYQzq5Dx9oUufDIUPq2J8bbPY=; b=k91KDk6r2vI0MONwE1/ff+67I3bXUkCxdEEb6DS5nonpyBe8ujGVvQ4h+NYWkiCMg4jV/nhoLDTPfDYyvxSHz5HCJsU7drJ9Vs/Q0xrynTnNhS0iRO7hxIfZOUw9E8vzkEdIKQb0GUZrma5QSCuPtjP7Av3RJ+OdyIwtW9bUGt4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1574186428793770.8687019767577; Tue, 19 Nov 2019 10:00:28 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iX7mL-0003H0-Ez; Tue, 19 Nov 2019 17:59:05 +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.89) (envelope-from ) id 1iX7mK-0003Gv-Nr for xen-devel@lists.xenproject.org; Tue, 19 Nov 2019 17:59:04 +0000 Received: from esa6.hc3370-68.iphmx.com (unknown [216.71.155.175]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 4268a914-0af6-11ea-a300-12813bfff9fa; Tue, 19 Nov 2019 17:58:58 +0000 (UTC) X-Inumbo-ID: 4268a914-0af6-11ea-a300-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1574186338; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=f15TED3wylamRQ0gsHVCJJ/I/g4oKo7p8sotGjCwe0A=; b=Hz3Dmcnhikjh7AN932DU2cZ43WwlEYWSaDNSD+3eBf96MNgMkeLjJm2L jAS2jW2kIL2Vb2ZIPG7rK7eTMSZCs6OdKwgE5ExRTO2BfOaeVPru2rrh7 2rInOj9Vqg50zy1tcFZ0ZikwvdEQvb9j5IPvMmtB2JQMKz33dUUdo8lLm U=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=Pass smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa6.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa6.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa6.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: 4/MfOnvcIBKEINT67c2Wrac7Dst4SCDHAL+oISlMKwjKZ2vPMOxtxSjHcXEM1oHEBFu2tc21mq 5dZ8j7TcO+4pDUizBKFDY1r9ag/jIStZ9SNTeiVOzOgOEXaASxbuwJgxDcGskMzoOr0YB5PgAy ngFdgYcHV5rKaRUj8cvG9qQVJBiWTeuBYOTjjoLQz+djfeyUOpehUFW/o+rW0nY/UX6uM0h26q WxYxcBCl46lrkcB8fOy6mCmNSyjgG0PHnKQaSqmLJep2VWQFlBmg3yDuZu0kf+rn/8pXllNCqH 57U= X-SBRS: 2.7 X-MesageID: 8963909 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,218,1571716800"; d="scan'208";a="8963909" From: Anthony PERARD To: Jan Beulich , Date: Tue, 19 Nov 2019 17:58:55 +0000 Message-ID: <20191119175855.1716278-1-anthony.perard@citrix.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191119165809.GE1425@perard.uk.xensource.com> References: <20191119165809.GE1425@perard.uk.xensource.com> MIME-Version: 1.0 Subject: [Xen-devel] [XEN PATCH] xen/arch/x86/Makefile: Remove $(guard) use from $(TARGET).efi target X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Andrew Cooper , Wei Liu , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Following the patch 65d104984c04 ("x86: fix race to build arch/x86/efi/relocs-dummy.o"), the error message nm: 'efi/relocs-dummy.o': No such file" started to appear on system which can't build the .efi target. This is because relocs-dummy.o isn't built anymore. The error is printed by the evaluation of VIRT_BASE and ALT_BASE which aren't use anyway. But, we don't need that file as we don't want to build `$(TARGET).efi' anyway. On such system, $(guard) evaluate to the shell builtin ':', which prevent any of the shell commands in `$(TARGET).efi' from been executed. Even if $(guard) is evaluated opon use, it depends on $(XEN_BUILD_PE) which is evaluated at the assignment. So, we can replace $(guard) in $(TARGET).efi by having two different rules depending on $(XEN_BUILD_PE) instead. The change with this patch is that none of the dependency of $(TARGET).efi will be built if the linker doesn't support PE and VIRT_BASE and ALT_BASE don't get evaluated anymore, so nm will not complain about the missing relocs-dummy.o file anymore. Since prelink-efi.o isn't built on system that can't build $(TARGET).efi anymore, we can remove the $(guard) variable everywhere. Reported-by: Jan Beulich Signed-off-by: Anthony PERARD Reviewed-by: Jan Beulich --- xen/arch/x86/Makefile | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile index a6df19e901b3..a0b2f4ab1577 100644 --- a/xen/arch/x86/Makefile +++ b/xen/arch/x86/Makefile @@ -120,20 +120,20 @@ prelink_lto.o: $(ALL_OBJS) $(LD_LTO) -r -o $@ $^ =20 prelink-efi_lto.o: $(ALL_OBJS) efi/runtime.o efi/compat.o - $(guard) $(LD_LTO) -r -o $@ $(filter-out %/efi/built_in.o,$^) + $(LD_LTO) -r -o $@ $(filter-out %/efi/built_in.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 $(LD) $(LDFLAGS) -r -o $@ $^ =20 prelink-efi.o: $(patsubst %/built_in.o,%/built_in_bin.o,$(ALL_OBJS)) preli= nk-efi_lto.o efi/boot.init.o - $(guard) $(LD) $(LDFLAGS) -r -o $@ $^ + $(LD) $(LDFLAGS) -r -o $@ $^ else prelink.o: $(ALL_OBJS) $(LD) $(LDFLAGS) -r -o $@ $^ =20 prelink-efi.o: $(ALL_OBJS) efi/boot.init.o efi/runtime.o efi/compat.o - $(guard) $(LD) $(LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^) + $(LD) $(LDFLAGS) -r -o $@ $(filter-out %/efi/built_in.o,$^) endif =20 $(TARGET)-syms: prelink.o xen.lds @@ -178,8 +178,6 @@ CFLAGS-$(XEN_BUILD_EFI) +=3D -DXEN_BUILD_EFI =20 $(TARGET).efi: VIRT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n '= s, A VIRT_START$$,,p') $(TARGET).efi: ALT_BASE =3D 0x$(shell $(NM) efi/relocs-dummy.o | sed -n 's= , A ALT_START$$,,p') -# Don't use $(wildcard ...) here - at least make 3.80 expands this too ear= ly! -$(TARGET).efi: guard =3D $(if $(filter y,$(XEN_BUILD_PE)),,:) =20 ifneq ($(build_id_linker),) ifeq ($(call ld-ver-build-id,$(LD) $(filter -m%,$(EFI_LDFLAGS))),y) @@ -197,27 +195,31 @@ note_file :=3D endif note_file_option ?=3D $(note_file) =20 +ifeq ($(filter y,$(XEN_BUILD_PE)),y) $(TARGET).efi: prelink-efi.o $(note_file) efi.lds efi/relocs-dummy.o efi/m= kreloc $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ - $(guard) $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< efi= /relocs-dummy.o \ + $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< efi/relocs-d= ummy.o \ $(BASEDIR)/common/symbols-dummy.o $(note_file_option) -o = $(@D)/.$(@F).$(base).0 &&) : - $(guard) efi/mkreloc $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F)= .$(base).0) >$(@D)/.$(@F).0r.S - $(guard) $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).0 \ - | $(guard) $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/= .$(@F).0s.S - $(guard) $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s= .o + efi/mkreloc $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).= 0) >$(@D)/.$(@F).0r.S + $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).0 \ + | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).0s= .S + $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(foreach base, $(VIRT_BASE) $(ALT_BASE), \ - $(guard) $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< \ + $(LD) $(call EFI_LDFLAGS,$(base)) -T efi.lds -N $< \ $(@D)/.$(@F).0r.o $(@D)/.$(@F).0s.o $(note_file_option) -= o $(@D)/.$(@F).$(base).1 &&) : - $(guard) efi/mkreloc $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F)= .$(base).1) >$(@D)/.$(@F).1r.S - $(guard) $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).1 \ - | $(guard) $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/= .$(@F).1s.S - $(guard) $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s= .o - $(guard) $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T efi.lds -N $< \ + efi/mkreloc $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(@D)/.$(@F).$(base).= 1) >$(@D)/.$(@F).1r.S + $(NM) -pa --format=3Dsysv $(@D)/.$(@F).$(VIRT_BASE).1 \ + | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort >$(@D)/.$(@F).1s= .S + $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o + $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T efi.lds -N $< \ $(@D)/.$(@F).1r.o $(@D)/.$(@F).1s.o $(note_file_option) -= o $@ - if $(guard) false; then rm -f $@; echo 'EFI support disabled'; \ - else $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ - | $(BASEDIR)/tools/symbols --xensyms --sysv --sort >$(@D)/$(@F).map; fi + $(NM) -pa --format=3Dsysv $(@D)/$(@F) \ + | $(BASEDIR)/tools/symbols --xensyms --sysv --sort >$(@D)/$(@F).map rm -f $(@D)/.$(@F).[0-9]* $(@D)/..$(@F).[0-9]* +else +$(TARGET).efi: FORCE + rm -f $@; echo 'EFI support disabled' +endif =20 efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.= o: $(BASEDIR)/arch/x86/efi/built_in.o efi/boot.init.o efi/runtime.o efi/compat.o efi/buildid.o efi/relocs-dummy.= o: ; --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel