[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] meson: fix botched compile check conversions
From: |
Peter Maydell |
Subject: |
Re: [PATCH] meson: fix botched compile check conversions |
Date: |
Tue, 16 Nov 2021 11:51:16 +0000 |
On Tue, 16 Nov 2021 at 09:38, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> Fix a bunch of incorrect conversions from configure to Meson, which result
> in different outcomes with --extra-cflags=-Werror.
FWIW this still won't give the right answer for the 'struct iovec'
test if you include -Werror via --extra-cflags, because the
generated code trips over an "expression result unused" warning:
Running compile:
Working directory:
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/meson-private/tmpeiz36t2n
Command line: clang-7 -m64 -mcx16
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/meson-private/tmpeiz36t2n/testfile.c
-o /mnt/nvmedis
k/linaro/qemu-from-laptop/qemu/build/arm-clang/meson-private/tmpeiz36t2n/output.obj
-c -fsanitize=undefined -fno-sanitize=shift-base -Werror -D_FI
LE_OFFSET_BITS=64 -O0 -Werror=implicit-function-declaration
-Werror=unknown-warning-option -Werror=unused-command-line-argument
-Werror=ignored-op
timization-argument -std=gnu11
Code:
#include <sys/uio.h>
void bar(void) {
sizeof(struct iovec);
};
Compiler stdout:
Compiler stderr:
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/arm-clang/meson-private/tmpeiz36t2n/testfile.c:3:13:
error: expression result unused [-Werror,-Wunused-value]
sizeof(struct iovec);
^~~~~~~~~~~~~~~~~~~~
1 error generated.
Checking for type "struct iovec" : NO
But maybe we should just explicitly reject -Werror in --extra-cflags...
-- PMM