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

Re: [Minios-devel] [UNIKRAFT PATCH 1/9] build: support for sharing libraries across multiple platforms


  • To: Florian Schmidt <florian.schmidt@xxxxxxxxx>, "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: "Haibo Xu (Arm Technology China)" <Haibo.Xu@xxxxxxx>
  • Date: Mon, 14 Oct 2019 07:56:23 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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-SenderADCheck; bh=yrzWevK8mVYTLa8nUIP4YpMyd1xqP1cVMCPkpL7oHmc=; b=nOjlyzkVD926D6A87QkNXZcGvcOdTqdYbU6vTeQklu/OWl+f/MwfQ4zuy4BsaozKmQ0NySN+SDVSmmUMm86KpXJTRG3eIqMijU0OOORyS4k90xIBFu0T2nt5RZG267VilAlDbc/5Su4zlen88pwseL81IH/GnfqWrOfOtp4V4BsdXN7FmjpekF3W/FQNkuPzsU3uXgGJi+vDIbLHl5z3fXu5JIsxRI8spdCaT4kjTSyPKWxqvK3x5B7jLyiIihnGaWMtSBog2eIIgwzuQigKHR7pKC9yECpcnsRhWnoRchGWQ2+VRBhksmaEzcmDc8MzU97YNnanE4XQotClpW8aNw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TpNIdXPWlObLqlx7wo3CyXoNV0MWAi+mZJBGaRpaXSg+nY1BXILpg++zApzB81fzf8Gl0vnuurHljy3Uyk9qA0R+rJ85f+cx9FiMyafnvzxqOm1Nh5k/CxO80Nbhu6ZNIg3NQKCR2uMWpha718ENffVtyolwY36SnFgARFfYkmKv1Hwu6O9JW/reUppI+aQJcKwYbxSDLIVVi7Ei9wy0KyyyS3Ig6Si73q+J9UfwQUnx6STcojURnXKKKJMczBhS+3hKtEdFj7+gERcPTCkl5STZ0qjtjDwXF+xc9ujmt3Fm9dHvsmi3eOiwQkfOU3Hukcd89QOkuf4Xzq/Y4cXzdQ==
  • Authentication-results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=none action=none header.from=arm.com;
  • Authentication-results-original: spf=none (sender IP is ) smtp.mailfrom=Haibo.Xu@xxxxxxx;
  • Cc: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
  • Delivery-date: Mon, 14 Oct 2019 07:56:46 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Haibo.Xu@xxxxxxx;
  • Thread-index: AQHVgmTfP3tQYdwRJEKJOoz5kUTbAQ==
  • Thread-topic: [Minios-devel] [UNIKRAFT PATCH 1/9] build: support for sharing libraries across multiple platforms

This patch looks good.

Reviewed-by: Haibo Xu <haibo.xu@xxxxxxx>

On 2019/6/3 22:56, Florian Schmidt wrote:
> Currently, if a library is added to the list of libraries-to-be-built
> more than once, this will lead to problems when make rules are
> installed, as well as in the linking step (trying to link multiple
> versions in, resulting in duplicate symbols).
> This patch aggregates all libraries first, then removes duplicates (via
> make's $(sort) function), and so makes sure no library is built more
> than once.
>
> Why would this happen? The best example is having a platform library used
> by two platforms, for example, using libpci for a kvm and a baremetal
> platform, which requires two addplatlib calls, one for each platform it
> is registered with.
>
> The same applies to cleaning, respectively.
>
> Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
> Signed-off-by: Florian Schmidt <florian.schmidt@xxxxxxxxx>
> ---
>  support/build/Makefile.build | 21 +++++++++++----------
>  support/build/Makefile.clean |  8 ++++++--
>  2 files changed, 17 insertions(+), 12 deletions(-)
>
> diff --git a/support/build/Makefile.build b/support/build/Makefile.build
> index 5679741d..6a0091c2 100644
> --- a/support/build/Makefile.build
> +++ b/support/build/Makefile.build
> @@ -26,16 +26,12 @@
>  ifneq ($(call qstrip,$(UK_LIBS) $(UK_LIBS-y)),)
>  $(foreach L,$(UK_LIBS) $(UK_LIBS-y), \
>  $(if $(call qstrip,$($(call uc,$(L))_SRCS) $($(call uc,$(L))_SRCS-y)), \
> -$(foreach S,$($(call uc,$(L))_SRCS) $($(call uc,$(L))_SRCS-y), \
> -$(eval $(call buildrule_libobj_multitarget,$(L),$(S))) \
> -); \
> -$(eval $(call buildrule_olib,$(L))); \
>  $(eval UK_OLIBS-y += $(call libname2olib,$(L))); \
> +$(eval UKBUILD_LIBS += $(L)); \
>  ) \
>  )
>  endif
>
> -
>  #################################################
>  #
>  # Install build rules for each enabled platform
> @@ -47,13 +43,18 @@ $(foreach P,$(UK_PLATS) $(UK_PLATS-y), \
>  $(if $(call qstrip,$($(call uc,$(P))_LIBS) $($(call uc,$(P))_LIBS-y)), \
>  $(foreach L,$($(call uc,$(P))_LIBS) $($(call uc,$(P))_LIBS-y), \
>  $(if $(call qstrip,$($(call uc,$(L))_SRCS) $($(call uc,$(L))_SRCS-y)), \
> +$(eval $(call uc,$(P))_OLIBS-y += $(call libname2olib,$(L))); \
> +$(eval UKBUILD_LIBS += $(L)); \
> +) \
> +) \
> +) \
> +)
> +
> +endif
> +
> +$(foreach L,$(sort $(UKBUILD_LIBS)), \
>  $(foreach S,$($(call uc,$(L))_SRCS) $($(call uc,$(L))_SRCS-y), \
>  $(eval $(call buildrule_libobj_multitarget,$(L),$(S))) \
>  ); \
>  $(eval $(call buildrule_olib,$(L))); \
> -$(eval $(call uc,$(P))_OLIBS-y    += $(call libname2olib,$(L))); \
> -) \
> -) \
> -); \
>  )
> -endif
> diff --git a/support/build/Makefile.clean b/support/build/Makefile.clean
> index 0ad3d155..a131119e 100644
> --- a/support/build/Makefile.clean
> +++ b/support/build/Makefile.clean
> @@ -25,7 +25,7 @@
>
>  ifneq ($(call qstrip,$(UK_LIBS) $(UK_LIBS-y)),)
>  $(foreach L,$(UK_LIBS) $(UK_LIBS-y), \
> -$(eval $(call cleanrule_lib,$(L))); \
> +$(eval UKCLEAN_LIBS += $(L)); \
>  )
>  endif
>
> @@ -40,8 +40,12 @@ ifneq ($(call qstrip,$(UK_PLATS) $(UK_PLATS-y)),)
>  $(foreach P,$(UK_PLATS) $(UK_PLATS-y), \
>  $(if $(call qstrip,$($(call uc,$(P))_LIBS) $($(call uc,$(P))_LIBS-y)), \
>  $(foreach L,$($(call uc,$(P))_LIBS) $($(call uc,$(P))_LIBS-y), \
> -$(eval $(call cleanrule_lib,$(L))); \
> +$(eval UKCLEAN_LIBS += $(L)); \
>  ) \
>  ) \
>  )
>  endif
> +
> +$(foreach L,$(sort $(UKCLEAN_LIBS)), \
> +$(eval $(call cleanrule_lib,$(L))); \
> +)
>
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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