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

Re: [XEN PATCH v7 21/51] build: set ALL_OBJS to main Makefile; move prelink.o to main Makefile


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 11 Oct 2021 13:31:59 +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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GYeOwNmNHEfe5DbtsDFiY6vhm/wM8AgtfL2GyOpfctc=; b=kXfzn8BrEOC19OQAlDEPbrZ3JucW8ptdFlsQ73DOrhq0/e5ci3vJlIQjNrRPhmO8GTllLWnIp2uIYsc7FaWqGJXPjiDD8y3w+LOOOZINuUY87P+NARmoo4VZeuonFUIVKQaCtB4+4hzMDlxkFLubX3AXZHAkNwU2Yzwcf3j+W4PwSqu0YsvbLhxrwYz7QkN/Ikmb5CiWHg9TrJ7rTbw8Gn5EQktT5vU1HTrmxsZ4eIrgrsn5DkXSLs0YuYS+g/EwJi9UsxEwFE36s8ru6zlwANlrA2QZNu/kSO8n01pVpVtjmDPQHz1+K1ctX2u3ku43xR6rB4OsJK26FFBcUoRYcg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cJRvp7YCwLOhXhzTFeHES65wcLJAMVZcGtKzNeFzpFYkhU3w9n/nAVMUjRPVvEnAvOCHFHiboH9Cdbky42SCLiSER5y3Lx+J+HLUzuHOXmf1wDg3xJyTk0wsLSELBGjUGcFeU40AJZQTygsR/5lglLp030pu2mBNsDdNA05MCqMD49OZJVPW4mKXJcipcwVSGDUnNCqoTnbnBWsIvmZnChtazIYX29aRrIYem7DHQiJHXCfr5oJDrsQKMHJW3Hj+IByiNoP3IaWJ2Bt69wLvkx4IzNOOs4U+sBRqp8QGY6wzh1VWVA93Xb8ZrEGqCoRmc2RTIJX9tpUTencEI7hX6w==
  • Authentication-results: lists.xenproject.org; dkim=none (message not signed) header.d=none;lists.xenproject.org; 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Mon, 11 Oct 2021 11:32:07 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24.08.2021 12:50, Anthony PERARD wrote:
> --- a/xen/Makefile
> +++ b/xen/Makefile
> @@ -271,8 +271,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)
> +
>  # define new variables to avoid the ones defined in Config.mk
>  export XEN_CFLAGS := $(CFLAGS)
>  export XEN_AFLAGS := $(AFLAGS)
> @@ -393,7 +406,7 @@ $(TARGET): FORCE
>       $(MAKE) -f $(BASEDIR)/Rules.mk -C include
>       $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) include
>       $(MAKE) -f $(BASEDIR)/Rules.mk 
> arch/$(TARGET_ARCH)/include/asm/asm-offsets.h
> -     $(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) $@
> +     $(MAKE) -f $(BASEDIR)/Rules.mk $@

This merely results in what was previously invoked from here now getting
invoked from the very bottom of build.mk. I'm afraid I don't see why this
is a useful change to make.

> --- a/xen/build.mk
> +++ b/xen/build.mk
> @@ -56,3 +56,27 @@ arch/$(TARGET_ARCH)/include/asm/asm-offsets.h: 
> asm-offsets.s
>         sed -rne "/^[^#].*==>/{s:.*==>(.*)<==.*:\1:; s: [\$$#]: :; p;}"; \
>         echo ""; \
>         echo "#endif") <$< >$@
> +
> +# 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: ;

This previously lived in an Arm-specific file. Moving this here in the
given, still Arm-specific form is imo a no-go when done alongside all
the other good changes you're making. Is there a reason this can't go
into xen/arch/arm/arch.mk?

Jan




 


Rackspace

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