https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89093
--- Comment #44 from Bernd Edlinger <bernd.edlinger at hotmail dot de> --- Comment on attachment 46013 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46013 updated patch. @@ -122,12 +122,21 @@ extern tree arm_fp16_type_node; #define TARGET_32BIT_P(flags) (TARGET_ARM_P (flags) || TARGET_THUMB2_P (flags)) /* Run-time Target Specification. */ -/* Use hardware floating point instructions. */ +/* Use hardware floating point instructions. -mgeneral-regs-only prevents +the use of floating point instructions and registers but does not prevent +emission of floating point pcs attributes. */ #define TARGET_HARD_FLOAT (arm_float_abi != ARM_FLOAT_ABI_SOFT \ + && bitmap_bit_p (arm_active_target.isa, \ + isa_bit_vfpv2) \ + && TARGET_32BIT \ + && !TARGET_GENERAL_REGS_ONLY) + +#define TARGET_HARD_FLOAT_SUB (arm_float_abi != ARM_FLOAT_ABI_SOFT \ && bitmap_bit_p (arm_active_target.isa, \ isa_bit_vfpv2) \ && TARGET_32BIT) BTW, you could define TARGET_HARD_FLOAT in terms of TARGET_HARD_FLOAT_SUB and !TARGET_GENERAL_REGS_ONLY.