This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: arm-elf float-abi defaults...
- From: Richard Earnshaw <Richard dot Earnshaw at buzzard dot freeserve dot co dot uk>
- To: DJ Delorie <dj at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, binutils at sourceware dot org
- Date: Sat, 15 May 2010 10:08:44 +0100
- Subject: Re: arm-elf float-abi defaults...
- References: <201005112140.o4BLeisb025230@greed.delorie.com>
On Tue, 2010-05-11 at 17:40 -0400, DJ Delorie wrote:
>
> I discovered that if you build a plain arm-elf toolchain, the default
> float-abis for gcc and gas don't match. I added this patch locally to
> make it "just work" but it seems to me it would be better to have the
> defaults match, although I'm not sure how to enforce that. Comments?
> Suggestions?
>
> Index: gcc/config/arm/elf.h
> ===================================================================
> RCS file: gcc/config/arm/elf.h,v
> --- gcc/config/arm/elf.h
> +++ gcc/config/arm/elf.h
> @@ -41,7 +41,13 @@
> #endif
>
> #ifndef SUBTARGET_EXTRA_ASM_SPEC
> -#define SUBTARGET_EXTRA_ASM_SPEC ""
> +#if TARGET_DEFAULT_FLOAT_ABI == ARM_FLOAT_ABI_SOFT
> +#define SUBTARGET_EXTRA_ASM_SPEC \
> + "%{!msoft-float:%{!mhard-float:%{!mfloat-abi=*:-mfloat-abi=soft}}}"
> +#else
> +#define SUBTARGET_EXTRA_ASM_SPEC \
> + "%{!msoft-float:%{!mhard-float:%{!mfloat-abi=*:-mfloat-abi=hard}}}"
> +#endif
> #endif
>
> #ifndef SUBTARGET_ASM_FLOAT_SPEC
>
Sorry for the delay replying, I've been travelling.
The above is probably technically correct, but it has one major problem,
IIRC: it breaks backwards compatibility with existing objects that are
incorrectly labelled by default -- ie probably most of them, for most
users. Also note that there is no way for a user to force the linker to
ignore this problem, so changing it would effectively force all old
object files to be re-compiled -- something that may well not be
possible.
Given that arm-elf is on the verge of being deprecated, I'm not
convinced this is a good idea.
R.