From patchwork Mon Apr 2 21:06:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dann frazier X-Patchwork-Id: 150247 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 6062FB6F6E for ; Tue, 3 Apr 2012 07:07:13 +1000 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1334005634; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To:User-Agent: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=v0sc8kdzdfGSuPPz5eSd zcTB1uU=; b=OEpPetlnz4DWnLo7ZPtQpJLtfzooE27tL1if8A2ANGDi1FEAEbip aRFptq07Q9LUpEeOhdo2WpbljeJ1Gl2neYZ/iPcVlnO5K4p6U/EF7Yt6UH7lQRcT 25vfpmU5tpDhPXNOvCGkvRAa+vKgRXt7rQnsemaCa7XTlRPQg1FtDu0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=VIw2gvvv/JTgQzW6Lf9p2bAgJwUi/Pe4Hg9AXPiuhYya7U6bJKnv745mt0T5Ae +nK87QHIZq4AEMarqT71uoZnuyHxuXlN1zYgjxvQGLQ1gHQ4BgBqoDAkygw1Eiii t0xTLr9lNp2+QBsk/lfsCnVaGjZ46IQ2XBho7YCb+tzsE=; Received: (qmail 20547 invoked by alias); 2 Apr 2012 21:07:09 -0000 Received: (qmail 20537 invoked by uid 22791); 2 Apr 2012 21:07:08 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from complete.lackof.org (HELO complete.lackof.org) (198.49.126.79) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 02 Apr 2012 21:06:54 +0000 Received: from fluid.dannf (localhost [127.0.0.1]) by complete.lackof.org (Postfix) with ESMTP id CAD7033E0106; Mon, 2 Apr 2012 15:06:53 -0600 (MDT) Received: by fluid.dannf (Postfix, from userid 1000) id 62A1CA0599; Mon, 2 Apr 2012 15:06:53 -0600 (MDT) Date: Mon, 2 Apr 2012 15:06:53 -0600 From: dann frazier To: Richard Earnshaw Cc: "gcc-patches@gcc.gnu.org" , "cross-distro@lists.linaro.org" Subject: Re: [PATCH] ARM: Use different linker path for hardfloat ABI Message-ID: <20120402210653.GC28152@dannf.org> References: <20120329193401.GA14860@dannf.org> <4F75F2E2.3030909@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4F75F2E2.3030909@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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 On Fri, Mar 30, 2012 at 06:52:34PM +0100, Richard Earnshaw wrote: > On 29/03/12 20:34, dann frazier wrote: > > This is an updated version of a patch Debian and Ubuntu are using to > > use an alternate linker path for hardfloat binaries. The difference > > with this one is that it covers the case where no float flag > > was passed in, defaulting to the softfloat path. > > > > 2012-03-29 dann frazier > > > > * config/arm/linux-elf.h: Use alternate linker path > > for hardfloat ABI > > > > Index: gcc/config/arm/linux-elf.h > > =================================================================== > > --- gcc/config/arm/linux-elf.h (revision 185708) > > +++ gcc/config/arm/linux-elf.h (working copy) > > @@ -59,14 +59,21 @@ > > > > #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" > > > > -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" > > +#define LINUX_DYNAMIC_LINKER_SF "/lib/ld-linux.so.3" > > +#define LINUX_DYNAMIC_LINKER_HF "/lib/arm-linux-gnueabihf/ld-linux.so.3" > > > > #define LINUX_TARGET_LINK_SPEC "%{h*} \ > > %{static:-Bstatic} \ > > %{shared:-shared} \ > > %{symbolic:-Bsymbolic} \ > > %{rdynamic:-export-dynamic} \ > > - -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \ > > + %{msoft-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "} \ > > + %{mfloat-abi=soft*:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "} \ > > + %{mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \ > > + %{mfloat-abi=hard:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \ > > + %{!mfloat-abi: \ > > + %{!msoft-float: \ > > + %{!mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_SF "}}} \ > > -X \ > > %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ > > SUBTARGET_EXTRA_LINK_SPEC > > > > Looks to me as though this will break the old Linux ABI. While we've > marked that as deprecated, it hasn't been removed as yet. So I think > this patch either needs to wait until that removal has taken place, or > provide the relevant updates to maintain the old ABI support. Thanks for your review. You're right, this does appear to break the old ABI - that was a misunderstanding on my part. I think this fixes the problem: Index: gcc/config/arm/linux-elf.h =================================================================== --- gcc/config/arm/linux-elf.h (revision 185708) +++ gcc/config/arm/linux-elf.h (working copy) @@ -60,13 +60,17 @@ #define LIBGCC_SPEC "%{mfloat-abi=soft*:-lfloat} -lgcc" #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" +#define LINUX_DYNAMIC_LINKER_HF "/lib/arm-linux-gnueabihf/ld-linux.so.3" #define LINUX_TARGET_LINK_SPEC "%{h*} \ %{static:-Bstatic} \ %{shared:-shared} \ %{symbolic:-Bsymbolic} \ %{rdynamic:-export-dynamic} \ - -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \ + %{mhard-float:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \ + %{mfloat-abi=hard:-dynamic-linker " LINUX_DYNAMIC_LINKER_HF "} \ + %{!mfloat-abi: \ + %{!mhard-float:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ -X \ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \ SUBTARGET_EXTRA_LINK_SPEC