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

Re: [XEN PATCH] libs: Fix unstable libs build on FreeBSD, auto-generate version-script


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 16 Feb 2023 09:11:21 +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=3yXqgqX4yIGOYHYwEaB9Le7yDcnV8ZNjBxa1s0lOlJY=; b=Xii9d0Ht8lcNgzmezXkFDTOumPF2weVgKmyqXrK+PDFrenp2zLWkkVOGsFGviuws7I4Ibp8TluquNjVRLem6n1iymkx+i/3FkRe5wfUUPXLIt8RLRyRZaDrO6fsJr0xvU1yh89d7ZRct5DLSXW/G7GS7gSZPBWgGMDVyM9M8OfzVD8IZ46INfm3+Bt7gZCM/54ZEbyISSc4gMKbh2SfaORNmrelkXGUBAH45rkcswsVggJ7MPbciPNrq+dXYdtWotRWMb0FfmO48nB2jGgReLmiuYISDATQG4S2lrl3ibx+xr6q/awYv5TMmiR9jV8uq3M2pSxBXxBrFEdFJ4J9KlA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XGpU4pi/d1hRWtFjYwmOo4OFyiPe6KvTEJZ1qdspZqAvm1wcSJdFrOC2qx8Zn1fbLGyL3ZTXgWts+lTu/qdn9M01/T1bwJgmuaYO25A9IxuzEPfIXZ4T8E+yl7DIw662fX+4iv4nAWf7FD9WAtyg9FwCel5z9nxjGxEWIRDeTcEs7gl4Qx5HFsjnIWTCDH7l/xmgxUAKMR9pTsZCQaZkEzPLrL3pUag0GmvMNocNgGfqZ67U2W9gC7ZDdS99jPObMP10S5GyksHiqU00UdE9j+ORTK9YXl9HNPpldBxrFoSC7EoQhfmPl+z33BzAl3nPvg65SHIIciMah/WxRzKDTA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 16 Feb 2023 08:11:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.02.2023 18:41, Anthony PERARD wrote:
> On Wed, Feb 15, 2023 at 04:30:43PM +0100, Jan Beulich wrote:
>> On 15.02.2023 16:21, Anthony PERARD wrote:
>>> @@ -13,6 +14,10 @@ MAJOR := $(shell $(XEN_ROOT)/version.sh 
>>> $(XEN_ROOT)/xen/Makefile)
>>>  endif
>>>  MINOR ?= 0
>>>  
>>> +ifeq ($(origin version-script), undefined)
>>> +version-script := libxen$(LIBNAME).map.tmp
>>> +endif
>>
>> Such a use of $(origin ...) is pretty fragile. Maybe better use ?= ?
> 
> I'm not sure why I used $(origin), I've written that more than 6 month
> ago, but this way of using it is actually described in the manual, when
> documenting ?= but with a = instead of := .
> So, maybe I wanted to have ?= but with immediate evaluation rather than
> deferred. Maybe I had issue with $(version-script) evaluating to
> different values.

What's wrong with using deferred evaluation for this macro? $(LIBNAME) (and
$(LIB_FILE_NAME)) don't vary over time, do they? Plus ...

>>>  lib$(LIB_FILE_NAME).a: $(OBJS-y)
>>
>> Seeing this right adjacent in context - any reason you use libxen$(LIBNAME)
>> and not the same lib$(LIB_FILE_NAME) for the base file name?
> 
> That was the name used before, I guess it would be fine to rename. I
> just need to set $(version-script) later as $(LIB_FILE_NAME) would not
> be defined yet.

... you'd likely deal with that issue as well, unless there's a "too early"
use of $(version-script) somewhere.

Jan



 


Rackspace

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