From patchwork Tue Oct 12 13:00:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 67571 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3AED4B6F10 for ; Wed, 13 Oct 2010 00:34:30 +1100 (EST) Received: from localhost ([127.0.0.1]:40715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5ezr-0000RD-7Q for incoming@patchwork.ozlabs.org; Tue, 12 Oct 2010 09:34:27 -0400 Received: from [140.186.70.92] (port=41007 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P5eTz-0007ZJ-Iy for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:01:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P5eTu-0004aL-4i for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:01:31 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:60844) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P5eTu-0004WW-2C for qemu-devel@nongnu.org; Tue, 12 Oct 2010 09:01:26 -0400 Received: by mail-qy0-f180.google.com with SMTP id 1so4942468qyk.4 for ; Tue, 12 Oct 2010 06:01:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject:date :message-id:x-mailer:in-reply-to:references; bh=NcTlAkIWs5LEyC+47DVrB4GG4EDqz0cWJrC8AwSctQ4=; b=VHHFP7A7zDYmrzuW7qRPGcDJg42Ap67Rt+l0BJGwK2GQ9UBWNlVkFfjRE14aSQBM7a 9foKX3iokkxSu1ceqknLDiERl2SV+fSvEf5lBO0UDm6dg4+2JPtYU3HFKHlX9fuQ568E Q3M36UT8lIDqvgyhRKSEQOxFk0hrFIw1AiB1E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; b=xlIx62ds75nF7GQB2L/CGY2z2W24p3QTPLi7evA87vv9cKzZBE6HZO8IiUlpkyR+Qi hzMLCk/CZUhZkuxSPaI+uJYAbH2U0Bn3HB44AmCnfKlKCOd28u/Dww7QhKCx/yZwD0Zj uvlw0oDpUusOcpCtigM5rbXWE00RRrCutre9Q= Received: by 10.224.96.40 with SMTP id f40mr5627199qan.309.1286888481913; Tue, 12 Oct 2010 06:01:21 -0700 (PDT) Received: from localhost.localdomain (nat-pool-brq-t.redhat.com [209.132.186.34]) by mx.google.com with ESMTPS id s34sm5931078qcp.20.2010.10.12.06.01.20 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 12 Oct 2010 06:01:21 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 12 Oct 2010 15:00:26 +0200 Message-Id: <1286888457-5033-9-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> References: <1286888457-5033-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [Qemu-devel] [PATCH 08/39] provide portable sizeof(long) test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Do not hardcode the list of 64-bit CPUs. Signed-off-by: Paolo Bonzini --- configure | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure b/configure index cb76177..873e4a6 100755 --- a/configure +++ b/configure @@ -1088,12 +1088,14 @@ esac fi # host long bits test -hostlongbits="32" -case "$cpu" in - x86_64|alpha|ia64|sparc64|ppc64|s390x) - hostlongbits=64 - ;; -esac +cat > $TMPC << EOF +int sizeof_long_is_8[sizeof(long) == 8 ? 1 : -1]; +EOF +if compile_object; then +hostlongbits=64 +else +hostlongbits=32 +fi ##########################################