https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99773
--- Comment #3 from Christophe Lyon <clyon at gcc dot gnu.org> ---
I tried changing TARGET_HARD_FLOAT_SUB in arm.h to:
#define TARGET_HARD_FLOAT_SUB (arm_float_abi != ARM_FLOAT_ABI_SOFT \
&& (bitmap_bit_p (arm_active_target.isa, \
isa_bit_vfpv2) \
|| bitmap_bit_p (arm_active_target.isa, \
isa_bit_mve)) \
&& TARGET_32BIT)
but that has other implications, like enabing VFP patterns: for instance
mulsf3_vfp becomes enabled, leading to a failure when builing libgcc (vmul.f32
is generated for powisf2, but rejected by the assembler)
So maybe we just change the condition to emit the attributes in arm_file_start?
Something like:
if (! TARGET_SOFT_FLOAT || TARGET_HAVE_MVE)
{
if ((TARGET_HARD_FLOAT && TARGET_VFP_SINGLE) || TARGET_HAVE_MVE)
arm_emit_eabi_attribute ("Tag_ABI_HardFP_use", 27, 1);
if (TARGET_HARD_FLOAT_ABI || TARGET_HAVE_MVE)
arm_emit_eabi_attribute ("Tag_ABI_VFP_args", 28, 1);
}
but that does not look very clean