Subversion Repositories Kolibri OS

Rev

Rev 6515 | Rev 6518 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6515 Rev 6517
Line 4... Line 4...
4
export STRIP = kos32-strip
4
export STRIP = kos32-strip
5
 
5
 
Line 6... Line 6...
6
export SDK_DIR:= $(abspath ../../../../sdk)
6
export SDK_DIR:= $(abspath ../../../../sdk)
Line -... Line 7...
-
 
7
 
-
 
8
double_type_size = 64
-
 
9
long_double_type_size = 96
-
 
10
decimal_float = yes
-
 
11
enable_decimal_float = bid
-
 
12
fixed_point = no
-
 
13
 
-
 
14
FPBIT = true
-
 
15
 
-
 
16
DPBIT = true
-
 
17
D32PBIT = 1
-
 
18
D64PBIT = 1
-
 
19
D128PBIT = 1
-
 
20
 
-
 
21
# List of functions not to build from libgcc2.c.
-
 
22
 
-
 
23
LIB2FUNCS_EXCLUDE =
-
 
24
 
7
 
25
 
8
CFLAGS_OPT+= -fomit-frame-pointer -fno-ident -mno-ms-bitfields
26
CFLAGS_OPT+= -fomit-frame-pointer -fno-ident -mno-ms-bitfields
Line 9... Line 27...
9
CFLAGS_OPT+= -fbuilding-libgcc -fno-stack-protector
27
CFLAGS_OPT+= -fbuilding-libgcc -fno-stack-protector
10
 
28
 
11
CFLAGS = -c -O2 -DIN_GCC -DIN_LIBGCC2 -DHAVE_CC_TLS -DUSE_EMUTLS -DENABLE_DECIMAL_BID_FORMAT
29
CFLAGS = -c -O2 -DIN_GCC -DIN_LIBGCC2 -DHAVE_CC_TLS -DUSE_EMUTLS -DENABLE_DECIMAL_BID_FORMAT
12
CFLAGS+= -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER
30
CFLAGS+= -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32 -U_MSC_VER
Line 13... Line 31...
13
CFLAGS+= -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
31
CFLAGS+= -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-
 
32
CFLAGS+= -Wmissing-prototypes -Wold-style-definition $(CFLAGS_OPT)
-
 
33
 
Line 14... Line 34...
14
CFLAGS+= -Wmissing-prototypes -Wold-style-definition $(CFLAGS_OPT)
34
INCLUDES = -I. -I../gcc -I../include
Line -... Line 35...
-
 
35
 
-
 
36
gcc_compile = $(CC) $(INCLUDES) $(CFLAGS)
-
 
37
 
-
 
38
objext = .o
-
 
39
 
-
 
40
FPBIT_FUNCS = _pack_sf _unpack_sf _addsub_sf _mul_sf _div_sf \
-
 
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
DPBIT_FUNCS = _pack_df _unpack_df _addsub_df _mul_df _div_df \
-
 
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
TPBIT_FUNCS = _pack_tf _unpack_tf _addsub_tf _mul_tf _div_tf \
15
 
51
	_fpcmp_parts_tf _compare_tf _eq_tf _ne_tf _gt_tf _ge_tf \
16
INCLUDES = -I../gcc -I../include
52
	_lt_tf _le_tf _unord_tf _si_to_tf _tf_to_si _negate_tf _make_tf \
17
 
53
	_tf_to_df _tf_to_sf _thenan_tf _tf_to_usi _usi_to_tf
18
objext = .o
54
 
19
 
55
 
20
lib2funcs =	_muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2	\
56
lib2funcs =	_muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2	\
21
		_clear_cache _trampoline __main _absvsi2 _absvdi2 _addvsi3	\
57
		_clear_cache _trampoline __main _absvsi2 _absvdi2 _addvsi3	\
22
		_addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2	\
58
		_addvdi3 _subvsi3 _subvdi3 _mulvsi3 _mulvdi3 _negvsi2 _negvdi2	\
Line 23... Line -...
23
		_ctors _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2	\
-
 
24
		_popcount_tab _popcountsi2 _popcountdi2 _paritysi2 _paritydi2	\
59
		_ctors _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2 _ctzsi2 _ctzdi2	\
Line 25... Line -...
25
		_powisf2 _powidf2 _powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3	\
-
 
26
		_multc3 _divsc3 _divdc3 _divxc3 _divtc3 _bswapsi2 _bswapdi2	\
60
		_popcount_tab _popcountsi2 _popcountdi2 _paritysi2 _paritydi2	\
27
		_clrsbsi2 _clrsbdi2
61
		_powisf2 _powidf2 _powixf2 _powitf2 _mulsc3 _muldc3 _mulxc3	\
28
 
62
		_multc3 _divsc3 _divdc3 _divxc3 _divtc3 _bswapsi2 _bswapdi2	\
29
 
63
		_clrsbsi2 _clrsbdi2
Line 30... Line 64...
30
swfloatfuncs = $(patsubst %,_fixuns%XX,sf df xf)
64
 
31
 
65
swfloatfuncs = $(patsubst %,_fixuns%XX,sf df xf)
Line 32... Line 66...
32
 
66
 
Line 33... Line 67...
33
dwfloatfuncs = $(patsubst %,_fix%XX,sf df xf tf) \
67
dwfloatfuncs = $(patsubst %,_fix%XX,sf df xf tf) \
-
 
68
		$(patsubst %,_fixuns%XX,sf df xf tf) \
Line 34... Line 69...
34
		$(patsubst %,_fixuns%XX,sf df xf tf) \
69
		$(patsubst %,_floatXX%,sf df xf tf) \
Line -... Line 70...
-
 
70
		$(patsubst %,_floatunXX%,sf df xf tf)
-
 
71
 
-
 
72
lib2funcs += $(subst XX,si,$(swfloatfuncs)) 
-
 
73
lib2funcs += $(subst XX,di,$(dwfloatfuncs))
-
 
74
 
-
 
75
lib2funcs-o = $(patsubst %,%$(objext),$(lib2funcs) $(LIB2FUNCS_ST))
-
 
76
 
-
 
77
$(lib2funcs-o): %$(objext): libgcc2.c
-
 
78
	$(gcc_compile) -DL$* -c $< -o $@
-
 
79
 
-
 
80
libgcc-objects =
-
 
81
 
-
 
82
ifeq ($(TPBIT),)
-
 
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
FPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(FPBIT_FUNCS))
-
 
89
DPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(DPBIT_FUNCS))
-
 
90
TPBIT_FUNCS := $(filter-out $(LIB2FUNCS_EXCLUDE),$(TPBIT_FUNCS))
-
 
91
 
-
 
92
fpbit-src := fp-bit.c
-
 
93
 
-
 
94
# Build FPBIT.
-
 
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
# Build DPBIT.
-
 
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
# Build TPBIT.
-
 
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
# Next build individual support functions.
-
 
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
D64PBIT_FUNCS = _addsub_dd _div_dd _mul_dd _plus_dd _minus_dd \
-
 
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
D128PBIT_FUNCS = _addsub_td _div_td _mul_td _plus_td _minus_td \
-
 
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
ifeq ($(enable_decimal_float),bid)
-
 
144
ifneq ($(D32PBIT),)
-
 
145
D32PBIT_FUNCS:=$(filter-out _plus_sd _minus_sd _conv_sd, $(D32PBIT_FUNCS))
-
 
146
endif
-
 
147
 
-
 
148
ifneq ($(D64PBIT),)
-
 
149
D64PBIT_FUNCS:=$(filter-out _plus_dd _minus_dd _conv_dd, $(D64PBIT_FUNCS))
-
 
150
endif
-
 
151
 
-
 
152
ifneq ($(D128PBIT),)
-
 
153
D128PBIT_FUNCS:=$(filter-out _plus_td _minus_td _conv_td, $(D128PBIT_FUNCS))
-
 
154
endif
-
 
155
endif
-
 
156
 
-
 
157
ifneq ($(D32PBIT),)
-
 
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
ifneq ($(D64PBIT),)
-
 
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)
Line -... Line 177...
-
 
177
endif
-
 
178
 
35
		$(patsubst %,_floatXX%,sf df xf tf) \
179
ifneq ($(D128PBIT),)
36
		$(patsubst %,_floatunXX%,sf df xf tf)
-
 
Line 37... Line 180...
37
 
180
d128pbit-o = $(patsubst %,%$(objext),$(D128PBIT_FUNCS))
38
lib2funcs += $(subst XX,si,$(swfloatfuncs)) 
181
ifeq ($(enable_decimal_float),bid)
39
lib2funcs += $(subst XX,di,$(dwfloatfuncs))
182
$(d128pbit-o): %$(objext): config/libbid/%.c
Line 40... Line 183...
40
 
183
else