From nobody Thu Dec 18 17:53:20 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; 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 1496864803429580.626504252801; Wed, 7 Jun 2017 12:46:43 -0700 (PDT) Received: from localhost ([::1]:45605 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIfQi-0001q3-DA for importer@patchew.org; Wed, 07 Jun 2017 14:11:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dIfNC-0006yl-Kj for qemu-devel@nongnu.org; Wed, 07 Jun 2017 14:08:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dIfNB-0004G3-5x for qemu-devel@nongnu.org; Wed, 07 Jun 2017 14:08:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60202) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dIfNA-0004Fa-TG for qemu-devel@nongnu.org; Wed, 07 Jun 2017 14:08:01 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 082DD20264; Wed, 7 Jun 2017 18:08:00 +0000 (UTC) Received: from localhost (ovpn-117-84.ams2.redhat.com [10.36.117.84]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74F1760F92; Wed, 7 Jun 2017 18:07:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 082DD20264 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=stefanha@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 082DD20264 From: Stefan Hajnoczi To: Date: Wed, 7 Jun 2017 19:07:36 +0100 Message-Id: <20170607180736.11011-6-stefanha@redhat.com> In-Reply-To: <20170607180736.11011-1-stefanha@redhat.com> References: <20170607180736.11011-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 07 Jun 2017 18:08:00 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL for-2.9 5/5] 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 , Stefan Hajnoczi , Bruno Dominguez Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Bruno Dominguez 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 Message-id: 1496754467-20893-1-git-send-email-bru.dominguez@gmail.com Signed-off-by: Stefan Hajnoczi --- configure | 74 +++++++++++++++++++++++++----------------= ---- disas/libvixl/Makefile.objs | 4 +-- rules.mak | 3 -- 3 files changed, 44 insertions(+), 37 deletions(-) diff --git a/configure b/configure index 2203b98..98012ab 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|\ @@ -345,6 +346,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" ;; @@ -788,6 +792,8 @@ for opt do ;; --extra-cflags=3D*) ;; + --extra-cxxflags=3D*) + ;; --extra-ldflags=3D*) ;; --enable-debug-info) @@ -1305,6 +1311,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] @@ -1490,37 +1497,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 @@ -5911,6 +5920,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 860fb7f..27183b7 100644 --- a/disas/libvixl/Makefile.objs +++ b/disas/libvixl/Makefile.objs @@ -6,9 +6,9 @@ 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 # Ensure that C99 macros are defined regardless of the inclusion order of # headers in vixl. This is required at least on NetBSD. -$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CFLAGS +=3D -D__STDC_CONSTANT_M= ACROS -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS +$(addprefix $(obj)/,$(libvixl_OBJS)): QEMU_CXXFLAGS +=3D -D__STDC_CONSTANT= _MACROS -D__STDC_FORMAT_MACROS =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 2.9.4