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

[PATCH] x86/build: suppress EFI-related tool chain checks upon local $(MAKE) recursion


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 21 Sep 2021 17:43:38 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=hvPZWeko7LkrbiJynVatfRdxwf7pWGqz0z5S7aeVE8c=; b=BrHSRWq/gxetuiDzI4Qkg4sPnjGvP/Rs4Y4c58eV58X+lkXn9Kyktzk+lfDc/GalX7l2kRAyEF89/eGtwz9NHe6pkzzLEveHPpw5SrQtIBvWc9a58LxEyC2KMsgSjYUOya+ij9vUmFoIJUbN2V3uVnZAkApX9Ob3VgpFoITXhYQsx1TdMklSSoGpHPYQCwYcsOEFbOa1NtrmZGD4/veVcRmMwH/yqHQoK7mp20LfNtWephWSrsBo9+kN9aON023SXuVxYykf79gQKFmBzdYwvKrlIBGUbIa2LhPrCazV5bGloM/XsJnwO6DqPbSosEgPTQv/jfJSIFeaqD3vbWHL+A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NvkQT1rUuI4Eqz7i6WLb341pGMjAvOC1YT+qTcDNZJxNz2lK/gcfqhjUo/HrzLZOu8mv3ZzgyqbuPqrXhpUvug/LEPdDUTkO4rVVl2ksCghG+0XlJ7NQ/18DluRlHZSTB9/mwAbEM632TArkcyw/W2dT96Porvtuj/YBYgPl5mA9bf7iRWHqY5+cIQHCBV3/rVNnH530HSwhgy/a+XyB3x/AVzaVk/KwlpWQOq9g9ubY6N7DEbG9G8m6uE44pUY/p2njd274Z1QDeS4xwnCHikJNi1up0JHclMD5WSBuMOJhALOwuh/SM8xEL0PyS27x6YfBIwuyGn8lBf048VNLTg==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 21 Sep 2021 15:43:50 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The xen-syms and xen.efi linking steps are serialized only when the
intermediate note.o file is necessary. Otherwise both may run in
parallel. This in turn means that the compiler / linker invocations to
create efi/check.o / efi/check.efi may also happen twice in parallel.
Obviously it's a bad idea to have multiple producers of the same output
race with one another - every once in a while one may e.g. observe

objdump: efi/check.efi: file format not recognized

We don't need this EFI related checking to occur when producing the
intermediate symbol and relocation table objects, and we have an easy
way of suppressing it: Simply pass in "efi-y=", overriding the
assignments done in the Makefile and thus forcing the tool chain checks
to be bypassed.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Obviously the real (but more involved) solution would be to do away with
the recursive $(MAKE) invocations, by breaking up the long linking
rules. Representing them instead through multiple smaller rules with
suitable dependencies is certainly possible (and might even reduce
redundancy).

--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -182,13 +182,13 @@ $(TARGET)-syms: prelink.o xen.lds
        $(NM) -pa --format=sysv $(@D)/.$(@F).0 \
                | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort \
                >$(@D)/.$(@F).0.S
-       $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).0.o
+       $(MAKE) -f $(BASEDIR)/Rules.mk efi-y= $(@D)/.$(@F).0.o
        $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \
            $(@D)/.$(@F).0.o -o $(@D)/.$(@F).1
        $(NM) -pa --format=sysv $(@D)/.$(@F).1 \
                | $(BASEDIR)/tools/symbols $(all_symbols) --sysv --sort 
$(syms-warn-dup-y) \
                >$(@D)/.$(@F).1.S
-       $(MAKE) -f $(BASEDIR)/Rules.mk $(@D)/.$(@F).1.o
+       $(MAKE) -f $(BASEDIR)/Rules.mk efi-y= $(@D)/.$(@F).1.o
        $(LD) $(XEN_LDFLAGS) -T xen.lds -N prelink.o $(build_id_linker) \
            $(@D)/.$(@F).1.o -o $@
        $(NM) -pa --format=sysv $(@D)/$(@F) \
@@ -249,14 +249,14 @@ endif
        $(MKRELOC) $(foreach base,$(VIRT_BASE) 
$(ALT_BASE),$(@D)/.$(@F).$(base).0) >$(@D)/.$(@F).0r.S
        $(NM) -pa --format=sysv $(@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
+       $(MAKE) -f $(BASEDIR)/Rules.mk efi-y= $(@D)/.$(@F).0r.o 
$(@D)/.$(@F).0s.o
        $(foreach base, $(VIRT_BASE) $(ALT_BASE), \
                  $(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 &&) :
        $(MKRELOC) $(foreach base,$(VIRT_BASE) 
$(ALT_BASE),$(@D)/.$(@F).$(base).1) >$(@D)/.$(@F).1r.S
        $(NM) -pa --format=sysv $(@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
+       $(MAKE) -f $(BASEDIR)/Rules.mk efi-y= $(@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 $@
        $(NM) -pa --format=sysv $(@D)/$(@F) \




 


Rackspace

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