From patchwork Fri Apr 1 12:26:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olaf Hering X-Patchwork-Id: 8723471 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 86ADC9F39A for ; Fri, 1 Apr 2016 12:40:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D3BAF20398 for ; Fri, 1 Apr 2016 12:40:31 +0000 (UTC) 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.kernel.org (Postfix) with ESMTPS id BDC2A20374 for ; Fri, 1 Apr 2016 12:40:30 +0000 (UTC) Received: from localhost ([::1]:44141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alyNJ-0005pK-Tk for patchwork-qemu-devel@patchwork.kernel.org; Fri, 01 Apr 2016 08:40:29 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47926) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alyN7-0005oZ-EU for qemu-devel@nongnu.org; Fri, 01 Apr 2016 08:40:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alyN3-0001gm-W6 for qemu-devel@nongnu.org; Fri, 01 Apr 2016 08:40:17 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::12]:26874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alyN3-0001g9-M9 for qemu-devel@nongnu.org; Fri, 01 Apr 2016 08:40:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1459514412; l=1549; s=domk; d=aepfle.de; h=Date:Subject:Cc:To:From; bh=1AwT5zm8rEfBHWj+eSoJIx85bKXOpVFYyoq/u5EAlFo=; b=EsEB9xnYhDCQjT8f14V0U31tKjyL36s0zO2Gs4zcNUXJnPvq228DYLnzjDcZuidxnoJ xa5iO38QR0e3kZSO6dPBrpMQnY2ZVXcPzq7S4PR+Tz3nMzYTz9/JcVLf4taFjEFdW9mn1 WYTtHdKTe+otre9DW8CHmh2YK7+eHtsFSoc= X-RZG-AUTH: :P2EQZWCpfu+qG7CngxMFH1J+yackYocTD1iAi8x+OWtqWFmrC5F/k8793bGG X-RZG-CLASS-ID: mo00 Received: from aepfle.de (aftr-185-17-204-53.dynamic.mnet-online.de [185.17.204.53]) by post.strato.de (RZmta 37.22 DYNA|AUTH) with ESMTPA id z019a1s31CQjuAC; Fri, 1 Apr 2016 14:26:45 +0200 (CEST) From: Olaf Hering To: qemu-devel@nongnu.org Date: Fri, 1 Apr 2016 14:26:36 +0200 Message-Id: <1459513596-4362-1-git-send-email-olaf@aepfle.de> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 2a01:238:20a:202:5300::12 Cc: Peter Maydell , Olaf Hering , Stefano Stabellini , Stefan Hajnoczi , Paolo Bonzini Subject: [Qemu-devel] [PATCH v2] build: link with libatomic on powerpc-linux X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Building on powerpc-linux fails with undefined reference to __atomic_load_8 in icount_warp_rt(). Force linking to -latomic. Fixes a0aa44b ("include/qemu/atomic.h: default to __atomic functions") Signed-off-by: Olaf Hering Cc: Paolo Bonzini Cc: "Daniel P. Berrange" Cc: Stefan Hajnoczi Cc: Peter Maydell Cc: Stefano Stabellini --- This was probably sent twice due to git send-email issues... configure | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/configure b/configure index 81caff6..ee935bb 100755 --- a/configure +++ b/configure @@ -4025,6 +4025,33 @@ if test "$usb_redir" != "no" ; then fi fi +if test "$cpu" = "ppc" && test "$targetos" = "Linux" ; then + # Do we need libm + cat > $TMPC << EOF + #include + #include + #include + int64_t val; + int main(int argc, char **argv) + { + val = (int64_t)read(0, NULL, 0); + if (atomic_read(&val) == -1) { + return 0; + } + return 1; + } +EOF + if compile_prog "-Iinclude" "" ; then + : + echo "No need to link with -latomic on powerpc-linux" + elif compile_prog "-Iinclude" "-latomic" ; then + echo "Link with -latomic on powerpc-linux" + libs_softmmu="$libs_softmmu -latomic" + else + error_exit "libatomic check failed" + fi +fi + ########################################## # check if we have VSS SDK headers for win