All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
	Thomas Huth <thuth@linux.vnet.ibm.com>,
	patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH v2] configure: Make C++ test work with --enable-werror
Date: Thu, 06 Mar 2014 20:55:55 +0100	[thread overview]
Message-ID: <5318D2CB.5030603@suse.de> (raw)
In-Reply-To: <1393352869-22257-1-git-send-email-peter.maydell@linaro.org>

Am 25.02.2014 19:27, schrieb Peter Maydell:
> gcc's C++ compiler complains about being passed some -W options
> which make sense for C but not for C++. This means we mustn't try
> a C++ compile with QEMU_CFLAGS, but only with a filtered version
> that removes the offending options. This filtering was already being
> done for uses of C++ in the build itself, but was omitted for the
> "does C++ work?" configure test. This only showed up when doing
> builds which explicitly enabled -Werror with --enable-werror,
> because the "do the compilers work" tests were mistakenly placed
> above the "default werror based on whether compiling from git" code.
> Another error in this category is that clang warns if you ask it to
> compile C++ code from a file named "foo.c". Further, because we
> were running do_cc in a subshell in the condition part of an "if",
> the error_exit inside do_compiler wouldn't terminate configure and
> we would plunge on regardless. Fix this complex of errors:
> 
> 1. Move the default-werror code up so that there are no invocations
> of compile_object and friends between it and the point where we
> set $werror explicitly based on the --enable-werror command line
> option.
> 
> 2. Provide a mechanism for filtering QEMU_CFLAGS to create
> QEMU_CXXFLAGS, and use it for the test we run here.
> 
> 3. Provide a do_cxx function to run a test with the C++ compiler
> rather than doing cute tricks with subshells and do_cc.
> 
> 4. Use a new temporary file TMPCXX for the C++ program fragment.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Still works for my --enable-werror setup,

Tested-by: Andreas Färber <afaerber@suse.de>

Thanks,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2014-03-06 19:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 18:27 [Qemu-devel] [PATCH v2] configure: Make C++ test work with --enable-werror Peter Maydell
2014-03-06 19:55 ` Andreas Färber [this message]
2014-03-06 21:26   ` Peter Maydell

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=5318D2CB.5030603@suse.de \
    --to=afaerber@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.