qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PATCH 20/24] configure: do not rerun the tests with -Werror
Date: Thu, 11 May 2023 11:50:17 +0200	[thread overview]
Message-ID: <20230511095021.1397802-21-pbonzini@redhat.com> (raw)
In-Reply-To: <20230511095021.1397802-1-pbonzini@redhat.com>

Tests run in configure are pretty trivial at this point, so
do not bother with the extra complication of running tests
both with and without -Werror.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 35 +----------------------------------
 1 file changed, 1 insertion(+), 34 deletions(-)

diff --git a/configure b/configure
index 85f82a626964..e24a533b3af1 100755
--- a/configure
+++ b/configure
@@ -124,41 +124,8 @@ lines: ${BASH_LINENO[*]}"
   $compiler "$@" >> config.log 2>&1 || return $?
 }
 
-do_compiler_werror() {
-    # Run the compiler, capturing its output to the log. First argument
-    # is compiler binary to execute.
-    compiler="$1"
-    shift
-    if test -n "$BASH_VERSION"; then eval '
-        echo >>config.log "
-funcs: ${FUNCNAME[*]}
-lines: ${BASH_LINENO[*]}"
-    '; fi
-    echo $compiler "$@" >> config.log
-    $compiler "$@" >> config.log 2>&1 || return $?
-    # Test passed. If this is an --enable-werror build, rerun
-    # the test with -Werror and bail out if it fails. This
-    # makes warning-generating-errors in configure test code
-    # obvious to developers.
-    if test "$werror" != "yes"; then
-        return 0
-    fi
-    # Don't bother rerunning the compile if we were already using -Werror
-    case "$*" in
-        *-Werror*)
-           return 0
-        ;;
-    esac
-    echo $compiler -Werror "$@" >> config.log
-    $compiler -Werror "$@" >> config.log 2>&1 && return $?
-    error_exit "configure test passed without -Werror but failed with -Werror." \
-        "This is probably a bug in the configure script. The failing command" \
-        "will be at the bottom of config.log." \
-        "You can run configure with --disable-werror to bypass this check."
-}
-
 do_cc() {
-    do_compiler_werror "$cc" $CPU_CFLAGS "$@"
+    do_compiler "$cc" $CPU_CFLAGS "$@"
 }
 
 compile_object() {
-- 
2.40.1



  parent reply	other threads:[~2023-05-11  9:54 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-11  9:49 [PATCH 00/24] Meson changes for QEMU 8.1 Paolo Bonzini
2023-05-11  9:49 ` [PATCH 01/24] meson: regenerate meson-buildoptions.sh Paolo Bonzini
2023-05-11  9:49 ` [PATCH 02/24] meson: require 0.63.0 Paolo Bonzini
2023-05-11  9:50 ` [PATCH 03/24] meson: use prefer_static option Paolo Bonzini
2023-05-11  9:50 ` [PATCH 04/24] meson: remove static_kwargs Paolo Bonzini
2023-05-11  9:50 ` [PATCH 05/24] meson: add more version numbers to the summary Paolo Bonzini
2023-05-11  9:50 ` [PATCH 06/24] meson: drop unnecessary declare_dependency() Paolo Bonzini
2023-05-11  9:50 ` [PATCH 07/24] build: move glib detection and workarounds to meson Paolo Bonzini
2023-05-11  9:50 ` [PATCH 08/24] configure: remove pkg-config functions Paolo Bonzini
2023-05-11  9:50 ` [PATCH 09/24] configure, meson: move --enable-modules to Meson Paolo Bonzini
2023-05-11  9:50 ` [PATCH 10/24] meson: prepare move of QEMU_CFLAGS to meson Paolo Bonzini
2023-05-11  9:50 ` [PATCH 11/24] build: move sanitizer tests " Paolo Bonzini
2023-05-11  9:50 ` [PATCH 12/24] build: move SafeStack " Paolo Bonzini
2023-05-11  9:50 ` [PATCH 13/24] build: move coroutine backend selection " Paolo Bonzini
2023-05-11  9:50 ` [PATCH 14/24] build: move stack protector flag " Paolo Bonzini
2023-05-11  9:50 ` [PATCH 15/24] build: move warning " Paolo Bonzini
2023-05-11  9:50 ` [PATCH 16/24] build: move remaining compiler flag tests " Paolo Bonzini
2023-05-11  9:50 ` [PATCH 17/24] build: move compiler version check " Paolo Bonzini
2023-05-11  9:50 ` [PATCH 18/24] build: move --disable-debug-info " Paolo Bonzini
2023-07-26  6:45   ` Michael Tokarev
2023-05-11  9:50 ` [PATCH 19/24] configure: remove compiler sanity check Paolo Bonzini
2024-01-18 19:23   ` Thomas Huth
2023-05-11  9:50 ` Paolo Bonzini [this message]
2023-05-11  9:50 ` [PATCH 21/24] configure: remove unnecessary mkdir Paolo Bonzini
2023-05-11  9:50 ` [PATCH 22/24] configure: reorder option parsing code Paolo Bonzini
2023-05-11  9:50 ` [PATCH 23/24] configure: remove unnecessary check Paolo Bonzini
2023-05-11  9:50 ` [PATCH 24/24] docs/devel: update build system docs Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230511095021.1397802-21-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).