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 2F570A0544; Mon, 10 Oct 2022 09:42:14 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 170184021E; Mon, 10 Oct 2022 09:42:14 +0200 (CEST) Received: from guvercin.ceng.metu.edu.tr (guvercin.ceng.metu.edu.tr [144.122.171.43]) by mails.dpdk.org (Postfix) with ESMTP id 98C8840146 for ; Mon, 10 Oct 2022 09:42:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by guvercin.ceng.metu.edu.tr (Postfix) with ESMTP id 63BED2C6B6; Mon, 10 Oct 2022 10:42:08 +0300 (+03) X-Virus-Scanned: Debian amavisd-new at ceng.metu.edu.tr Received: from guvercin.ceng.metu.edu.tr ([127.0.0.1]) by localhost (guvercin.ceng.metu.edu.tr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ppcZTX_F0T1U; Mon, 10 Oct 2022 10:41:58 +0300 (+03) Received: from roundcube.ceng.metu.edu.tr (kanarya.ceng.metu.edu.tr [144.122.171.33]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: e1885458) by guvercin.ceng.metu.edu.tr (Postfix) with ESMTPSA id 761792C061; Mon, 10 Oct 2022 10:41:57 +0300 (+03) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ceng.metu.edu.tr; s=mail; t=1665387718; bh=6hEwUqZf5MU6ZIHmky+XAsO/Uk2JTWyw7cGX9UnUK1k=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=LFBBMFavNWieNymmrnBTQ5WbtH2fcAQQKSwBSAjH/dJABC9y397wos7caKsDTj2Ru MrzG32dCMXWevzMNs9sGNctXKYiKk8rMB/oOeiS60LPmR0TMhM1EVRRFLmKWQn+cad zUnYIKbT3kmbb/YF8tEZzp35BOYrRIhY742jKpfc= MIME-Version: 1.0 Date: Mon, 10 Oct 2022 10:41:57 +0300 From: Omer Yamac To: Bruce Richardson Cc: dev@dpdk.org, Ferruh Yigit Subject: Re: [PATCH 1/2] drivers: suggestion on meson without version file In-Reply-To: References: <20221006071923.755507-1-omer.yamac@ceng.metu.edu.tr> User-Agent: Roundcube Webmail Message-ID: X-Sender: omer.yamac@ceng.metu.edu.tr Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 07.10.2022 13:30, Bruce Richardson wrote: > The title of this patch needs an update - I would suggest something > like: > > "build: make version file optional for drivers" Thank you, it will make more sense > > More comments inline below. > > On Thu, Oct 06, 2022 at 10:19:22AM +0300, Abdullah Ömer Yamaç wrote: >> Most of the drivers don't have a special version.map file. They just >> included due to the compilation issue and needs to be updated for each >> release. >> >> These version.map files include: >> DPDK_23 { >> local: *; >> }; >> >> In this patch, we removed the necessity of the version files and >> you don't need to update these files for each release, you can just >> remove them. >> >> Signed-off-by: Abdullah Ömer Yamaç >> Suggested-by: Ferruh Yigit >> >> --- >> Depends on: patch-116222 ("build: increase minimum meson version to >> 0.53") >> --- > > Thanks for splitting the patch. It is a lot easier to review now, > especially if we apply and use "diff -w". > > For any other reviewers, the "diff -w" for this patch is: > > --- a/drivers/meson.build > +++ b/drivers/meson.build > @@ -1,6 +1,8 @@ > # SPDX-License-Identifier: BSD-3-Clause > # Copyright(c) 2017-2019 Intel Corporation > > +fs = import('fs') > + > # Defines the order of dependencies evaluation > subdirs = [ > 'common', > @@ -193,6 +195,7 @@ foreach subpath:subdirs > version_map = > '@0@/@1@/version.map'.format(meson.current_source_dir(), drv_path) > implib = 'lib' + lib_name + '.dll.a' > > + if fs.is_file(version_map) > def_file = custom_target(lib_name + '_def', > command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'], > input: version_map, > @@ -227,6 +230,8 @@ foreach subpath:subdirs > endif > endif > > + endif > + > shared_lib = shared_library(lib_name, sources, > objects: objs, > include_directories: includes, > > >> drivers/meson.build | 63 >> ++++++++++++++++++++++++--------------------- >> 1 file changed, 34 insertions(+), 29 deletions(-) >> >> diff --git a/drivers/meson.build b/drivers/meson.build >> index f6ba5ba4fb..6ef03e14c7 100644 >> --- a/drivers/meson.build >> +++ b/drivers/meson.build >> @@ -1,6 +1,8 @@ >> # SPDX-License-Identifier: BSD-3-Clause >> # Copyright(c) 2017-2019 Intel Corporation >> >> +fs = import('fs') >> + >> # Defines the order of dependencies evaluation >> subdirs = [ >> 'common', >> @@ -193,38 +195,41 @@ foreach subpath:subdirs >> version_map = >> '@0@/@1@/version.map'.format(meson.current_source_dir(), drv_path) >> implib = 'lib' + lib_name + '.dll.a' >> > >> + capture: true, >> + input: static_lib, >> + output: lib_name + '.sym_chk') >> + endif >> endif >> + >> endif >> >> shared_lib = shared_library(lib_name, sources, > > Beware that the shared_lib calls use both lk_deps and lk_args > parameters, > which are only set inside the "if" block you added. > This will cause problems in that: > 1. If the first driver doesn't have a version.map file, these variables > will be undefined and you'll get a build error. > 2. For any subsequent drivers that don't have a version.map file, the > old > values of the variables from the previous driver will be used. > You're right, I missed that part and I will add a "else condition" to set variables as empty. Then everything is OK? > Therefore, at the start of processing each driver, you need to assign > empty > values to these variable. > > Regards, > /Bruce Thank you