This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

arm-elf float-abi defaults...


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]