From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2659 invoked by alias); 13 Jan 2015 00:59:22 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 2640 invoked by uid 89); 13 Jan 2015 00:59:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f41.google.com Received: from mail-oi0-f41.google.com (HELO mail-oi0-f41.google.com) (209.85.218.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 13 Jan 2015 00:59:19 +0000 Received: by mail-oi0-f41.google.com with SMTP id i138so168450oig.0 for ; Mon, 12 Jan 2015 16:59:17 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.202.191.194 with SMTP id p185mr18318208oif.128.1421110757581; Mon, 12 Jan 2015 16:59:17 -0800 (PST) Received: by 10.76.185.7 with HTTP; Mon, 12 Jan 2015 16:59:17 -0800 (PST) In-Reply-To: References: Date: Tue, 13 Jan 2015 00:59:00 -0000 Message-ID: Subject: Re: libffi is broken for x32 From: "H.J. Lu" To: Anthony Green , GCC Patches , libffi-discuss@sourceware.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015/txt/msg00013.txt.bz2 On Mon, Jan 12, 2015 at 3:46 PM, H.J. Lu wrote: > On Mon, Jan 12, 2015 at 2:42 PM, H.J. Lu wrote: >> This libffi commit: >> >> 13e2d7b92557a9511a0414df82bf2df3edc55cba is the first bad commit >> commit 13e2d7b92557a9511a0414df82bf2df3edc55cba >> Author: Anthony Green >> Date: Thu Jan 10 10:52:02 2013 -0500 >> >> Handle both 32 and 64-bit x86 builds regardless of target triple >> >> breaks x32. >> > > This patch passed "make check" in libffi on x32. I am testing > it in GCC now. > > GCC is configured as x86_64-unknown-linux-gnu with x32 > enabled. libffi should set TARGET to X86_64 if __x86_64__ > is defined. It fixed GCC build. Anthony, can you apply it to libffi? Thanks. -- H.J.