From: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
david@gibson.dropbear.id.au, rth@twiddle.net
Cc: alex.bennee@linaro.org, nikunj@linux.vnet.ibm.com,
peter.maydell@linaro.org, pbonzini@redhat.com
Subject: [Qemu-devel] [PATCH RFC] configure: fix clang failure for libatomic
Date: Tue, 25 Apr 2017 14:05:55 +0530 [thread overview]
Message-ID: <20170425083555.13547-1-nikunj@linux.vnet.ibm.com> (raw)
Travis builds failure was reported for powernv boot-serial test with
qemu built with clang.
Debugging revealed that CONFIG_ATOMIC64 wasnt getting set for the clang
build because of that atomic operations weren't being used and was
resulting in MTTCG failure in the powernv boot-serial test.
libatomic is required to successfully test atomic64 and atomic128 for
clang. Introduced newer checks for the same. And on failure default to
single threaded tcg support in PPC64.
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
---
Reference:
https://lists.gnu.org/archive/html/qemu-ppc/2017-04/msg00277.html
---
configure | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/configure b/configure
index d31a3e8..1e5f7af 100755
--- a/configure
+++ b/configure
@@ -4598,6 +4598,9 @@ int main(void)
EOF
if compile_prog "" "" ; then
atomic128=yes
+ elif compile_prog "" "-latomic" ; then
+ atomic128=yes
+ lib_atomic="-latomic"
fi
fi
@@ -4628,6 +4631,9 @@ int main(void)
EOF
if compile_prog "" "" ; then
atomic64=yes
+elif compile_prog "" "-latomic" ; then
+ atomic64=yes
+ lib_atomic="-latomic"
fi
########################################
@@ -6065,6 +6071,16 @@ if [ "$TARGET_BASE_ARCH" = "" ]; then
TARGET_BASE_ARCH=$TARGET_ARCH
fi
+if test $atomic64 == "yes" || test $atomic128 == "yes" ; then
+ libs_softmmu="$lib_atomic $libs_softmmu"
+elif test $mttcg == "yes" && test $TARGET_BASE_ARCH == "ppc"; then
+ echo
+ echo "Note: Atomic library (-latomic) not available, falling"
+ echo " back to single threaded mode by default"
+ echo
+ mttcg=no
+fi
+
symlink "$source_path/Makefile.target" "$target_dir/Makefile"
upper() {
--
2.9.3
next reply other threads:[~2017-04-25 8:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-25 8:35 Nikunj A Dadhania [this message]
2017-04-25 8:42 ` [Qemu-devel] [PATCH RFC] configure: fix clang failure for libatomic Peter Maydell
2017-04-25 8:58 ` Nikunj A Dadhania
2017-04-25 9:04 ` Peter Maydell
2017-04-25 9:16 ` Nikunj A Dadhania
2017-04-25 9:32 ` Peter Maydell
2017-04-25 9:41 ` Richard Henderson
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=20170425083555.13547-1-nikunj@linux.vnet.ibm.com \
--to=nikunj@linux.vnet.ibm.com \
--cc=alex.bennee@linaro.org \
--cc=david@gibson.dropbear.id.au \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/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).