From patchwork Fri Nov 12 21:48:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 104257 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DE95BA0032; Fri, 12 Nov 2021 22:48:45 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1720C4113E; Fri, 12 Nov 2021 22:48:40 +0100 (CET) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com [209.85.208.174]) by mails.dpdk.org (Postfix) with ESMTP id A2CEC40692; Fri, 12 Nov 2021 22:48:38 +0100 (CET) Received: by mail-lj1-f174.google.com with SMTP id v15so21216410ljc.0; Fri, 12 Nov 2021 13:48:38 -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=X8gVx2IHG5AOAvkwCD85HSCXNw60KEsgMx+g4CRtPrM=; b=mbGMlmY9OpptK2GVZVUJhPXVX0ZsV5rHCPzpYjhm0iMZTFGUs3QApAdO9AlogmPQB5 yRMKDHK33kk9WB6okzXgUB8T3LDTLLwo5lnCkG6rBz6KPGQVCo6lkKHZOY4bJPDQ5KL+ HsXrSzrfQQ0WjjRF/wP1mAcZT8ihXy+DJi7/vSlh8lgiibWXLcEfMvhQAKh69jfxvHPo ZeTSoisQNkog/qEhdVfwfVRumLYNuSgEyuPiMWk1hsXXap1okzlr1McAUj0DWiaRJJOh TzG0/SoOVsiQ9ZSbdkJYxjJ4wy7eVfnDYzZALUvIS/LuozgAMH0b8lHJnCzQXnXczrqO XI5Q== 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=X8gVx2IHG5AOAvkwCD85HSCXNw60KEsgMx+g4CRtPrM=; b=tqMGKbMsOFT4f8lYEgeJlna6VdaDBWJ+DXQv/nekdrmFvs23Dq4PHYxTxnH/bNXEZe /cDWqk3+yL9B0CdW/xha69jT0IzGTUY/P/g8f7PjzlXGebZsTryw5COmPHYJmH0uhxFM pLCKNdC6xEDJsiKqWbQ3pattocsdZ16ySkV27M7sYVxG8BHDRbWIoOS57cTKBgGORvSN 2ETv9Uz5xxarvj05BTGDB7lFMuKDsrYQxUjaFABOwRVgXlg7viuDJm94Q13kfgVWi2zB 96ocIl5jV1VBKM5q9E59kWbctVI0HKVczHrcyFp001opFVHqfg7qmJFSqyGSDtrAtd6y 60WQ== X-Gm-Message-State: AOAM533X9+EEZWk8l5TQ90cn6PGUAlhYEwvV45X3aR8WS8IKazkKLQyA Ok7L5D/vJg4CnX4YLqgxP9+9dhZPSPI= X-Google-Smtp-Source: ABdhPJyt0f82BSrzD3aYVYbZlyRtaF+O/yvrf3EaA+NNWXyYNydkAkpBOd5xLm2qOVoz46/Tez8aZg== X-Received: by 2002:a05:651c:a0f:: with SMTP id k15mr19005913ljq.298.1636753718148; Fri, 12 Nov 2021 13:48:38 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 13:48:37 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , stable@dpdk.org, bruce.richardson@intel.com, Konstantin Ananyev , Vladimir Medvedkin Subject: [PATCH 1/3] config/x86: skip GNU binutils bug check for LLVM Date: Sat, 13 Nov 2021 00:48:24 +0300 Message-Id: <20211112214826.333853-2-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 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 AVX512 was disabled when GNU binutils were missing or had a known bug, even if LLVM binutils were used for the build, because binutils-avx512-check.sh was invoked regardless and failed. In particular, this was the case for FreeBSD with clang (default). Run the check only when GNU binutils are used. Fixes: 68b1f1cda5b4 ("build: check AVX512 rather than binutils version") Cc: stable@dpdk.org Cc: bruce.richardson@intel.com Signed-off-by: Dmitry Kozlyuk Acked-by: Bruce Richardson --- config/x86/meson.build | 7 ++++--- lib/acl/meson.build | 2 +- lib/fib/meson.build | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/x86/meson.build b/config/x86/meson.build index 29f3dea181..603359e55a 100644 --- a/config/x86/meson.build +++ b/config/x86/meson.build @@ -2,9 +2,10 @@ # Copyright(c) 2017-2020 Intel Corporation # get binutils version for the workaround of Bug 97 -if not is_windows - binutils_ok = run_command(binutils_avx512_check) - if binutils_ok.returncode() != 0 and cc.has_argument('-mno-avx512f') +binutils_ok = true +if not is_windows and (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' warning('Binutils error with AVX512 assembly, disabling AVX512 support') endif diff --git a/lib/acl/meson.build b/lib/acl/meson.build index f3dc513846..fbe17f9454 100644 --- a/lib/acl/meson.build +++ b/lib/acl/meson.build @@ -36,7 +36,7 @@ if dpdk_conf.has('RTE_ARCH_X86') # compile AVX512 version if: # we are building 64-bit binary AND binutils can generate proper code - if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok.returncode() == 0 + if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok # compile AVX512 version if either: # a. we have AVX512 supported in minimum instruction set diff --git a/lib/fib/meson.build b/lib/fib/meson.build index 593c8c47c8..9b848d0841 100644 --- a/lib/fib/meson.build +++ b/lib/fib/meson.build @@ -14,7 +14,7 @@ deps += ['rib'] # compile AVX512 version if: # we are building 64-bit binary AND binutils can generate proper code -if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok.returncode() == 0 +if dpdk_conf.has('RTE_ARCH_X86_64') and binutils_ok # compile AVX512 version if either: # a. we have AVX512F supported in minimum instruction set baseline # b. it's not minimum instruction set, but supported by compiler From patchwork Fri Nov 12 21:48:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 104258 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5B4D0A0032; Fri, 12 Nov 2021 22:48:52 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 107B041148; Fri, 12 Nov 2021 22:48:42 +0100 (CET) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) by mails.dpdk.org (Postfix) with ESMTP id 865B5410EF for ; Fri, 12 Nov 2021 22:48:39 +0100 (CET) Received: by mail-lj1-f171.google.com with SMTP id e11so21029786ljo.13 for ; Fri, 12 Nov 2021 13:48:39 -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=r4mkvLrIYV1y4BSvz1udZoK1bETCCS4sF3IPeImxftA=; b=ipKwEbGnjvi5PKQ0VmD6ewXSVEUo2Nu4+C370FHEwB2WK9pYFzz7WM0vscbBRHl1eN FsAAY1O+CHmzHz33V4Zq4BpEpLCDxB/YZeNhvjLspZHDEZc8HA+47qier15mvoIf9UkW 1yjKmIW4VGQ3nYk+N0oEYFMHz8jjNU82lqPiXXKODsmsZuFrheC+JYETLC3SJJmX5hJI n/0PanE7x3DTB+QtT0oPc3dwXgSV3YgwlaLEG8qPhXZyGwVdqQsSJTOKLSDi946SZcd3 5cpWCWO0DsQ02bwSX6/BtD0wWoPjv5gvBFhpR6+s4nR4ekscBXk6DYMs7cb4oc27EGhP z3Rg== 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=r4mkvLrIYV1y4BSvz1udZoK1bETCCS4sF3IPeImxftA=; b=Xgye+G79IyAjIHoakUhB96DnxAABthl+1f9SOl7m4ghDTCi5mcvIKhf3qkSF59OQaH 0i+20tv+4jq7il5LziUl9GYsJ5nZO1UdbZiOTfccnHE/WBwYyuH2OTLxT4jpq4bETQFW m0Axv/jOIAtaClCrTtGOS4XiBHqO7P452Y0Rdo89GBJpk4rpCiALo8jjKMXoOJedPpou J1KL31Myy0VxfFbwwLMbQi5A/PNwO+Bs/RNOLqdxwvIRO29xik+Wi3vMAgo+Wk96+xmp WUmU9kk9lvwCqiLkOgjhldP/kcFD46YwIenmC7Ey4nUFgg2AtgzSj6/YuY1n9EOjdKKh bovg== X-Gm-Message-State: AOAM533Q0cNdTcLMQUbu0Atgc5mBzQUuCBO3NyMduxeMjBjhlVV0nPHF 4DJhLcFMOSzLHKvHZTMz+yNoFg6TE2c= X-Google-Smtp-Source: ABdhPJzDBQHwwcFpHFzAwizCaFrp5aRupCM6muVeW4QI/lbBz7VlZFb2f7YhIDhkiyxrexQTYlxKDg== X-Received: by 2002:a2e:bba1:: with SMTP id y33mr18395203lje.263.1636753718970; Fri, 12 Nov 2021 13:48:38 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 13:48:38 -0800 (PST) From: Dmitry Kozlyuk To: dev@dpdk.org Cc: Dmitry Kozlyuk , Bruce Richardson , Konstantin Ananyev Subject: [PATCH 2/3] buildtools: make AVX512 check script portable Date: Sat, 13 Nov 2021 00:48:25 +0300 Message-Id: <20211112214826.333853-3-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 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 buildtools/binutils-avx512-check.sh was Unix-only and could not be used in cross builds: 1) written in shell; 2) used the assembler binary that may be missing, e.g. when building on Windows with LLVM; 3) located the assembler as ${AS:-as} and referenced objdump, but those binaries may be overridden via --cross-file. Rewrite the script in Python. Use the C compiler for the check. Locate objdump and the C compiler using Meson. Signed-off-by: Dmitry Kozlyuk Acked-by: Bruce Richardson --- buildtools/binutils-avx512-check.py | 21 +++++++++++++++++++++ buildtools/binutils-avx512-check.sh | 16 ---------------- buildtools/meson.build | 4 +++- 3 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 buildtools/binutils-avx512-check.py delete mode 100755 buildtools/binutils-avx512-check.sh diff --git a/buildtools/binutils-avx512-check.py b/buildtools/binutils-avx512-check.py new file mode 100644 index 0000000000..a4e14f3593 --- /dev/null +++ b/buildtools/binutils-avx512-check.py @@ -0,0 +1,21 @@ +#! /usr/bin/env python3 +# SPDX-License-Identitifer: BSD-3-Clause +# Copyright(c) 2020 Intel Corporation + +import subprocess +import sys +import tempfile + +objdump, *cc = sys.argv[1:] +with tempfile.NamedTemporaryFile() as obj: + # On Windows, the file is opened exclusively and is not writable. + obj.close() + # from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028 + gather_params = '0x8(,%ymm1,1),%ymm0{%k2}' + src = '__asm__("vpgatherqq {}");'.format(gather_params).encode('utf-8') + subprocess.run(cc + ['-c', '-xc', '-o', obj.name, '-'], input=src, check=True) + asm = subprocess.run([objdump, '-d', '--no-show-raw-insn', obj.name], + capture_output=True, check=True).stdout.decode('utf-8') + if gather_params not in asm: + print('vpgatherqq displacement error with as') + sys.exit(1) diff --git a/buildtools/binutils-avx512-check.sh b/buildtools/binutils-avx512-check.sh deleted file mode 100755 index 2a833b64b7..0000000000 --- a/buildtools/binutils-avx512-check.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2020 Intel Corporation - -AS=${AS:-as} -OBJFILE=$(mktemp -t dpdk.binutils-check.XXXXXX) -trap 'rm -f "$OBJFILE"' EXIT -# from https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90028 -GATHER_PARAMS='0x8(,%ymm1,1),%ymm0{%k2}' - -# assemble vpgather to file and similarly check -echo "vpgatherqq $GATHER_PARAMS" | $AS --64 -o $OBJFILE - -objdump -d --no-show-raw-insn $OBJFILE | grep -q $GATHER_PARAMS || { - echo "vpgatherqq displacement error with as" - exit 1 -} diff --git a/buildtools/meson.build b/buildtools/meson.build index f776316da1..22ea0ba375 100644 --- a/buildtools/meson.build +++ b/buildtools/meson.build @@ -4,7 +4,7 @@ pkgconf = find_program('pkg-config', 'pkgconf', required: false) check_symbols = find_program('check-symbols.sh') ldflags_ibverbs_static = find_program('options-ibverbs-static.sh') -binutils_avx512_check = find_program('binutils-avx512-check.sh') +objdump = find_program('objdump', 'llvm-objdump') python3 = import('python').find_installation(required: false) if python3.found() @@ -18,6 +18,8 @@ map_to_win_cmd = py3 + files('map_to_win.py') sphinx_wrapper = py3 + files('call-sphinx-build.py') get_cpu_count_cmd = py3 + files('get-cpu-count.py') get_numa_count_cmd = py3 + files('get-numa-count.py') +binutils_avx512_check = (py3 + files('binutils-avx512-check.py') + + [objdump] + cc.cmd_array()) # select library and object file format pmdinfo = py3 + files('gen-pmdinfo-cfile.py') + [meson.current_build_dir()] From patchwork Fri Nov 12 21:48:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Kozlyuk X-Patchwork-Id: 104259 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org 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 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 Acked-by: Bruce Richardson --- 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'