From: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
To: qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com, lcapitulino@redhat.com,
vrozenfe@redhat.com, pbonzini@redhat.com, seiji.aguchi@hds.com,
areis@redhat.com
Subject: [Qemu-devel] [RFC PATCH v3 01/11] configure: Support configuring c++ compiler
Date: Tue, 21 May 2013 11:33:38 -0400 [thread overview]
Message-ID: <20130521153338.4880.75134.stgit@hds.com> (raw)
In-Reply-To: <20130521153333.4880.74390.stgit@hds.com>
Add configuration for c++ compiler (${corss_prefix}g++ as default) in
configure and Makefiles.
Currently, usage of c++ language is only for access to Windows VSS
using COM+ services in qemu-guest-agent for Windows.
Signed-off-by: Tomoki Sekiyama <tomoki.sekiyama@hds.com>
---
configure | 6 ++++++
rules.mak | 9 ++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index 5ae7e4a..1af2f37 100755
--- a/configure
+++ b/configure
@@ -280,6 +280,7 @@ else
cc="${CC-${cross_prefix}gcc}"
fi
+cxx="${CXX-${cross_prefix}g++}"
ar="${AR-${cross_prefix}ar}"
as="${AS-${cross_prefix}as}"
cpp="${CPP-$cc -E}"
@@ -614,6 +615,8 @@ for opt do
;;
--host-cc=*) host_cc="$optarg"
;;
+ --cxx=*) cxx="$optarg"
+ ;;
--objcc=*) objcc="$optarg"
;;
--make=*) make="$optarg"
@@ -1069,6 +1072,7 @@ echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
echo " --cc=CC use C compiler CC [$cc]"
echo " --host-cc=CC use C compiler CC [$host_cc] for code run at"
echo " build time"
+echo " --cxx=CXX use C++ compiler CXX [$cxx]"
echo " --objcc=OBJCC use Objective-C compiler OBJCC [$objcc]"
echo " --extra-cflags=CFLAGS append extra C compiler flags QEMU_CFLAGS"
echo " --extra-ldflags=LDFLAGS append extra linker flags LDFLAGS"
@@ -3496,6 +3500,7 @@ fi
echo "Source path $source_path"
echo "C compiler $cc"
echo "Host C compiler $host_cc"
+echo "C++ compiler $cxx"
echo "Objective-C compiler $objcc"
echo "CFLAGS $CFLAGS"
echo "QEMU_CFLAGS $QEMU_CFLAGS"
@@ -4069,6 +4074,7 @@ echo "PYTHON=$python" >> $config_host_mak
echo "CC=$cc" >> $config_host_mak
echo "CC_I386=$cc_i386" >> $config_host_mak
echo "HOST_CC=$host_cc" >> $config_host_mak
+echo "CXX=$cxx" >> $config_host_mak
echo "OBJCC=$objcc" >> $config_host_mak
echo "AR=$ar" >> $config_host_mak
echo "AS=$as" >> $config_host_mak
diff --git a/rules.mak b/rules.mak
index 4499745..abc2e84 100644
--- a/rules.mak
+++ b/rules.mak
@@ -8,9 +8,13 @@ MAKEFLAGS += -rR
%.d:
%.h:
%.c:
+%.cpp:
%.m:
%.mak:
+# Flags for C++ compilation
+QEMU_CXXFLAGS = -D__STDC_LIMIT_MACROS $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls, $(QEMU_CFLAGS))
+
# Flags for dependency generation
QEMU_DGFLAGS += -MMD -MP -MT $@ -MF $(*D)/$(*F).d
@@ -50,6 +54,9 @@ endif
%.o: %.asm
$(call quiet-command,$(AS) $(ASFLAGS) -o $@ $<," AS $(TARGET_DIR)$@")
+%.o: %.cpp
+ $(call quiet-command,$(CXX) $(QEMU_INCLUDES) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," CXX $(TARGET_DIR)$@")
+
%.o: %.m
$(call quiet-command,$(OBJCC) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," OBJC $(TARGET_DIR)$@")
@@ -70,7 +77,7 @@ quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
>/dev/null 2>&1 && echo OK), $2, $3)
-VPATH_SUFFIXES = %.c %.h %.S %.m %.mak %.texi %.sh %.rc
+VPATH_SUFFIXES = %.c %.h %.S %.cpp %.m %.mak %.texi %.sh %.rc
set-vpath = $(if $1,$(foreach PATTERN,$(VPATH_SUFFIXES),$(eval vpath $(PATTERN) $1)))
# find-in-path
next prev parent reply other threads:[~2013-05-21 15:34 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 15:33 [Qemu-devel] [RFC PATCH v3 00/11] qemu-ga: fsfreeze on Windows using VSS Tomoki Sekiyama
2013-05-21 15:33 ` Tomoki Sekiyama [this message]
2013-05-21 16:42 ` [Qemu-devel] [RFC PATCH v3 01/11] configure: Support configuring c++ compiler Eric Blake
2013-05-21 21:02 ` Tomoki Sekiyama
2013-05-21 16:56 ` Peter Maydell
2013-05-21 21:01 ` Tomoki Sekiyama
2013-05-21 15:33 ` [Qemu-devel] [RFC PATCH v3 02/11] Fix errors and warnings while compiling with c++ compilier Tomoki Sekiyama
2013-05-23 12:12 ` Stefan Hajnoczi
2013-05-23 18:34 ` Tomoki Sekiyama
2013-05-24 8:52 ` Stefan Hajnoczi
2013-05-24 14:20 ` Tomoki Sekiyama
2013-05-24 15:25 ` Markus Armbruster
2013-05-27 11:43 ` Stefan Hajnoczi
2013-05-24 13:01 ` Laszlo Ersek
2013-05-24 14:33 ` Tomoki Sekiyama
2013-05-21 15:33 ` [Qemu-devel] [RFC PATCH v3 03/11] Add a script to extract VSS SDK headers on POSIX system Tomoki Sekiyama
2013-05-21 16:48 ` Eric Blake
2013-05-21 21:02 ` Tomoki Sekiyama
2013-05-24 13:14 ` Laszlo Ersek
2013-05-24 13:38 ` Laszlo Ersek
2013-05-24 15:59 ` Eric Blake
2013-05-24 18:27 ` Laszlo Ersek
2013-05-21 15:33 ` [Qemu-devel] [RFC PATCH v3 04/11] qemu-ga: Add an configure option to specify path to Windows VSS SDK Tomoki Sekiyama
2013-05-21 16:53 ` Eric Blake
2013-05-21 21:02 ` Tomoki Sekiyama
2013-05-24 13:48 ` Laszlo Ersek
2013-05-24 14:03 ` Laszlo Ersek
2013-05-21 15:33 ` [Qemu-devel] [RFC PATCH v3 05/11] qemu-ga: Add Windows VSS provider to quiesce applications on fsfreeze Tomoki Sekiyama
2013-05-23 12:22 ` Stefan Hajnoczi
2013-05-23 18:36 ` Tomoki Sekiyama
2013-05-24 8:54 ` Stefan Hajnoczi
2013-05-24 14:30 ` Tomoki Sekiyama
2013-05-28 21:01 ` Jeff Cody
2013-05-29 7:39 ` Stefan Hajnoczi
2013-05-31 2:15 ` Tomoki Sekiyama
2013-05-21 15:33 ` [Qemu-devel] [RFC PATCH v3 06/11] qemu-ga: Add Windows VSS requester to quisce applications and filesystems Tomoki Sekiyama
2013-05-21 16:56 ` Eric Blake
2013-05-21 21:02 ` Tomoki Sekiyama
2013-05-28 20:17 ` Jeff Cody
2013-05-31 5:06 ` Tomoki Sekiyama
2013-05-21 15:34 ` [Qemu-devel] [RFC PATCH v3 07/11] qemu-ga: call Windows VSS requester in fsfreeze command handler Tomoki Sekiyama
2013-05-21 15:34 ` [Qemu-devel] [RFC PATCH v3 08/11] qemu-ga: install Windows VSS provider on `qemu-ga -s install' Tomoki Sekiyama
2013-05-21 15:34 ` [Qemu-devel] [RFC PATCH v3 09/11] qemu-ga: Add VSS provider .tlb file in the repository Tomoki Sekiyama
2013-05-28 21:07 ` Jeff Cody
2013-05-21 15:34 ` [Qemu-devel] [RFC PATCH v3 10/11] QMP/qemu-ga-client: make timeout longer for guest-fsfreeze-freeze command Tomoki Sekiyama
2013-05-21 15:34 ` [Qemu-devel] [RFC PATCH v3 11/11] QMP/qmp.py: set locale for exceptions to display non-ascii messages correctly Tomoki Sekiyama
2013-05-23 12:30 ` Stefan Hajnoczi
2013-05-24 18:55 ` Tomoki Sekiyama
2013-05-27 12:06 ` Stefan Hajnoczi
2013-05-23 11:05 ` [Qemu-devel] [RFC PATCH v3 00/11] qemu-ga: fsfreeze on Windows using VSS Laszlo Ersek
2013-05-23 17:11 ` Tomoki Sekiyama
2013-05-23 12:15 ` Stefan Hajnoczi
2013-05-23 13:20 ` Paolo Bonzini
2013-05-23 13:28 ` Stefan Hajnoczi
2013-05-23 13:50 ` Paolo Bonzini
2013-05-24 8:59 ` Stefan Hajnoczi
2013-05-24 12:08 ` Paolo Bonzini
2013-05-24 9:20 ` Stefan Hajnoczi
2013-05-27 4:13 ` Libaiqing
2013-05-27 7:01 ` Tomoki Sekiyama
2013-05-27 10:00 ` Libaiqing
2013-05-31 1:30 ` Libaiqing
2013-05-31 2:20 ` Tomoki Sekiyama
2013-06-03 9:12 ` Libaiqing
2013-06-03 12:20 ` Luiz Capitulino
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=20130521153338.4880.75134.stgit@hds.com \
--to=tomoki.sekiyama@hds.com \
--cc=areis@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seiji.aguchi@hds.com \
--cc=vrozenfe@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).