From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B0EA143C5F; Wed, 6 Mar 2024 17:52:18 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7125840276; Wed, 6 Mar 2024 17:52:18 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 2A0484026C for ; Wed, 6 Mar 2024 17:52:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1709743936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ymOreKRumHch8PGHn8GccuRSfTovrYsgygXg4Egjo7w=; b=DF6r4DEH5usCllH0Ufd84q0/0hro/8/4wGsbAkgVYHk9LOe7WyU+qiAxo3zTe5PI8FQIsZ o7xHcSevXJ+tZlDd2AmvuXTPWFeNcmO/zJng/f6eSFJu90g+VCbjWS/GOWUx0OLJXc185f nEJGVsk4oz+eIjvf8EWh3CjEojGlpX8= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-528-zNmVjiUPMpqaxKKfTV7jiA-1; Wed, 06 Mar 2024 11:52:13 -0500 X-MC-Unique: zNmVjiUPMpqaxKKfTV7jiA-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-513210b2c7aso560954e87.1 for ; Wed, 06 Mar 2024 08:52:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709743931; x=1710348731; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ymOreKRumHch8PGHn8GccuRSfTovrYsgygXg4Egjo7w=; b=Lqh/VaAr4GivkQFZyY5++0DwjckK61RR/E0HxqVUg9Kfop7vAztRDJBIUS0tO94LJA ZRp+zyDgFZjDa4geogDWssYInaqXZYvaq/+YdDVojXp53IZLBDtM/zl9sJwRqSCJqeNY kXYBtE6Lzu5tZfHrdmUzxaEm9Gds3qi2jDHNRhJGLTU8RyRu8JfJd5y4/vb+oKqvqYHj gP+ztwIvcOP4MhnbDyzNhgOH3RzMt0eBg691npZr5GU/yq6NoSuWGL67uMJT4BXAEvRD XAfEM1MfwpQZDzKwyHQ14cbcQkTfOvy21kdGEDQQno3J86+Ox23yHbCCTdp6ZGLG7dXy HiqA== X-Forwarded-Encrypted: i=1; AJvYcCV86ma5c/gO3r/NMJ2WXwSGLlYRzPlTR2sjaaeo402lEwxJ/xOtz1kKOsVsuQv4cYLIUsel/A26k31hQBo= X-Gm-Message-State: AOJu0YyDBD4WTGVT3UZu0uFWbSetKd4hb03Or0nQsiDs+KRgocmw679C Fjs6GFTj8MzwN1aKMC6jPC9e5X1yQiEOvAA5Ii0bvb/Z+NBPXoB+cqF3tUVsf+jduTQEfL08y5f nJfNtp0WKLjYId0Vj9XRJuy5QQNLw4RwOJOAQR50ATefp3jk7LHw2ID6GDqmFXwwVKPFvaCx4Wn 19PrMXMG/bd54E6OA= X-Received: by 2002:a05:6512:1092:b0:513:5f1e:725a with SMTP id j18-20020a056512109200b005135f1e725amr1126849lfg.21.1709743931597; Wed, 06 Mar 2024 08:52:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFph07bYJf1H1hr+kKHe+g/CK/oEn436MtCbkfZAimVZj+3bb56bJHhCDj0oSuKB/hfeoqwvvuABpXmcD7woLo= X-Received: by 2002:a05:6512:1092:b0:513:5f1e:725a with SMTP id j18-20020a056512109200b005135f1e725amr1126839lfg.21.1709743931228; Wed, 06 Mar 2024 08:52:11 -0800 (PST) MIME-Version: 1.0 References: <20240306143539.160467-1-paul.szczepanek@arm.com> <20240306143539.160467-2-paul.szczepanek@arm.com> In-Reply-To: From: David Marchand Date: Wed, 6 Mar 2024 17:51:59 +0100 Message-ID: Subject: Re: [RFC v1 1/1] devtools: allow libraries with no global section To: Bruce Richardson Cc: Paul Szczepanek , thomas@monjalon.net, dev@dpdk.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, Mar 6, 2024 at 5:40=E2=80=AFPM Bruce Richardson wrote: > > On Wed, Mar 06, 2024 at 05:14:15PM +0100, David Marchand wrote: > > On Wed, Mar 6, 2024 at 3:36=E2=80=AFPM Paul Szczepanek wrote: > > > > > > If a library has no global section in the version.map > > > allow it not to have symbols and not report it as an error. > > > This happens if a library doesn't export any functions > > > if they're all inline. > > > > > > Signed-off-by: Paul Szczepanek > > > > Added Bruce. > > > > Having a library without any actual code compiled is (I think) new in D= PDK. > > > > On the other hand, for headers only, there should be no need for a > > version.map file at all. > > > > The current meson code expects that every library provides some files > > to compile via the sources variable and it expects a version.map file > > too. > > I wonder if we could skip the whole library generation at the > > lib/meson.build level. > > Something like: > > > > diff --git a/lib/meson.build b/lib/meson.build > > index 179a272932..f0bbab6658 100644 > > --- a/lib/meson.build > > +++ b/lib/meson.build > > @@ -222,6 +222,10 @@ foreach l:libraries > > includes +=3D include_directories(l) > > dpdk_includes +=3D include_directories(l) > > > > + if sources.length() =3D=3D 0 > > + continue > > + endif > > + > > if developer_mode and is_windows and use_function_versioning > > message('@0@: Function versioning is not supported by > > Windows.'.format(name)) > > endif > > > > No version.map, no check to update :-) > > > Two thoughts/suggestions here: > > * in original meson port we did have support for header only libraries - = I > think for rte_compat.h, but that was done away with when the header was > just merged into EAL. See [1] > * for a header only lib - if we are prepared to forego being able to > disable it - the easiest enablement path may be to not add the director= y > to the list of libraries, and just add the header file path to the glob= al > include path, or perhaps some other library include path. How to make i= t > work best may depend on what the library does and what other DPDK libs,= if > any, it depends upon. If the goal is to provide those headers as public API, you still need to call install_headers() somewhere. And I don't like losing control over disabling about what is shipped. I prefer [1]. --=20 David Marchand