Subversion Repositories Kolibri OS

Rev

Rev 6515 | Rev 6518 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6515 serge 1
 
2
export AR = kos32-ar
3
export LD = kos32-ld
4
export STRIP = kos32-strip
5
6
 
7
8
 
6517 serge 9
long_double_type_size = 96
10
decimal_float = yes
11
enable_decimal_float = bid
12
fixed_point = no
13
14
 
15
16
 
17
D32PBIT = 1
18
D64PBIT = 1
19
D128PBIT = 1
20
21
 
22
23
 
24
25
 
26
 
6515 serge 27
CFLAGS_OPT+= -fbuilding-libgcc -fno-stack-protector
28
29
 
30
CFLAGS+= -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER
31
CFLAGS+= -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
32
CFLAGS+= -Wmissing-prototypes -Wold-style-definition $(CFLAGS_OPT)
33
34
 
6517 serge 35
6515 serge 36
 
6517 serge 37
38
 
6515 serge 39
40
 
6517 serge 41
	_fpcmp_parts_sf _compare_sf _eq_sf _ne_sf _gt_sf _ge_sf \
42
	_lt_sf _le_sf _unord_sf _si_to_sf _sf_to_si _negate_sf _make_sf \
43
	_sf_to_df _sf_to_tf _thenan_sf _sf_to_usi _usi_to_sf
44
45
 
46
	_fpcmp_parts_df _compare_df _eq_df _ne_df _gt_df _ge_df \
47
	_lt_df _le_df _unord_df _si_to_df _df_to_si _negate_df _make_df \
48
	_df_to_sf _df_to_tf _thenan_df _df_to_usi _usi_to_df
49
50
 
51
	_fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf \
52
	_lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf \
53
	_tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf
54
55
 
56
 
6515 serge 57
		_clear_cache _trampoline __main _absvsi2 _absvdi2 _addvsi3	\
58
		_addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2	\
59
		_ctors _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2	\
60
		_popcount_tab _popcountsi2 _popcountdi2 _paritysi2 _paritydi2	\
61
		_powisf2 _powidf2 _powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3	\
62
		_multc3 _divsc3 _divdc3 _divxc3 _divtc3 _bswapsi2 _bswapdi2	\
63
		_clrsbsi2 _clrsbdi2
6517 serge 64
6515 serge 65
 
6517 serge 66
6515 serge 67
 
68
		$(patsubst %,_fixuns%XX,sf df xf tf) \
69
		$(patsubst %,_floatXX%,sf df xf tf) \
70
		$(patsubst %,_floatunXX%,sf df xf tf)
71
72
 
73
lib2funcs += $(subst XX,di,$(dwfloatfuncs))
74
75
 
6517 serge 76
77
 
78
	$(gcc_compile) -DL$* -c $< -o $@
79
80
 
81
82
 
83
# _sf_to_tf and _df_to_tf require tp-bit.c being compiled in.
84
FPBIT_FUNCS := $(filter-out _sf_to_tf,$(FPBIT_FUNCS))
85
DPBIT_FUNCS := $(filter-out _df_to_tf,$(DPBIT_FUNCS))
86
endif
87
88
 
89
DPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(DPBIT_FUNCS))
90
TPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(TPBIT_FUNCS))
91
92
 
93
94
 
95
ifneq ($(FPBIT),)
96
fpbit-o = $(patsubst %,%$(objext),$(FPBIT_FUNCS))
97
$(fpbit-o): %$(objext): $(fpbit-src)
98
	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DFLOAT $(FPBIT_CFLAGS) -c $< -o $@
99
libgcc-objects += $(fpbit-o)
100
endif
101
102
 
103
ifneq ($(DPBIT),)
104
dpbit-o = $(patsubst %,%$(objext),$(DPBIT_FUNCS))
105
$(dpbit-o): %$(objext): $(fpbit-src)
106
	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* $(DPBIT_CFLAGS) -c $< -o $@
107
libgcc-objects += $(dpbit-o)
108
endif
109
110
 
111
ifneq ($(TPBIT),)
112
tpbit-o = $(patsubst %,%$(objext),$(TPBIT_FUNCS))
113
$(tpbit-o): %$(objext): $(fpbit-src)
114
	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DTFLOAT $(TPBIT_CFLAGS) -c $< -o $@
115
libgcc-objects += $(tpbit-o)
116
endif
117
118
 
119
D32PBIT_FUNCS = _addsub_sd _div_sd _mul_sd _plus_sd _minus_sd \
120
	_eq_sd _ne_sd _lt_sd _gt_sd _le_sd _ge_sd \
121
	_sd_to_si _sd_to_di _sd_to_usi _sd_to_udi \
122
	_si_to_sd _di_to_sd _usi_to_sd _udi_to_sd \
123
	_sd_to_sf _sd_to_df _sd_to_xf _sd_to_tf \
124
	_sf_to_sd _df_to_sd _xf_to_sd _tf_to_sd \
125
	_sd_to_dd _sd_to_td _unord_sd _conv_sd
126
127
 
128
	_eq_dd _ne_dd _lt_dd _gt_dd _le_dd _ge_dd \
129
	_dd_to_si _dd_to_di _dd_to_usi _dd_to_udi \
130
	_si_to_dd _di_to_dd _usi_to_dd _udi_to_dd \
131
	_dd_to_sf _dd_to_df _dd_to_xf _dd_to_tf \
132
	_sf_to_dd _df_to_dd _xf_to_dd _tf_to_dd \
133
	_dd_to_sd _dd_to_td _unord_dd _conv_dd
134
135
 
136
	_eq_td _ne_td _lt_td _gt_td _le_td _ge_td \
137
	_td_to_si _td_to_di _td_to_usi _td_to_udi \
138
	_si_to_td _di_to_td _usi_to_td _udi_to_td \
139
	_td_to_sf _td_to_df _td_to_xf _td_to_tf \
140
	_sf_to_td _df_to_td _xf_to_td _tf_to_td \
141
	_td_to_sd _td_to_dd _unord_td _conv_td
142
143
 
144
ifneq ($(D32PBIT),)
145
D32PBIT_FUNCS:=$(filter-out _plus_sd _minus_sd _conv_sd, $(D32PBIT_FUNCS))
146
endif
147
148
 
149
D64PBIT_FUNCS:=$(filter-out _plus_dd _minus_dd _conv_dd, $(D64PBIT_FUNCS))
150
endif
151
152
 
153
D128PBIT_FUNCS:=$(filter-out _plus_td _minus_td _conv_td, $(D128PBIT_FUNCS))
154
endif
155
endif
156
157
 
158
d32pbit-o = $(patsubst %,%$(objext),$(D32PBIT_FUNCS))
159
ifeq ($(enable_decimal_float),bid)
160
$(d32pbit-o): %$(objext): config/libbid/%.c
161
else
162
$(d32pbit-o): %$(objext): $(srcdir)/dfp-bit.c
163
endif
164
	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DWIDTH=32 -c $< -o $@
165
libgcc-objects += $(d32pbit-o)
166
endif
167
168
 
169
d64pbit-o = $(patsubst %,%$(objext),$(D64PBIT_FUNCS))
170
ifeq ($(enable_decimal_float),bid)
171
$(d64pbit-o): %$(objext): config/libbid/%.c
172
else
173
$(d64pbit-o): %$(objext): $(srcdir)/dfp-bit.c
174
endif
175
	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DWIDTH=64 -c $<
176
libgcc-objects += $(d64pbit-o)
177
endif
178
179
 
180
d128pbit-o = $(patsubst %,%$(objext),$(D128PBIT_FUNCS))
181
ifeq ($(enable_decimal_float),bid)
182
$(d128pbit-o): %$(objext): config/libbid/%.c
183
else
184
$(d128pbit-o): %$(objext): $(srcdir)/dfp-bit.c
185
endif
186
	$(gcc_compile) -DFINE_GRAINED_LIBRARIES -DL$* -DWIDTH=128 -c $<
187
libgcc-objects += $(d128pbit-o)
188
endif
189
190
 
6515 serge 191
192
 
193
194
 
6517 serge 195
	$(AR) crs libgcc.a $(lib2funcs-o) $(libgcc-objects)
196
#	mv -f libbfd.a $(SDK_DIR)/lib
197
libgcc-objects>
6515 serge 198
 
199