From patchwork Fri Aug 6 04:55:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony Green X-Patchwork-Id: 61064 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 407081007D1 for ; Fri, 6 Aug 2010 14:55:43 +1000 (EST) Received: (qmail 16985 invoked by alias); 6 Aug 2010 04:55:41 -0000 Received: (qmail 16976 invoked by uid 22791); 6 Aug 2010 04:55:40 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, TW_BF, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Aug 2010 04:55:36 +0000 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o764tZM6030436 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 6 Aug 2010 00:55:35 -0400 Received: from gmachine.redhat.com (vpn-10-81.rdu.redhat.com [10.11.10.81]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o764tXA5030852; Fri, 6 Aug 2010 00:55:34 -0400 From: Anthony Green To: gcc-patches@gcc.gnu.org Subject: [patch, libffi] Build with sun studio compiler User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-URL: http://www.redhat.com Date: Fri, 06 Aug 2010 00:55:33 -0400 Message-ID: MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org I'm checking in the following libffi patch. This patch from Oliver Kiddle lets us build libffi with the sun studio compiler. Obviously this is a non-goal for GCC, but I'm checking it in from upstream. 2010-01-15 Oliver Kiddle * src/x86/ffitarget.h (ffi_abi): Check for __i386 and __amd64 for Sun Studio compiler compatibility. Index: libffi/src/x86/ffitarget.h =================================================================== --- libffi.orig/src/x86/ffitarget.h +++ libffi/src/x86/ffitarget.h @@ -1,5 +1,5 @@ /* -----------------------------------------------------------------*-C-*- - ffitarget.h - Copyright (c) 1996-2003 Red Hat, Inc. + ffitarget.h - Copyright (c) 1996-2003, 2010 Red Hat, Inc. Copyright (C) 2008 Free Software Foundation, Inc. Target configuration macros for x86 and x86-64. @@ -74,10 +74,10 @@ typedef enum ffi_abi { #else /* ---- Intel x86 and AMD x86-64 - */ -#if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__)) +#if !defined(X86_WIN32) && (defined(__i386__) || defined(__x86_64__) || defined(__i386) || defined(__amd64)) FFI_SYSV, FFI_UNIX64, /* Unix variants all use the same ABI for x86-64 */ -#ifdef __i386__ +#if defined(__i386__) || defined(__i386) FFI_DEFAULT_ABI = FFI_SYSV, #else FFI_DEFAULT_ABI = FFI_UNIX64,