From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIDR6-0004NG-0t for qemu-devel@nongnu.org; Tue, 25 Feb 2014 03:32:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WIDR0-0006DS-KG for qemu-devel@nongnu.org; Tue, 25 Feb 2014 03:32:19 -0500 Received: from cantor2.suse.de ([195.135.220.15]:36423 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WIDR0-0006DJ-E7 for qemu-devel@nongnu.org; Tue, 25 Feb 2014 03:32:14 -0500 Message-ID: <530C550A.50205@suse.de> Date: Tue, 25 Feb 2014 09:32:10 +0100 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1393268898-20599-1-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1393268898-20599-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] 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 24.02.2014 20:08, 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. > Further, when the test did fail configure would plunge on regardless > of the error since we were running do_cc in a subshell. 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 > Signed-off-by: Peter Maydell 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