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.