On 9/19/19 7:44 PM, Sandra Loosemore wrote:
On 9/19/19 2:40 AM, Kyrill Tkachov wrote:
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp (revision 275699)
+++ gcc/testsuite/lib/target-supports.exp (working copy)
@@ -6670,6 +6670,9 @@ proc add_options_for_sqrt_insn { flags }
if { [istarget amdgcn*-*-*] } {
return "$flags -ffast-math"
}
+ if { [istarget arm*-*-*] } {
+ return "$flags -mfpu=vfp -mfloat-abi=softfp"
+ }
return $flags
}
I tend to think it's a bit cleaner to use one of the
add_options_for_* helpers we have that know the right float-abi and
mfpu options to pass.
Would using add_options_for_arm_fp or add_options_for_arm_vfp3 work
here?
add_options_for_arm_fp only adds a -mfloat-abi option which isn't
sufficient by itself to enable floating-point on the default multilib
for arm-none-eabi. It needs -mfpu= too.
My understanding is that all VFP fpus have support for sqrt so why
require vfp3?
I could put the magic options in a new function called
add_options_for_arm_vfp instead of directly in
add_options_for_sqrt_insn, and fix it up to cope with -mfloat-abi=hard
multilibs too. Would that be an improvement?
Yeah, an add_options_for_arm_vfp is what we ideally need here.
Thanks,
Kyrill
-Sandra