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 51109A0C43; Wed, 18 Aug 2021 15:42:53 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C110D40151; Wed, 18 Aug 2021 15:42:52 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id D3D7040142 for ; Wed, 18 Aug 2021 15:42:50 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10080"; a="203520446" X-IronPort-AV: E=Sophos;i="5.84,330,1620716400"; d="scan'208";a="203520446" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Aug 2021 06:42:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,330,1620716400"; d="scan'208";a="424247939" Received: from silpixa00399126.ir.intel.com ([10.237.223.29]) by orsmga003.jf.intel.com with ESMTP; 18 Aug 2021 06:42:47 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , juraj.linkes@pantheon.tech Date: Wed, 18 Aug 2021 14:42:40 +0100 Message-Id: <20210818134240.480605-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] build: fix building when essential drivers in disable list 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 Sender: "dev" The PCI and vdev bus drivers cannot be disabled for DPDK builds and special logic is put in place to not skip them when they are specified in the disable list. This logic is broken though, as the inclusion of the driver-specific meson.build file is only included in the "else" leg of the condition check. This means that when they are specified as disabled the PCI and vdev buses are not disabled, but neither are their source files compiled. Fix this by moving the "subdir()" call into the next "if build" block, ensuring that if not disabled the sources are always included. To take account of the fact that the subdir call could itself disable the driver, we add a break call into the following loop to ensure we quickly fall through to the following block which stops processing appropriately if the driver is disabled. Fixes: 2e33309ebe03 ("config: enable/disable drivers in Arm builds") Cc: juraj.linkes@pantheon.tech Signed-off-by: Bruce Richardson --- drivers/meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/meson.build b/drivers/meson.build index bc6f4f567f..747c93fe9c 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -109,16 +109,19 @@ foreach subpath:subdirs build = false reason = 'explicitly disabled via build config' endif - else - # pull in driver directory which should update all the local variables - subdir(drv_path) endif if build + # pull in driver directory which should update all the local variables + subdir(drv_path) + # get dependency objs from strings shared_deps = ext_deps static_deps = ext_deps foreach d:deps + if not build + break + endif if not is_variable('shared_rte_' + d) build = false reason = 'missing internal dependency, "@0@"'.format(d) -- 2.30.2