1# This file is used if not configured --with-avrlibc=no
2#
3# AVR-Libc comes with hand-optimized float routines.
4# For historical reasons, these routines live in AVR-Libc
5# and not in libgcc and use the same function names like libgcc.
6# To get the best support, i.e. always use the routines from
7# AVR-Libc, we remove these routines from libgcc.
8#
9# See also PR54461.
10#
11#
12# Arithmetic:
13#     __addsf3 __subsf3 __divsf3 __mulsf3 __negsf2
14#
15# Comparison:
16#     __cmpsf2 __unordsf2
17#     __eqsf2 __lesf2 __ltsf2 __nesf2 __gesf2 __gtsf2
18#
19# Conversion:
20#     __fixsfdi __fixunssfdi __floatdisf __floatundisf
21#     __fixsfsi __fixunssfsi __floatsisf __floatunsisf
22#
23#
24# These functions are contained in modules:
25#
26# _addsub_sf.o:   __addsf3  __subsf3
27# _mul_sf.o:      __mulsf3
28# _div_sf.o:      __divsf3
29# _negate_sf.o:   __negsf2
30#
31# _compare_sf.o:  __cmpsf2
32# _unord_sf.o:    __unordsf2
33# _eq_sf.o:       __eqsf2
34# _ne_sf.o:       __nesf2
35# _ge_sf.o:       __gesf2
36# _gt_sf.o:       __gtsf2
37# _le_sf.o:       __lesf2
38# _lt_sf.o:       __ltsf2
39#
40# _fixsfdi.o:     __fixsfdi
41# _fixunssfdi.o:  __fixunssfdi
42# _fixunssfsi.o:  __fixunssfsi
43# _floatdisf.o:   __floatdisf
44# _floatundisf.o: __floatundisf
45# _sf_to_si.o:    __fixsfsi
46# _si_to_sf.o:    __floatsisf
47# _usi_to_sf.o:   __floatunsisf
48
49
50# SFmode
51LIB2FUNCS_EXCLUDE += \
52          _addsub_sf \
53          _negate_sf \
54          _mul_sf _div_sf \
55          \
56          _compare_sf \
57          _unord_sf \
58          _eq_sf _ne_sf \
59          _gt_sf _ge_sf \
60          _lt_sf _le_sf \
61          \
62          _si_to_sf  _sf_to_si \
63          _usi_to_sf _sf_to_usi \
64          _fixunssfsi _fixsfdi \
65          _fixunssfdi \
66          _floatdisf _floatundisf
67
68ifeq (,$(WITH_LIBF7_MATH_SYMBOLS))
69
70# No modules depend on __SIZEOF_LONG_DOUBLE__ or __SIZEOF_DOUBLE__
71# which means we might have an opportunity to copy libgcc.a.
72# WITH_LIBF7_MATH_SYMBOLS is set by libf7/t-libf7-math-symbols.
73
74ifneq (,$(findstring avr,$(MULTISUBDIR)))
75
76# We are not in the avr2 (default) subdir, hence copying will work.
77# In default dir, copying won'twork because the default multilib is
78# built after all the others.
79
80ifneq (,$(findstring double,$(MULTISUBDIR)))
81
82# We are in double{32|64}/libgcc or long-double{32|64}/libgcc:
83# Just copy from the [long ]double=float multilib; we would remove any DFmode
84# bits from this multilib variant, anyway, because the current assumption
85# is that avr-libc hosts *all* the IEEE-double stuff.
86
87LIB2FUNCS_EXCLUDE := %
88LIB1ASMFUNCS :=
89libgcc-objects :=
90libgcov-objects :=
91objects :=
92
93t-copy-libgcc.dep: $(srcdir)/config/avr/t-copy-libgcc
94          -rm -f libgcc.a
95          -rm -f libgcov.a
96          cp $< $@
97
98libgcc.a libgcov.a libgcc_tm.h: t-copy-libgcc.dep
99
100Makefile: t-copy-libgcc.dep
101
102endif
103endif
104endif
105