From patchwork Tue Apr 25 08:35:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nikunj A. Dadhania" X-Patchwork-Id: 9697715 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 463B86020A for ; Tue, 25 Apr 2017 08:38:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1240220008 for ; Tue, 25 Apr 2017 08:38:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 064532858E; Tue, 25 Apr 2017 08:38:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C7293208C2 for ; Tue, 25 Apr 2017 08:38:41 +0000 (UTC) Received: from localhost ([::1]:47754 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2vzd-00040v-5K for patchwork-qemu-devel@patchwork.kernel.org; Tue, 25 Apr 2017 04:38:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d2vyf-0003yF-Jk for qemu-devel@nongnu.org; Tue, 25 Apr 2017 04:37:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d2vyc-0007kp-Cr for qemu-devel@nongnu.org; Tue, 25 Apr 2017 04:37:41 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:48022 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d2vyc-0007kl-7O for qemu-devel@nongnu.org; Tue, 25 Apr 2017 04:37:38 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v3P8XsmI046241 for ; Tue, 25 Apr 2017 04:37:37 -0400 Received: from e23smtp06.au.ibm.com (e23smtp06.au.ibm.com [202.81.31.148]) by mx0b-001b2d01.pphosted.com with ESMTP id 2a1v4rd8dg-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 25 Apr 2017 04:37:33 -0400 Received: from localhost by e23smtp06.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 25 Apr 2017 18:37:01 +1000 Received: from d23relay06.au.ibm.com (202.81.31.225) by e23smtp06.au.ibm.com (202.81.31.212) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 25 Apr 2017 18:36:58 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay06.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v3P8anwX20971732; Tue, 25 Apr 2017 18:36:57 +1000 Received: from d23av02.au.ibm.com (localhost [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id v3P8aJD6024794; Tue, 25 Apr 2017 18:36:20 +1000 Received: from abhimanyu.in.ibm.com ([9.109.223.193]) by d23av02.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id v3P8aHVL024271; Tue, 25 Apr 2017 18:36:18 +1000 From: Nikunj A Dadhania To: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, david@gibson.dropbear.id.au, rth@twiddle.net Date: Tue, 25 Apr 2017 14:05:55 +0530 X-Mailer: git-send-email 2.9.3 X-TM-AS-MML: disable x-cbid: 17042508-0040-0000-0000-0000030D20BC X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17042508-0041-0000-0000-00000C859327 Message-Id: <20170425083555.13547-1-nikunj@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-04-25_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1704250158 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 148.163.158.5 Subject: [Qemu-devel] [PATCH RFC] configure: fix clang failure for libatomic 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@linaro.org, alex.bennee@linaro.org, nikunj@linux.vnet.ibm.com, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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() {