From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 7648627D for ; Thu, 7 Mar 2019 02:19:23 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2019 17:19:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,450,1544515200"; d="scan'208";a="305046480" Received: from anandraw-mobl.amr.corp.intel.com (HELO [10.121.163.141]) ([10.121.163.141]) by orsmga005.jf.intel.com with ESMTP; 06 Mar 2019 17:19:20 -0800 To: "Richardson, Bruce" , Thomas Monjalon Cc: "dev@dpdk.org" , "Kadam, Pallavi" , "Menon, Ranjit" , "Shaw, Jeffrey B" References: <20190306041634.12976-1-anand.rawat@intel.com> <20190306041634.12976-2-anand.rawat@intel.com> <37871127.gZq9nUeyVu@xps> <20190306112006.GA134252@bricha3-MOBL.ger.corp.intel.com> From: Anand Rawat Message-ID: <5be621e2-b949-a434-9927-1dd1f5701b58@intel.com> Date: Wed, 6 Mar 2019 17:19:20 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.2 MIME-Version: 1.0 In-Reply-To: <20190306112006.GA134252@bricha3-MOBL.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v2 1/6] eal: eal stub to add windows support 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: , X-List-Received-Date: Thu, 07 Mar 2019 01:19:24 -0000 On 3/6/2019 3:20 AM, Richardson, Bruce wrote: > On Wed, Mar 06, 2019 at 11:03:24AM +0100, Thomas Monjalon wrote: > >>> # get binutils version for the workaround of Bug 97 >>> -ldver = run_command('ld', '-v').stdout().strip() >>> -if ldver.contains('2.30') >>> - if cc.has_argument('-mno-avx512f') >>> - march_opt += '-mno-avx512f' >>> - message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97') >>> +if host_machine.system() != 'windows' >>> + ldver = run_command('ld', '-v').stdout().strip() >>> + if ldver.contains('2.30') >>> + if cc.has_argument('-mno-avx512f') >>> + march_opt += '-mno-avx512f' >>> + message('Binutils 2.30 detected, disabling AVX512 support as workaround for bug #97') >>> + endif >>> endif >>> endif >> >> Same comment as in v1, you should check which linker is used. >> This check is only for GNU ld 2.30. >> > > I'm not aware of any better way to implement this in meson right now, > sadly. Through the compiler object we can get information about linker > flags, but not about the specific linker itself, since it is only called > through the compiler. Since on windows we only support clang, this check cause an error. 'ERROR: Program or command 'ld' not found or not executable' It is for this reason we excluded this check from the build flow. Clang uses lld as linker from the LLVM project. > >>> --- /dev/null >>> +++ b/lib/librte_eal/windows/eal/eal_lcore.c >>> + /* Get the cpu core id value */ >>> +unsigned int >>> +eal_cpu_core_id(unsigned int lcore_id) >>> +{ >>> + return lcore_id; >>> +} >> >> For this function and the others in this file, >> please add a comment explaining this is a stub, not the expected result. >> You can add a TODO or FIXME tag. >> >>> --- a/lib/meson.build >>> +++ b/lib/meson.build >>> +if host_machine.system() == 'windows' >>> + libraries = ['eal'] # override libraries for windows >>> +endif >> >> Instead of simply "override", you could explain that the other libraries >> are not yet supported on Windows. >> >>> --- a/meson.build >>> +++ b/meson.build >>> -# build libs and drivers >>> +# build libs >>> subdir('lib') >>> -subdir('buildtools') >>> -subdir('drivers') >>> >>> -# build binaries and installable tools >>> -subdir('usertools') >>> -subdir('app') >>> +if host_machine.system() != 'windows' >>> + # build buildtools and drivers >>> + subdir('buildtools') >>> + subdir('drivers') >>> >>> -# build docs >>> -subdir('doc') >>> + # build binaries and installable tools >>> + subdir('usertools') >>> + subdir('app') >>> + subdir('test') >>> + >>> + # build kernel modules if enabled >>> + if get_option('enable_kmods') >>> + subdir('kernel') >>> + endif >>> + >>> + # build docs >>> + subdir('doc') >>> +endif >> >> I don't like modifying this file. >> Can we skip not supported directories inside the sub meson files? >> > Since we now mandate meson 0.47 we can use the "subdir_done()" function to > this. > > /Bruce > Will be done as a part of v3 -- Anand Rawat