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 <nik...@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