From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2622 invoked by alias); 23 Apr 2012 15:37:10 -0000 Received: (qmail 2554 invoked by uid 22791); 23 Apr 2012 15:37:08 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Apr 2012 15:36:54 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 23 Apr 2012 16:36:21 +0100 Received: from [10.1.69.67] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 23 Apr 2012 16:37:19 +0100 Message-ID: <4F9576DE.9070608@arm.com> Date: Mon, 23 Apr 2012 15:37:00 -0000 From: Richard Earnshaw User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Michael Hope CC: GCC Patches , "cross-distro@lists.linaro.org" , "libc-ports@sourceware.org" Subject: Re: [PATCH v2] ARM: Use different linker path for hardfloat ABI References: In-Reply-To: X-MC-Unique: 112042316362102501 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00145.txt.bz2 On 22/04/12 23:20, Michael Hope wrote: > Change the dynamic linker path for ARM hard float executables. > Matches the path discussed and agreed on last week[1]. Carlos will > follow up with the matching patch to GLIBC[2]. I'm happy to if he's > busy. >=20 > OK for trunk? >=20 > -- Michael > [1] http://sourceware.org/ml/libc-ports/2012-04/msg00060.html > [2] http://sourceware.org/ml/libc-ports/2012-04/msg00064.html >=20 > 2012-04-23 Michael Hope >=20 > * config/arm/linux-eabi.h (GLIBC_DYNAMIC_LINKER_HARD_FLOAT): Define. > (GLIBC_DYNAMIC_LINKER_SOFT_FLOAT): Define. > (GLIBC_DYNAMIC_LINKER): Redefine to use the hard float path. >=20 > diff --git a/gcc/config/arm/linux-eabi.h b/gcc/config/arm/linux-eabi.h > index 80bd825..3ddf812 100644 > --- a/gcc/config/arm/linux-eabi.h > +++ b/gcc/config/arm/linux-eabi.h > @@ -62,7 +62,11 @@ > /* Use ld-linux.so.3 so that it will be possible to run "classic" > GNU/Linux binaries on an EABI system. */ > #undef GLIBC_DYNAMIC_LINKER > -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" > +#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" > +#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" > +#define GLIBC_DYNAMIC_LINKER \ > + "%{mfloat-abi=3Dhard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \ > + %{!mfloat-abi=3Dhard:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "}" >=20 > /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to > use the GNU/Linux version, not the generic BPABI version. */ >=20 I think this should handle having the hard-float variant as the default more gracefully, so something like: -#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.3" +#define GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "/lib/ld-linux.so.3" +#define GLIBC_DYNAMIC_LINKER_HARD_FLOAT "/lib/ld-linux-armhf.so.3" +#if TARGET_DEFAULT_FLOAT_ABI =3D=3D ARM_FLOAT_ABI_HARD +#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_HARD_FLOAT +#else +#define GLIBC_DYNAMIC_LINKER_DEFAULT GLIBC_DYNAMIC_LINKER_SOFT_FLOAT +#endif +#define GLIBC_DYNAMIC_LINKER \ + "%{mfloat-abi=3Dhard:" GLIBC_DYNAMIC_LINKER_HARD_FLOAT "} \ + %{mfloat-abi=3Dsoft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ + %{!mfloat-abi=3D*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" But I haven't tested any of that. R.