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 368E4A0032; Fri, 12 Nov 2021 22:48:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 072934114E; Fri, 12 Nov 2021 22:48:43 +0100 (CET) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) by mails.dpdk.org (Postfix) with ESMTP id 1556F4113C for ; Fri, 12 Nov 2021 22:48:40 +0100 (CET) Received: by mail-lj1-f180.google.com with SMTP id d11so21091549ljg.8 for ; Fri, 12 Nov 2021 13:48:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OH362mBwPs28MBydeA/XRSUfYXRVQWbpIer4vfK2/LU=; b=HKw9Oq/oM2NEUOYa9gXMW7dXhJp4s9xpiszSH8lTc9OxOXKVEsvz/d7DA7JBe4qg9C voGkMm4oX1NHWfs58L53dyxQWaNaiGMXfjPbqEdrb5xcZ43HPCudVBhmiIYwE9PlzZNY rWoaBYOk7X8SdYhzLbPC2yzBX0UjXApLUVlfe262rkmQAlGAKZRfbIB9Mqkhr8oXwqnZ ESUtPFjWgLIcbk0zMicBylwbwMabKP62MlxBPX9FBvhyuHGozMQ1n75RQUCEzNWDEKFB xJmzndgkC/mdJdWJNPPkrOO/LkmWV1ArXhriXJZ/l1xFVQHOklIlmBD+4CvydsWeTDwX MxYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OH362mBwPs28MBydeA/XRSUfYXRVQWbpIer4vfK2/LU=; b=HEGTIHuwOIn+Uiv9xWeAHO7lCrEDcUL3/tBndW0R8nKKi5l7O+28BwQINu0KqZVj74 1KaJcc8KITxra85XcNjbCNtL5jLvLsu4uOKWMtsZ/j/ESyVPcXUQAS/UWb/rcvd+z7Am iiQ87AGrbnk38EguW405nrqIpIVpnYEQKJi+wjKer9bdqcWLSHB59AeMVQa6xVSlCC5V 534JD6czm/H2DXhJWXDtJ9HwWT4WnCe8w7YoTf7Ujz3I2V7mCOIFvaoCYZ0d7wIpI3+8 gZ4K1xP0sP9MtMYH44H9INrbU2RKhHYo0BOf6lHAMhBx+e5m2ECRRXDcIaJEaPZfMZvf DRHA== X-Gm-Message-State: AOAM531GmNc61QdHIkh7y9nopFteByOJPCH8kdBNrjuNb91awA/XwY9B SITINC4+dqqlGQlyBj1oxqetvUl8nIU= X-Google-Smtp-Source: ABdhPJwZqU/XYUZwO5XowrQ79UVRfBsdKQsbxi++nVI9QcdyYEFDnMMOAXpuxmO8I0aiZulIH+XMHQ== X-Received: by 2002:a2e:6e12:: with SMTP id j18mr16208220ljc.527.1636753719587; Fri, 12 Nov 2021 13:48:39 -0800 (PST) Received: from sovereign.. (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id l5sm647917ljh.66.2021.11.12.13.48.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 13:48:39 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , leyi.rong@intel.com, Bruce Richardson , Konstantin Ananyev Subject: [PATCH 3/3] config/x86: fix MinGW cross build with meson 0.49 Date: Sat, 13 Nov 2021 00:48:26 +0300 Message-Id: <20211112214826.333853-4-dmitry.kozliuk@gmail.com> X-Mailer: git-send-email 2.29.3 In-Reply-To: <20211112214826.333853-1-dmitry.kozliuk@gmail.com> References: <20211112214826.333853-1-dmitry.kozliuk@gmail.com> MIME-Version: 1.0 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 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 --- config/x86/cross-mingw | 4 +--- config/x86/meson.build | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/config/x86/cross-mingw b/config/x86/cross-mingw index 48a82b457e..09f7af0928 100644 --- a/config/x86/cross-mingw +++ b/config/x86/cross-mingw @@ -5,12 +5,10 @@ ld = 'x86_64-w64-mingw32-ld' ar = 'x86_64-w64-mingw32-ar' strip = 'x86_64-w64-mingw32-strip' pkgconfig = 'x86_64-w64-mingw32-pkg-config' +objdump = 'x86_64-w64-mingw32-objdump' [host_machine] system = 'windows' cpu_family = 'x86_64' cpu = 'native' endian = 'little' - -[properties] -c_args = '-mno-avx512f' diff --git a/config/x86/meson.build b/config/x86/meson.build index 603359e55a..e25ed316f4 100644 --- a/config/x86/meson.build +++ b/config/x86/meson.build @@ -3,7 +3,7 @@ # get binutils version for the workaround of Bug 97 binutils_ok = true -if not is_windows and (is_linux or cc.get_id() == 'gcc') +if is_linux or cc.get_id() == 'gcc' binutils_ok = run_command(binutils_avx512_check).returncode() == 0 if not binutils_ok and cc.has_argument('-mno-avx512f') machine_args += '-mno-avx512f' -- 2.29.3