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 89217A0C43; Mon, 15 Nov 2021 10:30:26 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6DF7440E01; Mon, 15 Nov 2021 10:30:26 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6C99E40141 for ; Mon, 15 Nov 2021 10:30:24 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10168"; a="220619660" X-IronPort-AV: E=Sophos;i="5.87,236,1631602800"; d="scan'208";a="220619660" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2021 01:30:23 -0800 X-IronPort-AV: E=Sophos;i="5.87,236,1631602800"; d="scan'208";a="671446018" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.19.213]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 15 Nov 2021 01:30:22 -0800 Date: Mon, 15 Nov 2021 09:30:19 +0000 From: Bruce Richardson To: Dmitry Kozlyuk Cc: dev@dpdk.org, leyi.rong@intel.com, Konstantin Ananyev Subject: Re: [PATCH 3/3] config/x86: fix MinGW cross build with meson 0.49 Message-ID: References: <20211112214826.333853-1-dmitry.kozliuk@gmail.com> <20211112214826.333853-4-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211112214826.333853-4-dmitry.kozliuk@gmail.com> 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 Sat, Nov 13, 2021 at 12:48:26AM +0300, Dmitry Kozlyuk wrote: > Cross build with MinGW was broken for the baseline meson 0.49.2. > Cause: in c_args = '-mno-avx512f' from config/x86/cross-mingw, > each character was treated as a separate compiler option: > > meson.build:4:0: ERROR: Compiler x86_64-w64-mingw32-gcc can not compile programs. > > With c_args = ['-mno-avx512f'] configuration passed, but build failed, > because Meson placed -mno-avx512f after -mavx512f in CFLAGS: > > In file included from /usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/include/immintrin.h:55, > from /usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/include/x86intrin.h:32, > from ../dpdk/lib/net/net_crc_avx512.c:13: > /usr/lib/gcc/x86_64-w64-mingw32/9.3-win32/include/avx512fintrin.h:1650:1: > error: inlining failed in call to always_inline _mm512_ternarylogic_epi64: > target specific option mismatch > 1650 | _mm512_ternarylogic_epi64 (__m512i __A, __m512i __B, __m512i __C, > | ^~~~~~~~~~~~~~~~~~~~~~~~~ > ../dpdk/lib/net/net_crc_avx512.c:59:9: note: called from here > 59 | return _mm512_ternarylogic_epi64(tmp0, tmp1, data_block, 0x96); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Additionally, -m[no-]avx512f flag is expected to be in machine_args > by all the checks in meson.build files. > > Commit 419c6e9af69e ("net/i40e: fix build for Windows MinGW") > fixed the errors cause by MinGW using AVX512F on Windows. > The binutils AVX512F bug check is now portable, > so enable it for Windows to switch AVX512 support on and off > without any special logic for MinGW. > > Fixes: 549bfc83168f ("config: disable AVX512 with MinGW") > Cc: leyi.rong@intel.com > > Signed-off-by: Dmitry Kozlyuk > --- Acked-by: Bruce Richardson