[PATCH 2/3] buildtools: make AVX512 check script portable

Bruce Richardson bruce.richardson at intel.com
Mon Nov 15 10:28:46 CET 2021


On Sat, Nov 13, 2021 at 12:48:25AM +0300, Dmitry Kozlyuk wrote:
> 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 <dmitry.kozliuk at gmail.com>
> ---
>  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
> +
This probably should have your own copyright instead of or alongside the
Intel one, since this is a rewrite.

Otherwise:
Acked-by: Bruce Richardson <bruce.richardson at intel.com>


More information about the dev mailing list