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

Re: [XEN PATCH v8 07/47] build: set ALL_OBJS to main Makefile; move prelink.o to main Makefile


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 6 Dec 2021 17:52:51 +0100
  • 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=joui1Zy17jMpXVG4p+Fro0dNZj0AQu1QlOhnmwZMn+w=; b=NW9CfsbLCGgu18t+rGz1j3IW5KDJizW2KJOOItqNjVd6EuQ2a8kruNh7s1Q7kiIDp+8tqFKA9h9tfMAMu7m9UNoTYY1cFIRwT3ki0W7FmUelr14yHodFzA+IjXt9J4P7Wpk/O+fyWITvHSigKR+dp7kA7NCEyOImG9pRNeIt0LU5DF3syWGRwv5n20drm35sC8bQLGiDsbj88M3vWmrR1huCO3rOFF1YjIbyYwvZO4Xpo6hyhB4l1YuSZ38WswKvivShUNeESBBqVSTKv/4Uc2Jsk7XFYSkfHSwaM7QtiZbg/2W7rWqYXK53DVb8IQoNYYeL/Pm3XYcyHfZw4Gg2ng==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IiRdMbOrcpkZvYmd7c30+SVxtYzWluAXVoqCjSj2PRrCR8MNVdlJYJnHL2nNoMkghVlpuE1cnhndOaJJux2AqGDBn9xGojWFqRv6wC9e0qtOKEKOOIq05wT9Zf3LM4Mr66TJwvOHUCMOh073MjXJBYi0oMhDozYSM/CIt57MckzZy7BKFU6/oe2HZ/85OH91YpQ8BYMe3I6OYX2MAuWzTaoU4Ljj25vJmbB2Fuj100VBrxC3ccQoSDJmrtVkY1AfNGUXzBSbZxxxgJ12XLVj8iVV+aoA+MZQ6rO+AHJe8vw3VCWuERbsW8aY1ZKLei0Y4mrAC6VQuHGOU4sSMi0RwQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Ian Jackson <iwj@xxxxxxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 06 Dec 2021 16:53:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 25.11.2021 14:39, Anthony PERARD wrote:

Nit: In the title, do you mean "set ALL_OBJS in main Makefile; ..."?

> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -285,8 +285,21 @@ CFLAGS += -flto
>  LDFLAGS-$(CONFIG_CC_IS_CLANG) += -plugin LLVMgold.so
>  endif
>  
> +# Note that link order matters!
> +ALL_OBJS-y                := common/built_in.o
> +ALL_OBJS-y                += drivers/built_in.o
> +ALL_OBJS-y                += lib/built_in.o
> +ALL_OBJS-y                += xsm/built_in.o
> +ALL_OBJS-y                += arch/$(TARGET_ARCH)/built_in.o
> +ALL_OBJS-$(CONFIG_CRYPTO) += crypto/built_in.o
> +
> +ALL_LIBS-y                := lib/lib.a
> +
>  include $(BASEDIR)/arch/$(TARGET_ARCH)/arch.mk
>  
> +export ALL_OBJS := $(ALL_OBJS-y)
> +export ALL_LIBS := $(ALL_LIBS-y)

Who's the consumer of these exports? I ask because I don't consider the
names very suitable for exporting, and hence I'd prefer to see their
scope limited. If e.g. it's only a single make invocation where they
need propagating, doing so on the command line might be better.

> --- a/xen/arch/arm/Rules.mk
> +++ b/xen/arch/arm/Rules.mk
> @@ -0,0 +1,5 @@
> +# head.o is built by descending into arch/arm/$(TARGET_SUBARCH), depends on 
> the
> +# part of $(ALL_OBJS) that will eventually recurse into $(TARGET_SUBARCH)/ 
> and
> +# build head.o
> +arch/arm/$(TARGET_SUBARCH)/head.o: arch/arm/built_in.o
> +arch/arm/$(TARGET_SUBARCH)/head.o: ;

Can't this be a single line:

arch/arm/$(TARGET_SUBARCH)/head.o: arch/arm/built_in.o ;

?

> @@ -235,7 +218,7 @@ $(TARGET).efi: FORCE
>       echo '$(if $(filter y,$(XEN_BUILD_EFI)),xen.efi generation,EFI support) 
> disabled'
>  endif
>  
> -efi/buildid.o efi/relocs-dummy.o: $(BASEDIR)/arch/x86/efi/built_in.o
> +# These should already have been rebuilt when building the prerequisite of 
> "prelink.o"
>  efi/buildid.o efi/relocs-dummy.o: ;

If the comment is true in all cases, do they really still need an empty
rule?

Jan




 


Rackspace

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