https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66849
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED CC| |ramana at gcc dot gnu.org Resolution|--- |INVALID --- Comment #2 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> --- (In reply to simon from comment #0) > Having configured with > > --target=arm-eabi > --with-arch=armv7 > --with-mode=thumb If you are interested in armv7-m, please use --with-arch=armv7-m firstly. > > (I added --with-mode=thumb after failures building newlib) > > arm-eabi-gcc -dumpspecs says > > *multilib: > . !marm !mthumb !mfloat-abi=hard;arm marm !mthumb !mfloat-abi=hard;thumb > !marm mthumb !mfloat-abi=hard;fpu !marm !mthumb mfloat-abi=hard;arm/fpu marm > !mthumb mfloat-abi=hard; > > or > > *multilib: > . !marm !mthumb !mfloat-abi=hard; > arm marm !mthumb !mfloat-abi=hard; > thumb !marm mthumb !mfloat-abi=hard; > fpu !marm !mthumb mfloat-abi=hard; > arm/fpu marm !mthumb mfloat-abi=hard; > > which says to use the fpu subdirectory only if the link is done with > neither -marm nor -mthumb; but the case of -mthumb -mfloat-abi=hard > isn't covered, so that the main directory is searched instead of the > fpu subdirectory; and for this set of options libgcc.a was built for > softfp, > > File: /opt/gcc-5.1.0/lib/gcc/arm-eabi/5.1.0/libgcc.a(emutls.o) > Attribute Section: aeabi > File Attributes > Tag_CPU_name: "7" > Tag_CPU_arch: v7 > Tag_THUMB_ISA_use: Thumb-2 > Tag_ABI_PCS_wchar_t: 4 > Tag_ABI_FP_denormal: Needed > Tag_ABI_FP_exceptions: Needed > Tag_ABI_FP_number_model: IEEE 754 > Tag_ABI_align_needed: 8-byte > Tag_ABI_align_preserved: 8-byte, except leaf SP > Tag_ABI_enum_size: small > Tag_ABI_optimization_goals: Aggressive Speed > Tag_CPU_unaligned_access: v6 > > as against the fpu version, > > File: /opt/gcc-5.1.0/lib/gcc/arm-eabi/5.1.0/fpu/libgcc.a(emutls.o) > Attribute Section: aeabi > File Attributes > Tag_CPU_name: "7" > Tag_CPU_arch: v7 > Tag_THUMB_ISA_use: Thumb-2 > Tag_FP_arch: VFPv2 > Tag_ABI_PCS_wchar_t: 4 > Tag_ABI_FP_denormal: Needed > Tag_ABI_FP_exceptions: Needed > Tag_ABI_FP_number_model: IEEE 754 > Tag_ABI_align_needed: 8-byte > Tag_ABI_align_preserved: 8-byte, except leaf SP > Tag_ABI_enum_size: small > Tag_ABI_VFP_args: VFP registers <<<<<<<<<<< > Tag_ABI_optimization_goals: Aggressive Speed > Tag_CPU_unaligned_access: v6 > > I made an overriding specs file, > > *multilib: > . !marm !mthumb !mfloat-abi=hard; > arm marm !mthumb !mfloat-abi=hard; > thumb !marm mthumb !mfloat-abi=hard; > fpu !marm mthumb mfloat-abi=hard; > fpu !marm !mthumb mfloat-abi=hard; > arm/fpu marm !mthumb mfloat-abi=hard; > > which appears to have done the trick. Next if you want separate multilibs for float-abi=hard you may want to look at some of the commented bits in t-arm to see how to do this or indeed into how --with-multilib-list=aprofile works. Alternatively I do think there's something with the M profile libs that can be used today but with some obvious munging to make this work on trunk. https://gcc.gnu.org/ml/gcc-patches/2013-07/msg01072.html Thanks, Ramana