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

Ping: [XEN PATCH v4 17/32] tools: Introduce $(xenlibs-ldflags, ) macro


  • To: George Dunlap <george.dunlap@xxxxxxxxxx>, Nick Rosbrook <rosbrookn@xxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Fri, 19 Aug 2022 14:09:39 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Wei Liu <wl@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 19 Aug 2022 13:09:57 +0000
  • Ironport-data: A9a23:FSc9x64DIyJnN2tX+x+VzAxRtFDHchMFZxGqfqrLsTDasY5as4F+v jcaCz+OOffYMGqkc41yYY7l9E0Pu57cxtdhTFZrq3hkHi5G8cbLO4+Ufxz6V8+wwmwvb67FA +E2MISowBUcFyeEzvuVGuG96yM6jclkf5KkYMbcICd9WAR4fykojBNnioYRj5VhxNO0GGthg /uryyHkEALjimUc3l48sfrZ8ks/5aWq4Vv0g3RlDRx1lA6G/5UqJMp3yZGZdxPQXoRSF+imc OfPpJnRErTxpkpF5nuNy94XQ2VSKlLgFVHmZkl+AsBOtiNqtC0qupvXAdJHAathZ5dlqPgqo DlFncTYpQ7EpcQgksxFO/VTO3kW0aGrZNYriJVw2CCe5xSuTpfi/xlhJBw3bYIZ1+d6OGN1r f4YBzwJVjGovf3jldpXSsE07igiBMziPYdZsXB81zDJS/0hRPgvQY2Tu4Uehm1pwJkTQ7COP KL1ahI2BPjESxRJJlcQDoN4hOqyj2PzWzZZtEiUtew85G27IAlZj+i3aIuEJoziqcN9g163i UTb0WXCMwwdFYykzR2PwC2tr7qa9c/8cN1LT+DpnhJwu3WDy2pWBBAIWF+TpfiillX4S99ZM 1YT+Cclse417kPDZsb5dw21pjiDpBF0c8BXCOcg7waOzILb5g+YAi4PSTspVTA9nJZoH3pwj AbPxo63Q2w02FGIdZ6D3uqV/TyzFCkYFG05PS0EYgcB2/jImp5m23ojUe1f/L6JYszdQG+um 2DV8HFu2d3/nuZQifzloAmvbyaE48GQE1Vrvli/sneNtFsRWWKzW2C/BbE3B95kJZ3RcFSOt WNsdyO2vLFXVsHleMBgrYww8FCVCxWtamS0baZHRcVJythU0yfLkXpsyD9/Plx1Fc0PZCXkZ kTe0SsIusELbCf1Mv4rPdLqYyjP8UQHPYWNaxwpRoAWPsgZmPGvp0mCmnJ8L0iyyRNxwMnTy L+QcNq2DGZyNJmLOAGeHr5FuZd2l39W+I8mbcqkp/hR+ebBOSX9pHZsGAfmU93VG4vf/F2Fq 48Ba5DWo/idOcWnChTqHUcoBQhiBRAG6Vre8aS7qsbrztJaJVwc
  • Ironport-hdrordr: A9a23:Sw+BYajX98SMCTLBPlnaZtQIeHBQXtoji2hC6mlwRA09TySZ// rBoB0+726RtN9xYgBEpTnuAsS9qB/nmaKdpLNhWotKPzOW2ldATrsD0WKK+VSJcEfDH6xmpM RdmsBFebvN5DNB7PoSjjPWL+od
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Nick, George,

Could you give a ack or review this patch?

Also sorry George, it seems that the use of "--remove-duplicates" with
`get_maintainer.pl` have removed your email from CC the list.

Thanks,

On Thu, Aug 11, 2022 at 05:48:30PM +0100, Anthony PERARD wrote:
> This avoid the need to open-coding the list of flags needed to link
> with an in-tree Xen library when using -lxen*.
> 
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> Reviewed-by: Henry Wang <Henry.Wang@xxxxxxx>
> ---
>  tools/golang/xenlight/Makefile | 2 +-
>  tools/Rules.mk                 | 8 ++++++++
>  2 files changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile
> index 64671f246c..00e6d17f2b 100644
> --- a/tools/golang/xenlight/Makefile
> +++ b/tools/golang/xenlight/Makefile
> @@ -27,7 +27,7 @@ GOXL_GEN_FILES = types.gen.go helpers.gen.go
>  # so that it can find the actual library.
>  .PHONY: build
>  build: xenlight.go $(GOXL_GEN_FILES)
> -     CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog) 
> $(APPEND_CFLAGS)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) 
> -L$(XEN_libxenlight) -L$(XEN_libxentoollog) $(APPEND_LDFLAGS)" $(GO) build -x
> +     CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog) 
> $(APPEND_CFLAGS)" CGO_LDFLAGS="$(call xenlibs-ldflags,light toollog) 
> $(APPEND_LDFLAGS)" $(GO) build -x
>  
>  .PHONY: install
>  install: build
> diff --git a/tools/Rules.mk b/tools/Rules.mk
> index ce77dd2eb1..26958b2948 100644
> --- a/tools/Rules.mk
> +++ b/tools/Rules.mk
> @@ -105,6 +105,14 @@ define xenlibs-ldlibs
>      $(foreach lib,$(1),$(xenlibs-ldlibs-$(lib)))
>  endef
>  
> +# Provide needed flags for linking an in-tree Xen library by an external
> +# project (or when it is necessary to link with "-lxen$(1)" instead of using
> +# the full path to the library).
> +define xenlibs-ldflags
> +    $(call xenlibs-rpath,$(1)) \
> +    $(foreach lib,$(1),-L$(XEN_ROOT)/tools/libs/$(lib))
> +endef
> +
>  define LIB_defs
>   FILENAME_$(1) ?= xen$(1)
>   XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1)
> -- 
> Anthony PERARD
> 

-- 
Anthony PERARD



 


Rackspace

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