From nobody Wed Nov 5 15:51:26 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1496754634025432.1482291188312; Tue, 6 Jun 2017 06:10:34 -0700 (PDT) Received: from localhost ([::1]:38362 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIEFe-0000nt-D6 for importer@patchew.org; Tue, 06 Jun 2017 09:10:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIEEv-0000SO-Gt for qemu-devel@nongnu.org; Tue, 06 Jun 2017 09:09:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIEEq-0002ZO-HK for qemu-devel@nongnu.org; Tue, 06 Jun 2017 09:09:41 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dIEEq-0002Z0-7l for qemu-devel@nongnu.org; Tue, 06 Jun 2017 09:09:36 -0400 Received: by mail-wm0-x242.google.com with SMTP id k15so34851885wmh.3 for ; Tue, 06 Jun 2017 06:09:36 -0700 (PDT) Received: from sqa-B21.kl.imgtec.org ([217.156.156.69]) by smtp.gmail.com with ESMTPSA id p187sm18143424wmd.20.2017.06.06.06.09.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Jun 2017 06:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=l+WH0uBjwPmaXvJsxLxEb/t0pbSw549v6b6JBbWNQyw=; b=XdmQRMMveDV/JPcUHEN0W20mr8xOoY5+IqYEB+4X7F2DFJylvoJecQmgWLVuM9oijW jCsHYPqMIcp/SXyF2h4rUraCHI+cbPuDPXT++vv8kmDnYYeJEOVHLkmC+gotJ4FMI3z7 BB7slFhTdyReOqf0RLvjvF6+t/GW0Tv2Vc/NQbfP6XXPL+aPTrMkDS0hCzNDaQ1WYWy7 B/SSurFPf67vxsc9WCVQts7iz5h9Ug/hfRReSdthvURAZKiPJuTmtdkXd+RJawSoBVdc q+EIWVC5rYvvt13sH4xiEjdDiJIDvjBy/nhLNOMH7Ae0Vl21aqSP664PF+axKQwm+QIN Xqig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=l+WH0uBjwPmaXvJsxLxEb/t0pbSw549v6b6JBbWNQyw=; b=Wm75IoyIbMi0lVuPDQbjXLMPAGpYhA5igy5oVROOi2l1T32Kr8WtWm00WtpcTFT5Pt FO6fnUr77st0OBQnJxzC+vR+UP2kPnU7YozGbH2SX5qn+tLGYGq0NwUPw3HR/TPYiIOc Tb9XVsyqBvjK29Xy47B3xW9JI16liQ63AUNLtzVX0r+PUw6/pOQY3Crnk6j/87Kxl63r GaSAsx/PPtCuNX9xPJqnilgP647Z1D4lxLmVS0Lm5N3tnC+ZMA8H63OxK3quqPjSDfdZ qkE/8eTfZsqIjZzSKHz5piyBmsX/yxEPe4NH3mVTAOBoy4nuTdIs3GLdRB8AazkVZRAt jsuw== X-Gm-Message-State: AODbwcD0Kn1JFK4BAC1AQ9n3/wgyQe88oEJWfzWkYy5b9SCTsM71zNNO 08Ni5Rsu8+dQvQ== X-Received: by 10.28.195.135 with SMTP id t129mr8566765wmf.63.1496754575076; Tue, 06 Jun 2017 06:09:35 -0700 (PDT) From: Bruno Dominguez To: stefanha@gmail.com Date: Tue, 6 Jun 2017 14:07:47 +0100 Message-Id: <1496754467-20893-1-git-send-email-bru.dominguez@gmail.com> X-Mailer: git-send-email 1.9.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH v2] configure: split c and cxx extra flags X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org, Bruno Dominguez Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" There was no possibility to add specific cxx flags using the configure file. So A new entrance has been created to support it. Duplication of information in configure and rules.mak. Taking QEMU_CFLAGS and add them to QEMU_CXXFLAGS, now the value of QEMU_CXXFLAGS is stored in config-host.mak, so there is no need for it. The makefile for libvixl was adding flags for QEMU_CXXFLAGS in QEMU_CFLAGS because of the addition in rules.mak. That was removed, so adding them where it should be. Signed-off-by: Bruno Dominguez Reviewed-by: Stefan Hajnoczi --- v2: * Matching --extra-cxxflags description with --cxx * Removing some extra spaces indicated by checkpatch script * Fixed patch format --- configure | 74 +++++++++++++++++++++++++----------------= ---- disas/libvixl/Makefile.objs | 2 +- rules.mak | 3 -- 3 files changed, 43 insertions(+), 36 deletions(-) diff --git a/configure b/configure index 0586ec9..4ab0d0f 100755 --- a/configure +++ b/configure @@ -91,7 +91,8 @@ update_cxxflags() { # Set QEMU_CXXFLAGS from QEMU_CFLAGS by filtering out those # options which some versions of GCC's C++ compiler complain about # because they only make sense for C programs. - QEMU_CXXFLAGS=3D + QEMU_CXXFLAGS=3D"$QEMU_CXXFLAGS -D__STDC_LIMIT_MACROS" + for arg in $QEMU_CFLAGS; do case $arg in -Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\ @@ -344,6 +345,9 @@ for opt do --extra-cflags=3D*) QEMU_CFLAGS=3D"$QEMU_CFLAGS $optarg" EXTRA_CFLAGS=3D"$optarg" ;; + --extra-cxxflags=3D*) QEMU_CXXFLAGS=3D"$QEMU_CXXFLAGS $optarg" + EXTRA_CXXFLAGS=3D"$optarg" + ;; --extra-ldflags=3D*) LDFLAGS=3D"$LDFLAGS $optarg" EXTRA_LDFLAGS=3D"$optarg" ;; @@ -787,6 +791,8 @@ for opt do ;; --extra-cflags=3D*) ;; + --extra-cxxflags=3D*) + ;; --extra-ldflags=3D*) ;; --enable-debug-info) @@ -1304,6 +1310,7 @@ Advanced options (experts only): --cxx=3DCXX use C++ compiler CXX [$cxx] --objcc=3DOBJCC use Objective-C compiler OBJCC [$objcc] --extra-cflags=3DCFLAGS append extra C compiler flags QEMU_CFLAGS + --extra-cxxflags=3DCXXFLAGS append extra C++ compiler flags QEMU_CXXFLAGS --extra-ldflags=3DLDFLAGS append extra linker flags LDFLAGS --make=3DMAKE use specified make [$make] --install=3DINSTALL use specified install [$install] @@ -1489,37 +1496,6 @@ if test "$bogus_os" =3D "yes"; then error_exit "Unrecognized host OS $targetos" fi =20 -# Check that the C++ compiler exists and works with the C compiler -if has $cxx; then - cat > $TMPC < $TMPCXX < $TMPC < $TMPCXX <> $config_host_mak echo "extra_cflags=3D$EXTRA_CFLAGS" >> $config_host_mak +echo "extra_cxxflags=3D$EXTRA_CXXFLAGS" >> $config_host_mak echo "extra_ldflags=3D$EXTRA_LDFLAGS" >> $config_host_mak echo "qemu_localedir=3D$qemu_localedir" >> $config_host_mak echo "libs_softmmu=3D$libs_softmmu" >> $config_host_mak @@ -5906,6 +5915,7 @@ echo "WINDRES=3D$windres" >> $config_host_mak echo "CFLAGS=3D$CFLAGS" >> $config_host_mak echo "CFLAGS_NOPIE=3D$CFLAGS_NOPIE" >> $config_host_mak echo "QEMU_CFLAGS=3D$QEMU_CFLAGS" >> $config_host_mak +echo "QEMU_CXXFLAGS=3D$QEMU_CXXFLAGS" >> $config_host_mak echo "QEMU_INCLUDES=3D$QEMU_INCLUDES" >> $config_host_mak if test "$sparse" =3D "yes" ; then echo "CC :=3D REAL_CC=3D\"\$(CC)\" cgcc" >> $config_host= _mak diff --git a/disas/libvixl/Makefile.objs b/disas/libvixl/Makefile.objs index bbe7695..dbf7def 100644 --- a/disas/libvixl/Makefile.objs +++ b/disas/libvixl/Makefile.objs @@ -6,6 +6,6 @@ libvixl_OBJS =3D vixl/utils.o \ =20 # The -Wno-sign-compare is needed only for gcc 4.6, which complains about # some signed-unsigned equality comparisons which later gcc versions do no= t. -$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS :=3D -I$(SRC_PATH)/disas= /libvixl $(QEMU_CFLAGS) -Wno-sign-compare +$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CXXFLAGS :=3D -I$(SRC_PATH)/dis= as/libvixl $(QEMU_CXXFLAGS) -Wno-sign-compare =20 common-obj-$(CONFIG_ARM_A64_DIS) +=3D $(libvixl_OBJS) diff --git a/rules.mak b/rules.mak index 1c0eabb..2a2fb72 100644 --- a/rules.mak +++ b/rules.mak @@ -20,9 +20,6 @@ MAKEFLAGS +=3D -rR %.mak: clean-target: =20 -# Flags for C++ compilation -QEMU_CXXFLAGS =3D -D__STDC_LIMIT_MACROS $(filter-out -Wstrict-prototypes -= Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-de= finition -Wredundant-decls, $(QEMU_CFLAGS)) - # Flags for dependency generation QEMU_DGFLAGS +=3D -MMD -MP -MT $@ -MF $(@D)/$(*F).d =20 --=20 1.9.1