From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5F206A00C5; Mon, 6 Jul 2020 10:19:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DBEB31D5F8; Mon, 6 Jul 2020 10:19:52 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 97ADE1D56E for ; Mon, 6 Jul 2020 10:19:51 +0200 (CEST) IronPort-SDR: dncHz3FsnHRvRVklKnkqf4o4FnrXnt5eVb5DuzfCofzUmXHZEGa/EeQSsZWH9OEqs97qnxk2BS EwJiN3zDvrkQ== X-IronPort-AV: E=McAfee;i="6000,8403,9673"; a="126966713" X-IronPort-AV: E=Sophos;i="5.75,318,1589266800"; d="scan'208";a="126966713" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2020 01:19:50 -0700 IronPort-SDR: kxjbN1iPGzfJgbRlgdhsFDfZUFz7RSGAazAYMtCEfbBl5SpfTTfPC8GnvzqjItTpWfB4egVDew dIlH00c5rFpw== X-IronPort-AV: E=Sophos;i="5.75,318,1589266800"; d="scan'208";a="427017211" Received: from unknown (HELO bricha3-MOBL.ger.corp.intel.com) ([10.252.19.54]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 06 Jul 2020 01:19:47 -0700 Date: Mon, 6 Jul 2020 09:19:44 +0100 From: Bruce Richardson To: Fady Bader Cc: dev@dpdk.org, thomas@monjalon.net, tbashar@mellanox.com, talshn@mellanox.com, yohadt@mellanox.com, dmitry.kozliuk@gmail.com, harini.ramakrishnan@microsoft.com, ocardona@microsoft.com, pallavi.kadam@intel.com, ranjit.menon@intel.com, olivier.matz@6wind.com, arybchenko@solarflare.com, mdr@ashroe.eu, nhorman@tuxdriver.com Message-ID: <20200706081944.GC636@bricha3-MOBL.ger.corp.intel.com> References: <20200702131409.17964-2-fady@mellanox.com> <20200705114629.2152-1-fady@mellanox.com> <20200705114629.2152-2-fady@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200705114629.2152-2-fady@mellanox.com> Subject: Re: [dpdk-dev] [PATCH v5 1/3] eal: disable function versioning on Windows X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On Sun, Jul 05, 2020 at 02:46:27PM +0300, Fady Bader wrote: > Function versioning implementation is not supported by Windows. > Function versioning was disabled on Windows. > > Signed-off-by: Fady Bader > --- > lib/librte_eal/include/rte_function_versioning.h | 2 +- > lib/meson.build | 5 +++++ > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/include/rte_function_versioning.h b/lib/librte_eal/include/rte_function_versioning.h > index f588f2643b..9890551ba1 100644 > --- a/lib/librte_eal/include/rte_function_versioning.h > +++ b/lib/librte_eal/include/rte_function_versioning.h > @@ -7,7 +7,7 @@ > #define _RTE_FUNCTION_VERSIONING_H_ > #include > > -#ifndef RTE_USE_FUNCTION_VERSIONING > +#if !defined RTE_USE_FUNCTION_VERSIONING && !defined RTE_EXEC_ENV_WINDOWS > #error Use of function versioning disabled, is "use_function_versioning=true" in meson.build? > #endif > > diff --git a/lib/meson.build b/lib/meson.build > index c1b9e1633f..a1ab582a51 100644 > --- a/lib/meson.build > +++ b/lib/meson.build > @@ -107,6 +107,11 @@ foreach l:libraries > shared_dep = declare_dependency(include_directories: includes) > static_dep = shared_dep > else > + if is_windows and use_function_versioning > + message('@0@: Function versioning is not supported by Windows.' > + .format(name)) > + use_function_versioning = false > + endif > > if use_function_versioning > cflags += '-DRTE_USE_FUNCTION_VERSIONING' > -- I wonder if this patch can be simplified as follows. Presumably the use of the RTE_USE_FUNCTION_VERSIONING cflag doesn't cause any problems building on windows, since it's basically nothing except a flag to indicate the build is configured properly, so that block can be left intact. Instead what is needed to be disabled is the RTE_BUILD_SHARED_LIB setting so that we use the static macros. Therefore, I think the same result can be got by just changing the following line in lib/meson.build: @@ -138,7 +138,7 @@ foreach l:libraries include_directories: includes, dependencies: static_deps) - if not use_function_versioning + if not use_function_versioning or is_windows # use pre-build objects to build shared lib sources = [] objs += static_lib.extract_all_objects(recursive: false) Then no error message disabling is needed in windows. I also don't think a message about function versioning not being supported on windows is necessary. It's not something the user can do anything about himself anyway. If we want such a message I think it should just be printed once at the start of the configuration process, rather than each time we hit a versioned library. Regards, /Bruce