From: Claudio Fontana <claudio.fontana@huawei.com>
To: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [RFC 1/4] configure: add c++ compiler support
Date: Wed, 11 Sep 2013 14:59:16 +0200 [thread overview]
Message-ID: <52306924.7080403@huawei.com> (raw)
In-Reply-To: <52306808.4030701@huawei.com>
This patch is similar to Tomoki Sekiyama's
[PATCH v9 01/10] configure: Support configuring C++ compile,
with the main differences being:
not using "c++" as default compiler, instead do not enable by default
(requires explicit CXX env, --cxx option or cross-compilation prefix)
separate CFLAGS and CXXFLAGS in the default way.
Signed-off-by: Claudio Fontana <claudio.fontana@linaro.org>
---
configure | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/configure b/configure
index 0a55c20..6b73d99 100755
--- a/configure
+++ b/configure
@@ -252,6 +252,8 @@ for opt do
;;
--cc=*) CC="$optarg"
;;
+ --cxx=*) CXX="$optarg"
+ ;;
--source-path=*) source_path="$optarg"
;;
--cpu=*) cpu="$optarg"
@@ -282,6 +284,12 @@ else
cc="${CC-${cross_prefix}gcc}"
fi
+if test -z "${CXX}${cross_prefix}"; then
+ cxx=""
+else
+ cxx="${CXX-${cross_prefix}g++}"
+fi
+
ar="${AR-${cross_prefix}ar}"
as="${AS-${cross_prefix}as}"
cpp="${CPP-$cc -E}"
@@ -305,6 +313,7 @@ QEMU_CFLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE $QEMU_CFLA
QEMU_INCLUDES="-I. -I\$(SRC_PATH) -I\$(SRC_PATH)/include"
if test "$debug_info" = "yes"; then
CFLAGS="-g $CFLAGS"
+ CXXFLAGS="-g $CXXFLAGS"
LDFLAGS="-g $LDFLAGS"
fi
@@ -622,6 +631,8 @@ for opt do
;;
--host-cc=*) host_cc="$optarg"
;;
+ --cxx=*)
+ ;;
--objcc=*) objcc="$optarg"
;;
--make=*) make="$optarg"
@@ -1023,6 +1034,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"
@@ -3553,6 +3565,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"
@@ -4140,6 +4153,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
@@ -4149,6 +4163,7 @@ echo "LD=$ld" >> $config_host_mak
echo "WINDRES=$windres" >> $config_host_mak
echo "LIBTOOL=$libtool" >> $config_host_mak
echo "CFLAGS=$CFLAGS" >> $config_host_mak
+echo "CXXFLAGS=$CXXFLAGS" >> $config_host_mak
echo "QEMU_CFLAGS=$QEMU_CFLAGS" >> $config_host_mak
echo "QEMU_INCLUDES=$QEMU_INCLUDES" >> $config_host_mak
if test "$sparse" = "yes" ; then
--
1.8.1
next prev parent reply other threads:[~2013-09-11 12:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-11 12:54 [Qemu-devel] [RFC 0/4] ARM aarch64 disas output libvixl support Claudio Fontana
2013-09-11 12:59 ` Claudio Fontana [this message]
2013-09-11 13:02 ` [Qemu-devel] [RFC 2/4] rules.mak: support C++ compiling and linking Claudio Fontana
2013-09-11 13:05 ` [Qemu-devel] [RFC 3/4] disas: add libvixl source code for aarch64 Claudio Fontana
2013-09-11 13:08 ` [Qemu-devel] [RFC 4/4] disas: implement host disassembly output " Claudio Fontana
2013-09-16 6:53 ` Andreas Färber
2013-09-16 10:43 ` Claudio Fontana
2013-09-11 13:14 ` [Qemu-devel] [RFC 0/4] ARM aarch64 disas output libvixl support Andreas Färber
2013-09-11 13:29 ` Peter Maydell
2013-09-11 13:37 ` Peter Maydell
2013-09-11 14:35 ` [Qemu-devel] [RFC 3/4] disas: add libvixl source code for aarch64 Claudio Fontana
2013-09-15 16:41 ` [Qemu-devel] [RFC 0/4] ARM aarch64 disas output libvixl support Rob Landley
2013-09-15 17:27 ` Peter Maydell
2013-09-15 20:04 ` Laurent Desnogues
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=52306924.7080403@huawei.com \
--to=claudio.fontana@huawei.com \
--cc=52306808.4030701@huawei.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.