From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLeOh-0001xQ-0K for qemu-devel@nongnu.org; Thu, 06 Mar 2014 14:56:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLeOb-0002GA-R9 for qemu-devel@nongnu.org; Thu, 06 Mar 2014 14:56:02 -0500 Received: from cantor2.suse.de ([195.135.220.15]:52848 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLeOb-0002G5-L2 for qemu-devel@nongnu.org; Thu, 06 Mar 2014 14:55:57 -0500 Message-ID: <5318D2CB.5030603@suse.de> Date: Thu, 06 Mar 2014 20:55:55 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1393352869-22257-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1393352869-22257-1-git-send-email-peter.maydell@linaro.org> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] configure: Make C++ test work with --enable-werror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , Thomas Huth , patches@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: >=20 > 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. >=20 > 2. Provide a mechanism for filtering QEMU_CFLAGS to create > QEMU_CXXFLAGS, and use it for the test we run here. >=20 > 3. Provide a do_cxx function to run a test with the C++ compiler > rather than doing cute tricks with subshells and do_cc. >=20 > 4. Use a new temporary file TMPCXX for the C++ program fragment. >=20 > Signed-off-by: Peter Maydell Still works for my --enable-werror setup, Tested-by: Andreas F=E4rber Thanks, Andreas --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg