8dc56a2244
Using -mno-fdiv gives linker errors unless we build the missing divide routines in libgcc always. There is at least one university project designing RISC-V parts without FP divide that wants to use the option. libgcc/ * config/riscv/t-softfp32 (softfp_extra): Add FP divide routines From-SVN: r277723
44 lines
939 B
Plaintext
44 lines
939 B
Plaintext
ABI_SINGLE:=$(findstring __riscv_float_abi_single,$(shell $(gcc_compile_bare) -dM -E - </dev/null))
|
|
ABI_DOUBLE:=$(findstring __riscv_float_abi_double,$(shell $(gcc_compile_bare) -dM -E - </dev/null))
|
|
ABI_QUAD:=$(findstring __riscv_float_abi_quad,$(shell $(gcc_compile_bare) -dM -E - </dev/null))
|
|
|
|
softfp_int_modes := si di
|
|
softfp_exclude_libgcc2 := n
|
|
|
|
ifndef ABI_QUAD
|
|
ifdef ABI_DOUBLE
|
|
|
|
softfp_float_modes := tf
|
|
softfp_extensions := sftf dftf
|
|
softfp_truncations := tfsf tfdf
|
|
|
|
# Enable divide routines to make -mno-fdiv work.
|
|
softfp_extras := divsf3 divdf3
|
|
|
|
else
|
|
# !ABI_DOUBLE
|
|
|
|
softfp_float_modes := df tf
|
|
softfp_extensions := sfdf sftf dftf
|
|
softfp_truncations := dfsf tfsf tfdf
|
|
|
|
ifndef ABI_SINGLE
|
|
softfp_float_modes += sf
|
|
else
|
|
# ABI_SINGLE
|
|
|
|
# Enable divide routines to make -mno-fdiv work.
|
|
softfp_extras := divsf3
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
else
|
|
# ABI_QUAD
|
|
|
|
# Enable divide routines to make -mno-fdiv work.
|
|
softfp_extras := divsf3 divdf3 divtf3
|
|
|
|
endif
|