diff options
author | Armin Kuster <akuster808@gmail.com> | 2017-10-26 13:48:50 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2018-03-01 16:10:36 -0800 |
commit | c96dd1c721a051c1a9b9e05190a5a0518b96ee29 (patch) | |
tree | 36b3bfd5c343c7424f84d8fd9e860702cd3ac477 /meta-oe/recipes-test/testfloat | |
parent | a53cb5a94488b62ed919bac17e1509c18b329d16 (diff) | |
download | meta-openembedded-c96dd1c721a051c1a9b9e05190a5a0518b96ee29.tar.gz |
testfloat: move to recipe-tests
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-test/testfloat')
3 files changed, 779 insertions, 0 deletions
diff --git a/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch b/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch new file mode 100644 index 000000000..71782c5b9 --- /dev/null +++ b/meta-oe/recipes-test/testfloat/files/0001-Makefile-for-cross-compile-SoftFloat.patch | |||
@@ -0,0 +1,348 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | From 07f2528d93f44fe1d8080a4225f29f4ada9f4663 Mon Sep 17 00:00:00 2001 | ||
4 | From: Fabio Berton <fabio.berton@ossystems.com.br> | ||
5 | Date: Thu, 4 Feb 2016 09:15:37 -0200 | ||
6 | Subject: [PATCH 1/2] Makefile for cross compile SoftFloat | ||
7 | |||
8 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
9 | --- | ||
10 | SoftFloat-3a/build/Linux-Cross-Compile/Makefile | 274 ++++++++++++++++++++++ | ||
11 | SoftFloat-3a/build/Linux-Cross-Compile/platform.h | 44 ++++ | ||
12 | 2 files changed, 318 insertions(+) | ||
13 | create mode 100644 SoftFloat-3a/build/Linux-Cross-Compile/Makefile | ||
14 | create mode 100644 SoftFloat-3a/build/Linux-Cross-Compile/platform.h | ||
15 | |||
16 | diff --git a/SoftFloat-3a/build/Linux-Cross-Compile/Makefile b/SoftFloat-3a/build/Linux-Cross-Compile/Makefile | ||
17 | new file mode 100644 | ||
18 | index 0000000..c4d0a60 | ||
19 | --- /dev/null | ||
20 | +++ b/SoftFloat-3a/build/Linux-Cross-Compile/Makefile | ||
21 | @@ -0,0 +1,274 @@ | ||
22 | + | ||
23 | +#============================================================================= | ||
24 | +# | ||
25 | +# This Makefile is part of the SoftFloat IEEE Floating-Point Arithmetic | ||
26 | +# Package, Release 3a, by John R. Hauser. | ||
27 | +# | ||
28 | +# Copyright 2011, 2012, 2013, 2014 The Regents of the University of | ||
29 | +# California. All rights reserved. | ||
30 | +# | ||
31 | +# Redistribution and use in source and binary forms, with or without | ||
32 | +# modification, are permitted provided that the following conditions are met: | ||
33 | +# | ||
34 | +# 1. Redistributions of source code must retain the above copyright notice, | ||
35 | +# this list of conditions, and the following disclaimer. | ||
36 | +# | ||
37 | +# 2. Redistributions in binary form must reproduce the above copyright | ||
38 | +# notice, this list of conditions, and the following disclaimer in the | ||
39 | +# documentation and/or other materials provided with the distribution. | ||
40 | +# | ||
41 | +# 3. Neither the name of the University nor the names of its contributors | ||
42 | +# may be used to endorse or promote products derived from this software | ||
43 | +# without specific prior written permission. | ||
44 | +# | ||
45 | +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY | ||
46 | +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
47 | +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE | ||
48 | +# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY | ||
49 | +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
50 | +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
51 | +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
52 | +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
53 | +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
54 | +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
55 | +# | ||
56 | +#============================================================================= | ||
57 | + | ||
58 | +SOURCE_DIR = ../../source | ||
59 | +SPECIALIZE_TYPE = 8086 | ||
60 | + | ||
61 | +SOFTFLOAT_OPTS = -DINLINE_LEVEL=5 -DSOFTFLOAT_FAST_DIV64TO32 -fgnu89-inline | ||
62 | + | ||
63 | +DELETE = rm -f | ||
64 | +C_INCLUDES = -I. -I$(SOURCE_DIR)/$(SPECIALIZE_TYPE) -I$(SOURCE_DIR)/include | ||
65 | +COMPILE_C = \ | ||
66 | + ${CC} -c -Werror-implicit-function-declaration $(SOFTFLOAT_OPTS) \ | ||
67 | + $(C_INCLUDES) -O2 -o $@ | ||
68 | +MAKELIB = ${AR} crs $@ | ||
69 | + | ||
70 | +OBJ = .o | ||
71 | +LIB = .a | ||
72 | + | ||
73 | +.PHONY: all | ||
74 | +all: softfloat$(LIB) | ||
75 | + | ||
76 | +OBJS_PRIMITIVES = \ | ||
77 | + s_compare96M$(OBJ) \ | ||
78 | + s_compare128M$(OBJ) \ | ||
79 | + s_shortShiftLeft64To96M$(OBJ) \ | ||
80 | + s_shortShiftLeftM$(OBJ) \ | ||
81 | + s_shiftLeftM$(OBJ) \ | ||
82 | + s_shortShiftRightM$(OBJ) \ | ||
83 | + s_shortShiftRightJam64$(OBJ) \ | ||
84 | + s_shortShiftRightJamM$(OBJ) \ | ||
85 | + s_shiftRightJam32$(OBJ) \ | ||
86 | + s_shiftRightJam64$(OBJ) \ | ||
87 | + s_shiftRightJamM$(OBJ) \ | ||
88 | + s_shiftRightM$(OBJ) \ | ||
89 | + s_countLeadingZeros8$(OBJ) \ | ||
90 | + s_countLeadingZeros32$(OBJ) \ | ||
91 | + s_countLeadingZeros64$(OBJ) \ | ||
92 | + s_addM$(OBJ) \ | ||
93 | + s_addCarryM$(OBJ) \ | ||
94 | + s_addComplCarryM$(OBJ) \ | ||
95 | + s_negXM$(OBJ) \ | ||
96 | + s_sub1XM$(OBJ) \ | ||
97 | + s_subM$(OBJ) \ | ||
98 | + s_mul64To128M$(OBJ) \ | ||
99 | + s_mul128MTo256M$(OBJ) \ | ||
100 | + s_approxRecip32_1$(OBJ) \ | ||
101 | + s_approxRecipSqrt32_1$(OBJ) \ | ||
102 | + s_remStepMBy32$(OBJ) \ | ||
103 | + | ||
104 | +OBJS_SPECIALIZE = \ | ||
105 | + softfloat_raiseFlags$(OBJ) \ | ||
106 | + s_f32UIToCommonNaN$(OBJ) \ | ||
107 | + s_commonNaNToF32UI$(OBJ) \ | ||
108 | + s_propagateNaNF32UI$(OBJ) \ | ||
109 | + s_f64UIToCommonNaN$(OBJ) \ | ||
110 | + s_commonNaNToF64UI$(OBJ) \ | ||
111 | + s_propagateNaNF64UI$(OBJ) \ | ||
112 | + extF80M_isSignalingNaN$(OBJ) \ | ||
113 | + s_extF80MToCommonNaN$(OBJ) \ | ||
114 | + s_commonNaNToExtF80M$(OBJ) \ | ||
115 | + s_propagateNaNExtF80M$(OBJ) \ | ||
116 | + f128M_isSignalingNaN$(OBJ) \ | ||
117 | + s_f128MToCommonNaN$(OBJ) \ | ||
118 | + s_commonNaNToF128M$(OBJ) \ | ||
119 | + s_propagateNaNF128M$(OBJ) \ | ||
120 | + | ||
121 | +OBJS_OTHERS = \ | ||
122 | + s_roundPackToUI32$(OBJ) \ | ||
123 | + s_roundPackMToUI64$(OBJ) \ | ||
124 | + s_roundPackToI32$(OBJ) \ | ||
125 | + s_roundPackMToI64$(OBJ) \ | ||
126 | + s_normSubnormalF32Sig$(OBJ) \ | ||
127 | + s_roundPackToF32$(OBJ) \ | ||
128 | + s_normRoundPackToF32$(OBJ) \ | ||
129 | + s_addMagsF32$(OBJ) \ | ||
130 | + s_subMagsF32$(OBJ) \ | ||
131 | + s_mulAddF32$(OBJ) \ | ||
132 | + s_normSubnormalF64Sig$(OBJ) \ | ||
133 | + s_roundPackToF64$(OBJ) \ | ||
134 | + s_normRoundPackToF64$(OBJ) \ | ||
135 | + s_addMagsF64$(OBJ) \ | ||
136 | + s_subMagsF64$(OBJ) \ | ||
137 | + s_mulAddF64$(OBJ) \ | ||
138 | + s_tryPropagateNaNExtF80M$(OBJ) \ | ||
139 | + s_invalidExtF80M$(OBJ) \ | ||
140 | + s_normExtF80SigM$(OBJ) \ | ||
141 | + s_roundPackMToExtF80M$(OBJ) \ | ||
142 | + s_normRoundPackMToExtF80M$(OBJ) \ | ||
143 | + s_addExtF80M$(OBJ) \ | ||
144 | + s_compareNonnormExtF80M$(OBJ) \ | ||
145 | + s_isNaNF128M$(OBJ) \ | ||
146 | + s_tryPropagateNaNF128M$(OBJ) \ | ||
147 | + s_invalidF128M$(OBJ) \ | ||
148 | + s_shiftNormSigF128M$(OBJ) \ | ||
149 | + s_roundPackMToF128M$(OBJ) \ | ||
150 | + s_normRoundPackMToF128M$(OBJ) \ | ||
151 | + s_addF128M$(OBJ) \ | ||
152 | + s_mulAddF128M$(OBJ) \ | ||
153 | + softfloat_state$(OBJ) \ | ||
154 | + ui32_to_f32$(OBJ) \ | ||
155 | + ui32_to_f64$(OBJ) \ | ||
156 | + ui32_to_extF80M$(OBJ) \ | ||
157 | + ui32_to_f128M$(OBJ) \ | ||
158 | + ui64_to_f32$(OBJ) \ | ||
159 | + ui64_to_f64$(OBJ) \ | ||
160 | + ui64_to_extF80M$(OBJ) \ | ||
161 | + ui64_to_f128M$(OBJ) \ | ||
162 | + i32_to_f32$(OBJ) \ | ||
163 | + i32_to_f64$(OBJ) \ | ||
164 | + i32_to_extF80M$(OBJ) \ | ||
165 | + i32_to_f128M$(OBJ) \ | ||
166 | + i64_to_f32$(OBJ) \ | ||
167 | + i64_to_f64$(OBJ) \ | ||
168 | + i64_to_extF80M$(OBJ) \ | ||
169 | + i64_to_f128M$(OBJ) \ | ||
170 | + f32_to_ui32$(OBJ) \ | ||
171 | + f32_to_ui64$(OBJ) \ | ||
172 | + f32_to_i32$(OBJ) \ | ||
173 | + f32_to_i64$(OBJ) \ | ||
174 | + f32_to_ui32_r_minMag$(OBJ) \ | ||
175 | + f32_to_ui64_r_minMag$(OBJ) \ | ||
176 | + f32_to_i32_r_minMag$(OBJ) \ | ||
177 | + f32_to_i64_r_minMag$(OBJ) \ | ||
178 | + f32_to_f64$(OBJ) \ | ||
179 | + f32_to_extF80M$(OBJ) \ | ||
180 | + f32_to_f128M$(OBJ) \ | ||
181 | + f32_roundToInt$(OBJ) \ | ||
182 | + f32_add$(OBJ) \ | ||
183 | + f32_sub$(OBJ) \ | ||
184 | + f32_mul$(OBJ) \ | ||
185 | + f32_mulAdd$(OBJ) \ | ||
186 | + f32_div$(OBJ) \ | ||
187 | + f32_rem$(OBJ) \ | ||
188 | + f32_sqrt$(OBJ) \ | ||
189 | + f32_eq$(OBJ) \ | ||
190 | + f32_le$(OBJ) \ | ||
191 | + f32_lt$(OBJ) \ | ||
192 | + f32_eq_signaling$(OBJ) \ | ||
193 | + f32_le_quiet$(OBJ) \ | ||
194 | + f32_lt_quiet$(OBJ) \ | ||
195 | + f32_isSignalingNaN$(OBJ) \ | ||
196 | + f64_to_ui32$(OBJ) \ | ||
197 | + f64_to_ui64$(OBJ) \ | ||
198 | + f64_to_i32$(OBJ) \ | ||
199 | + f64_to_i64$(OBJ) \ | ||
200 | + f64_to_ui32_r_minMag$(OBJ) \ | ||
201 | + f64_to_ui64_r_minMag$(OBJ) \ | ||
202 | + f64_to_i32_r_minMag$(OBJ) \ | ||
203 | + f64_to_i64_r_minMag$(OBJ) \ | ||
204 | + f64_to_f32$(OBJ) \ | ||
205 | + f64_to_extF80M$(OBJ) \ | ||
206 | + f64_to_f128M$(OBJ) \ | ||
207 | + f64_roundToInt$(OBJ) \ | ||
208 | + f64_add$(OBJ) \ | ||
209 | + f64_sub$(OBJ) \ | ||
210 | + f64_mul$(OBJ) \ | ||
211 | + f64_mulAdd$(OBJ) \ | ||
212 | + f64_div$(OBJ) \ | ||
213 | + f64_rem$(OBJ) \ | ||
214 | + f64_sqrt$(OBJ) \ | ||
215 | + f64_eq$(OBJ) \ | ||
216 | + f64_le$(OBJ) \ | ||
217 | + f64_lt$(OBJ) \ | ||
218 | + f64_eq_signaling$(OBJ) \ | ||
219 | + f64_le_quiet$(OBJ) \ | ||
220 | + f64_lt_quiet$(OBJ) \ | ||
221 | + f64_isSignalingNaN$(OBJ) \ | ||
222 | + extF80M_to_ui32$(OBJ) \ | ||
223 | + extF80M_to_ui64$(OBJ) \ | ||
224 | + extF80M_to_i32$(OBJ) \ | ||
225 | + extF80M_to_i64$(OBJ) \ | ||
226 | + extF80M_to_ui32_r_minMag$(OBJ) \ | ||
227 | + extF80M_to_ui64_r_minMag$(OBJ) \ | ||
228 | + extF80M_to_i32_r_minMag$(OBJ) \ | ||
229 | + extF80M_to_i64_r_minMag$(OBJ) \ | ||
230 | + extF80M_to_f32$(OBJ) \ | ||
231 | + extF80M_to_f64$(OBJ) \ | ||
232 | + extF80M_to_f128M$(OBJ) \ | ||
233 | + extF80M_roundToInt$(OBJ) \ | ||
234 | + extF80M_add$(OBJ) \ | ||
235 | + extF80M_sub$(OBJ) \ | ||
236 | + extF80M_mul$(OBJ) \ | ||
237 | + extF80M_div$(OBJ) \ | ||
238 | + extF80M_rem$(OBJ) \ | ||
239 | + extF80M_sqrt$(OBJ) \ | ||
240 | + extF80M_eq$(OBJ) \ | ||
241 | + extF80M_le$(OBJ) \ | ||
242 | + extF80M_lt$(OBJ) \ | ||
243 | + extF80M_eq_signaling$(OBJ) \ | ||
244 | + extF80M_le_quiet$(OBJ) \ | ||
245 | + extF80M_lt_quiet$(OBJ) \ | ||
246 | + f128M_to_ui32$(OBJ) \ | ||
247 | + f128M_to_ui64$(OBJ) \ | ||
248 | + f128M_to_i32$(OBJ) \ | ||
249 | + f128M_to_i64$(OBJ) \ | ||
250 | + f128M_to_ui32_r_minMag$(OBJ) \ | ||
251 | + f128M_to_ui64_r_minMag$(OBJ) \ | ||
252 | + f128M_to_i32_r_minMag$(OBJ) \ | ||
253 | + f128M_to_i64_r_minMag$(OBJ) \ | ||
254 | + f128M_to_f32$(OBJ) \ | ||
255 | + f128M_to_f64$(OBJ) \ | ||
256 | + f128M_to_extF80M$(OBJ) \ | ||
257 | + f128M_roundToInt$(OBJ) \ | ||
258 | + f128M_add$(OBJ) \ | ||
259 | + f128M_sub$(OBJ) \ | ||
260 | + f128M_mul$(OBJ) \ | ||
261 | + f128M_mulAdd$(OBJ) \ | ||
262 | + f128M_div$(OBJ) \ | ||
263 | + f128M_rem$(OBJ) \ | ||
264 | + f128M_sqrt$(OBJ) \ | ||
265 | + f128M_eq$(OBJ) \ | ||
266 | + f128M_le$(OBJ) \ | ||
267 | + f128M_lt$(OBJ) \ | ||
268 | + f128M_eq_signaling$(OBJ) \ | ||
269 | + f128M_le_quiet$(OBJ) \ | ||
270 | + f128M_lt_quiet$(OBJ) \ | ||
271 | + | ||
272 | +OBJS_ALL = $(OBJS_PRIMITIVES) $(OBJS_SPECIALIZE) $(OBJS_OTHERS) | ||
273 | + | ||
274 | +$(OBJS_ALL): \ | ||
275 | + platform.h $(SOURCE_DIR)/include/primitiveTypes.h \ | ||
276 | + $(SOURCE_DIR)/include/primitives.h | ||
277 | +$(OBJS_SPECIALIZE) $(OBJS_OTHERS): \ | ||
278 | + $(SOURCE_DIR)/include/softfloat_types.h $(SOURCE_DIR)/include/internals.h \ | ||
279 | + $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/specialize.h \ | ||
280 | + $(SOURCE_DIR)/include/softfloat.h | ||
281 | + | ||
282 | +$(OBJS_PRIMITIVES) $(OBJS_OTHERS): %$(OBJ): $(SOURCE_DIR)/%.c | ||
283 | + $(COMPILE_C) $(SOURCE_DIR)/$*.c | ||
284 | + | ||
285 | +$(OBJS_SPECIALIZE): %$(OBJ): $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/%.c | ||
286 | + $(COMPILE_C) $(SOURCE_DIR)/$(SPECIALIZE_TYPE)/$*.c | ||
287 | + | ||
288 | +softfloat$(LIB): $(OBJS_ALL) | ||
289 | + $(DELETE) $@ | ||
290 | + $(MAKELIB) $^ | ||
291 | + | ||
292 | +.PHONY: clean | ||
293 | +clean: | ||
294 | + $(DELETE) $(OBJS_ALL) softfloat$(LIB) | ||
295 | + | ||
296 | diff --git a/SoftFloat-3a/build/Linux-Cross-Compile/platform.h b/SoftFloat-3a/build/Linux-Cross-Compile/platform.h | ||
297 | new file mode 100644 | ||
298 | index 0000000..5e566fc | ||
299 | --- /dev/null | ||
300 | +++ b/SoftFloat-3a/build/Linux-Cross-Compile/platform.h | ||
301 | @@ -0,0 +1,44 @@ | ||
302 | + | ||
303 | +/*============================================================================ | ||
304 | + | ||
305 | +This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic | ||
306 | +Package, Release 3a, by John R. Hauser. | ||
307 | + | ||
308 | +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. | ||
309 | +All rights reserved. | ||
310 | + | ||
311 | +Redistribution and use in source and binary forms, with or without | ||
312 | +modification, are permitted provided that the following conditions are met: | ||
313 | + | ||
314 | + 1. Redistributions of source code must retain the above copyright notice, | ||
315 | + this list of conditions, and the following disclaimer. | ||
316 | + | ||
317 | + 2. Redistributions in binary form must reproduce the above copyright notice, | ||
318 | + this list of conditions, and the following disclaimer in the documentation | ||
319 | + and/or other materials provided with the distribution. | ||
320 | + | ||
321 | + 3. Neither the name of the University nor the names of its contributors may | ||
322 | + be used to endorse or promote products derived from this software without | ||
323 | + specific prior written permission. | ||
324 | + | ||
325 | +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY | ||
326 | +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
327 | +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE | ||
328 | +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY | ||
329 | +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
330 | +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
331 | +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
332 | +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
333 | +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
334 | +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
335 | + | ||
336 | +=============================================================================*/ | ||
337 | + | ||
338 | +/*---------------------------------------------------------------------------- | ||
339 | +*----------------------------------------------------------------------------*/ | ||
340 | +#define LITTLEENDIAN 1 | ||
341 | + | ||
342 | +/*---------------------------------------------------------------------------- | ||
343 | +*----------------------------------------------------------------------------*/ | ||
344 | +#define INLINE extern inline | ||
345 | + | ||
346 | -- | ||
347 | 2.1.4 | ||
348 | |||
diff --git a/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch b/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch new file mode 100644 index 000000000..71ca343cc --- /dev/null +++ b/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch | |||
@@ -0,0 +1,396 @@ | |||
1 | Upstream-Status: Inappropriate [configuration] | ||
2 | |||
3 | From 9aa4a416f05967320c1aa52bdccfe105a3bf3269 Mon Sep 17 00:00:00 2001 | ||
4 | From: Fabio Berton <fabio.berton@ossystems.com.br> | ||
5 | Date: Thu, 4 Feb 2016 09:16:09 -0200 | ||
6 | Subject: [PATCH 2/2] Makefile for cross compile TestFloat | ||
7 | |||
8 | Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> | ||
9 | --- | ||
10 | TestFloat-3a/build/Linux-Cross-Compile/Makefile | 321 ++++++++++++++++++++++ | ||
11 | TestFloat-3a/build/Linux-Cross-Compile/platform.h | 45 +++ | ||
12 | 2 files changed, 366 insertions(+) | ||
13 | create mode 100644 TestFloat-3a/build/Linux-Cross-Compile/Makefile | ||
14 | create mode 100644 TestFloat-3a/build/Linux-Cross-Compile/platform.h | ||
15 | |||
16 | diff --git a/TestFloat-3a/build/Linux-Cross-Compile/Makefile b/TestFloat-3a/build/Linux-Cross-Compile/Makefile | ||
17 | new file mode 100644 | ||
18 | index 0000000..a89326a | ||
19 | --- /dev/null | ||
20 | +++ b/TestFloat-3a/build/Linux-Cross-Compile/Makefile | ||
21 | @@ -0,0 +1,321 @@ | ||
22 | + | ||
23 | +#============================================================================= | ||
24 | +# | ||
25 | +# This Makefile is part of TestFloat, Release 3a, a package of programs for | ||
26 | +# testing the correctness of floating-point arithmetic complying with the IEEE | ||
27 | +# Standard for Floating-Point, by John R. Hauser. | ||
28 | +# | ||
29 | +# Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of | ||
30 | +# California. All rights reserved. | ||
31 | +# | ||
32 | +# Redistribution and use in source and binary forms, with or without | ||
33 | +# modification, are permitted provided that the following conditions are met: | ||
34 | +# | ||
35 | +# 1. Redistributions of source code must retain the above copyright notice, | ||
36 | +# this list of conditions, and the following disclaimer. | ||
37 | +# | ||
38 | +# 2. Redistributions in binary form must reproduce the above copyright | ||
39 | +# notice, this list of conditions, and the following disclaimer in the | ||
40 | +# documentation and/or other materials provided with the distribution. | ||
41 | +# | ||
42 | +# 3. Neither the name of the University nor the names of its contributors | ||
43 | +# may be used to endorse or promote products derived from this software | ||
44 | +# without specific prior written permission. | ||
45 | +# | ||
46 | +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY | ||
47 | +# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
48 | +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE | ||
49 | +# DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY | ||
50 | +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
51 | +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
52 | +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
53 | +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
54 | +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
55 | +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
56 | +# | ||
57 | +#============================================================================= | ||
58 | + | ||
59 | +SOURCE_DIR = ../../source | ||
60 | +SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C | ||
61 | +SOFTFLOAT_DIR = ../../../SoftFloat-3a | ||
62 | +SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include | ||
63 | +PLATFORM = Linux-Cross-Compile | ||
64 | + | ||
65 | +SOFTFLOAT_H = \ | ||
66 | + $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \ | ||
67 | + $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h | ||
68 | +SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB) | ||
69 | + | ||
70 | +TESTFLOAT_OPTS = -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80 -fgnu89-inline | ||
71 | + | ||
72 | +DELETE = rm -f | ||
73 | +C_INCLUDES = \ | ||
74 | + -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR) | ||
75 | +COMPILE_C = \ | ||
76 | + ${CC} -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \ | ||
77 | + $(C_INCLUDES) -O2 -o $@ | ||
78 | +COMPILE_SLOWFLOAT_C = \ | ||
79 | + ${CC} -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \ | ||
80 | + $(C_INCLUDES) -O3 -o $@ | ||
81 | +MAKELIB = ${AR} crs $@ | ||
82 | +LINK = ${CC} -o $@ ${LDFLAGS} | ||
83 | +OTHER_LIBS = -lm | ||
84 | + | ||
85 | +OBJ = .o | ||
86 | +LIB = .a | ||
87 | +EXE = | ||
88 | + | ||
89 | +.PHONY: all | ||
90 | +all: \ | ||
91 | + testsoftfloat$(EXE) \ | ||
92 | + timesoftfloat$(EXE) \ | ||
93 | + testfloat_gen$(EXE) \ | ||
94 | + testfloat_ver$(EXE) \ | ||
95 | + testfloat$(EXE) \ | ||
96 | + | ||
97 | +OBJS_GENCASES = \ | ||
98 | + genCases_ui32$(OBJ) \ | ||
99 | + genCases_ui64$(OBJ) \ | ||
100 | + genCases_i32$(OBJ) \ | ||
101 | + genCases_i64$(OBJ) \ | ||
102 | + genCases_f32$(OBJ) \ | ||
103 | + genCases_f64$(OBJ) \ | ||
104 | + genCases_extF80$(OBJ) \ | ||
105 | + genCases_f128$(OBJ) \ | ||
106 | + | ||
107 | +OBJS_WRITECASE = \ | ||
108 | + writeCase_a_ui32$(OBJ) \ | ||
109 | + writeCase_a_ui64$(OBJ) \ | ||
110 | + writeCase_a_f32$(OBJ) \ | ||
111 | + writeCase_ab_f32$(OBJ) \ | ||
112 | + writeCase_abc_f32$(OBJ) \ | ||
113 | + writeCase_a_f64$(OBJ) \ | ||
114 | + writeCase_ab_f64$(OBJ) \ | ||
115 | + writeCase_abc_f64$(OBJ) \ | ||
116 | + writeCase_a_extF80M$(OBJ) \ | ||
117 | + writeCase_ab_extF80M$(OBJ) \ | ||
118 | + writeCase_abc_extF80M$(OBJ) \ | ||
119 | + writeCase_a_f128M$(OBJ) \ | ||
120 | + writeCase_ab_f128M$(OBJ) \ | ||
121 | + writeCase_abc_f128M$(OBJ) \ | ||
122 | + writeCase_z_bool$(OBJ) \ | ||
123 | + writeCase_z_ui32$(OBJ) \ | ||
124 | + writeCase_z_ui64$(OBJ) \ | ||
125 | + writeCase_z_f32$(OBJ) \ | ||
126 | + writeCase_z_f64$(OBJ) \ | ||
127 | + writeCase_z_extF80M$(OBJ) \ | ||
128 | + writeCase_z_f128M$(OBJ) \ | ||
129 | + | ||
130 | +OBJS_TEST = \ | ||
131 | + test_a_ui32_z_f32$(OBJ) \ | ||
132 | + test_a_ui32_z_f64$(OBJ) \ | ||
133 | + test_a_ui32_z_extF80$(OBJ) \ | ||
134 | + test_a_ui32_z_f128$(OBJ) \ | ||
135 | + test_a_ui64_z_f32$(OBJ) \ | ||
136 | + test_a_ui64_z_f64$(OBJ) \ | ||
137 | + test_a_ui64_z_extF80$(OBJ) \ | ||
138 | + test_a_ui64_z_f128$(OBJ) \ | ||
139 | + test_a_i32_z_f32$(OBJ) \ | ||
140 | + test_a_i32_z_f64$(OBJ) \ | ||
141 | + test_a_i32_z_extF80$(OBJ) \ | ||
142 | + test_a_i32_z_f128$(OBJ) \ | ||
143 | + test_a_i64_z_f32$(OBJ) \ | ||
144 | + test_a_i64_z_f64$(OBJ) \ | ||
145 | + test_a_i64_z_extF80$(OBJ) \ | ||
146 | + test_a_i64_z_f128$(OBJ) \ | ||
147 | + test_a_f32_z_ui32_rx$(OBJ) \ | ||
148 | + test_a_f32_z_ui64_rx$(OBJ) \ | ||
149 | + test_a_f32_z_i32_rx$(OBJ) \ | ||
150 | + test_a_f32_z_i64_rx$(OBJ) \ | ||
151 | + test_a_f32_z_ui32_x$(OBJ) \ | ||
152 | + test_a_f32_z_ui64_x$(OBJ) \ | ||
153 | + test_a_f32_z_i32_x$(OBJ) \ | ||
154 | + test_a_f32_z_i64_x$(OBJ) \ | ||
155 | + test_a_f32_z_f64$(OBJ) \ | ||
156 | + test_a_f32_z_extF80$(OBJ) \ | ||
157 | + test_a_f32_z_f128$(OBJ) \ | ||
158 | + test_az_f32$(OBJ) \ | ||
159 | + test_az_f32_rx$(OBJ) \ | ||
160 | + test_abz_f32$(OBJ) \ | ||
161 | + test_abcz_f32$(OBJ) \ | ||
162 | + test_ab_f32_z_bool$(OBJ) \ | ||
163 | + test_a_f64_z_ui32_rx$(OBJ) \ | ||
164 | + test_a_f64_z_ui64_rx$(OBJ) \ | ||
165 | + test_a_f64_z_i32_rx$(OBJ) \ | ||
166 | + test_a_f64_z_i64_rx$(OBJ) \ | ||
167 | + test_a_f64_z_ui32_x$(OBJ) \ | ||
168 | + test_a_f64_z_ui64_x$(OBJ) \ | ||
169 | + test_a_f64_z_i32_x$(OBJ) \ | ||
170 | + test_a_f64_z_i64_x$(OBJ) \ | ||
171 | + test_a_f64_z_f32$(OBJ) \ | ||
172 | + test_a_f64_z_extF80$(OBJ) \ | ||
173 | + test_a_f64_z_f128$(OBJ) \ | ||
174 | + test_az_f64$(OBJ) \ | ||
175 | + test_az_f64_rx$(OBJ) \ | ||
176 | + test_abz_f64$(OBJ) \ | ||
177 | + test_abcz_f64$(OBJ) \ | ||
178 | + test_ab_f64_z_bool$(OBJ) \ | ||
179 | + test_a_extF80_z_ui32_rx$(OBJ) \ | ||
180 | + test_a_extF80_z_ui64_rx$(OBJ) \ | ||
181 | + test_a_extF80_z_i32_rx$(OBJ) \ | ||
182 | + test_a_extF80_z_i64_rx$(OBJ) \ | ||
183 | + test_a_extF80_z_ui32_x$(OBJ) \ | ||
184 | + test_a_extF80_z_ui64_x$(OBJ) \ | ||
185 | + test_a_extF80_z_i32_x$(OBJ) \ | ||
186 | + test_a_extF80_z_i64_x$(OBJ) \ | ||
187 | + test_a_extF80_z_f32$(OBJ) \ | ||
188 | + test_a_extF80_z_f64$(OBJ) \ | ||
189 | + test_a_extF80_z_f128$(OBJ) \ | ||
190 | + test_az_extF80$(OBJ) \ | ||
191 | + test_az_extF80_rx$(OBJ) \ | ||
192 | + test_abz_extF80$(OBJ) \ | ||
193 | + test_ab_extF80_z_bool$(OBJ) \ | ||
194 | + test_a_f128_z_ui32_rx$(OBJ) \ | ||
195 | + test_a_f128_z_ui64_rx$(OBJ) \ | ||
196 | + test_a_f128_z_i32_rx$(OBJ) \ | ||
197 | + test_a_f128_z_i64_rx$(OBJ) \ | ||
198 | + test_a_f128_z_ui32_x$(OBJ) \ | ||
199 | + test_a_f128_z_ui64_x$(OBJ) \ | ||
200 | + test_a_f128_z_i32_x$(OBJ) \ | ||
201 | + test_a_f128_z_i64_x$(OBJ) \ | ||
202 | + test_a_f128_z_f32$(OBJ) \ | ||
203 | + test_a_f128_z_f64$(OBJ) \ | ||
204 | + test_a_f128_z_extF80$(OBJ) \ | ||
205 | + test_az_f128$(OBJ) \ | ||
206 | + test_az_f128_rx$(OBJ) \ | ||
207 | + test_abz_f128$(OBJ) \ | ||
208 | + test_abcz_f128$(OBJ) \ | ||
209 | + test_ab_f128_z_bool$(OBJ) \ | ||
210 | + | ||
211 | +OBJS_LIB = \ | ||
212 | + uint128$(OBJ) \ | ||
213 | + fail$(OBJ) \ | ||
214 | + functions_common$(OBJ) \ | ||
215 | + functionInfos$(OBJ) \ | ||
216 | + standardFunctionInfos$(OBJ) \ | ||
217 | + random$(OBJ) \ | ||
218 | + genCases_common$(OBJ) \ | ||
219 | + $(OBJS_GENCASES) \ | ||
220 | + genCases_writeTestsTotal$(OBJ) \ | ||
221 | + verCases_common$(OBJ) \ | ||
222 | + verCases_writeFunctionName$(OBJ) \ | ||
223 | + readHex$(OBJ) \ | ||
224 | + writeHex$(OBJ) \ | ||
225 | + $(OBJS_WRITECASE) \ | ||
226 | + testLoops_common$(OBJ) \ | ||
227 | + $(OBJS_TEST) \ | ||
228 | + | ||
229 | +uint128$(OBJ): $(SOURCE_DIR)/uint128.h | ||
230 | +fail$(OBJ): $(SOURCE_DIR)/fail.h | ||
231 | +functions_common$(OBJ): $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h | ||
232 | +functionInfos$(OBJ): $(SOURCE_DIR)/functions.h | ||
233 | +standardFunctionInfos$(OBJ): $(SOURCE_DIR)/functions.h | ||
234 | +random$(OBJ): $(SOURCE_DIR)/random.h | ||
235 | +genCases_common$(OBJ): $(SOURCE_DIR)/fail.h $(SOURCE_DIR)/genCases.h | ||
236 | +$(OBJS_GENCASES): \ | ||
237 | + $(SOURCE_DIR)/random.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h | ||
238 | +genCases_f128$(OBJ): $(SOURCE_DIR)/uint128.h | ||
239 | +genCases_writeTestsTotal$(OBJ): $(SOURCE_DIR)/genCases.h | ||
240 | +verCases_common$(OBJ): $(SOURCE_DIR)/verCases.h | ||
241 | +verCases_writeFunctionName$(OBJ): $(SOURCE_DIR)/verCases.h | ||
242 | +readHex$(OBJ): $(SOURCE_DIR)/readHex.h | ||
243 | +writeHex$(OBJ): $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h | ||
244 | +$(OBJS_WRITECASE): \ | ||
245 | + $(SOFTFLOAT_H) $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/writeCase.h | ||
246 | +testLoops_common$(OBJ): $(SOURCE_DIR)/testLoops.h | ||
247 | +$(OBJS_TEST): \ | ||
248 | + $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) $(SOURCE_DIR)/genCases.h \ | ||
249 | + $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/testLoops.h | ||
250 | +$(OBJS_LIB): %$(OBJ): platform.h $(SOURCE_DIR)/%.c | ||
251 | + $(COMPILE_C) $(SOURCE_DIR)/$*.c | ||
252 | +testfloat$(LIB): $(OBJS_LIB) | ||
253 | + $(MAKELIB) $^ | ||
254 | + | ||
255 | +OBJS_TESTSOFTFLOAT = slowfloat$(OBJ) testsoftfloat$(OBJ) | ||
256 | + | ||
257 | +slowfloat$(OBJ): \ | ||
258 | + platform.h $(SOURCE_DIR)/uint128.h $(SOFTFLOAT_H) \ | ||
259 | + $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/slowfloat.c | ||
260 | + $(COMPILE_SLOWFLOAT_C) $(SOURCE_DIR)/slowfloat.c | ||
261 | +testsoftfloat$(OBJ): \ | ||
262 | + platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ | ||
263 | + $(SOURCE_DIR)/slowfloat.h $(SOURCE_DIR)/functions.h \ | ||
264 | + $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \ | ||
265 | + $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testsoftfloat.c | ||
266 | + $(COMPILE_C) $(SOURCE_DIR)/testsoftfloat.c | ||
267 | + | ||
268 | +testsoftfloat$(EXE): $(OBJS_TESTSOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB) | ||
269 | + $(LINK) $^ $(OTHER_LIBS) | ||
270 | + | ||
271 | +OBJS_TIMESOFTFLOAT = timesoftfloat$(OBJ) | ||
272 | + | ||
273 | +timesoftfloat$(OBJ): \ | ||
274 | + platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ | ||
275 | + $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/timesoftfloat.c | ||
276 | + $(COMPILE_C) $(SOURCE_DIR)/timesoftfloat.c | ||
277 | + | ||
278 | +timesoftfloat$(EXE): $(OBJS_TIMESOFTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB) | ||
279 | + $(LINK) $^ $(OTHER_LIBS) | ||
280 | + | ||
281 | +OBJS_TESTFLOAT_GEN = genLoops$(OBJ) testfloat_gen$(OBJ) | ||
282 | + | ||
283 | +genLoops$(OBJ): \ | ||
284 | + platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ | ||
285 | + $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/writeHex.h $(SOURCE_DIR)/genLoops.h \ | ||
286 | + $(SOURCE_DIR)/genLoops.c | ||
287 | + $(COMPILE_C) $(SOURCE_DIR)/genLoops.c | ||
288 | +testfloat_gen$(OBJ): \ | ||
289 | + $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) $(SOURCE_DIR)/functions.h \ | ||
290 | + $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/genLoops.h \ | ||
291 | + $(SOURCE_DIR)/testfloat_gen.c | ||
292 | + $(COMPILE_C) $(SOURCE_DIR)/testfloat_gen.c | ||
293 | + | ||
294 | +testfloat_gen$(EXE): $(OBJS_TESTFLOAT_GEN) testfloat$(LIB) $(SOFTFLOAT_LIB) | ||
295 | + $(LINK) $^ $(OTHER_LIBS) | ||
296 | + | ||
297 | +OBJS_TESTFLOAT_VER = verLoops$(OBJ) testfloat_ver$(OBJ) | ||
298 | + | ||
299 | +verLoops$(OBJ): \ | ||
300 | + platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ | ||
301 | + $(SOURCE_DIR)/readHex.h $(SOURCE_DIR)/verCases.h $(SOURCE_DIR)/writeCase.h \ | ||
302 | + $(SOURCE_DIR)/verLoops.h $(SOURCE_DIR)/verLoops.c | ||
303 | + $(COMPILE_C) $(SOURCE_DIR)/verLoops.c | ||
304 | +testfloat_ver$(OBJ): \ | ||
305 | + platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ | ||
306 | + $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/verCases.h \ | ||
307 | + $(SOURCE_DIR)/writeCase.h $(SOURCE_DIR)/verLoops.h \ | ||
308 | + $(SOURCE_DIR)/testfloat_ver.c | ||
309 | + $(COMPILE_C) $(SOURCE_DIR)/testfloat_ver.c | ||
310 | + | ||
311 | +testfloat_ver$(EXE): $(OBJS_TESTFLOAT_VER) testfloat$(LIB) $(SOFTFLOAT_LIB) | ||
312 | + $(LINK) $^ $(OTHER_LIBS) | ||
313 | + | ||
314 | +OBJS_TESTFLOAT = subjfloat$(OBJ) subjfloat_functions$(OBJ) testfloat$(OBJ) | ||
315 | + | ||
316 | +subjfloat$(OBJ): \ | ||
317 | + platform.h $(SOFTFLOAT_H) $(SUBJ_SOURCE_DIR)/subjfloat_config.h \ | ||
318 | + $(SOURCE_DIR)/subjfloat.h $(SUBJ_SOURCE_DIR)/subjfloat.c | ||
319 | + $(COMPILE_C) $(SUBJ_SOURCE_DIR)/subjfloat.c | ||
320 | +subjfloat_functions$(OBJ): \ | ||
321 | + platform.h $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \ | ||
322 | + $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/subjfloat_functions.c | ||
323 | + $(COMPILE_C) $(SOURCE_DIR)/subjfloat_functions.c | ||
324 | +testfloat$(OBJ): \ | ||
325 | + platform.h $(SOURCE_DIR)/uint128.h $(SOURCE_DIR)/fail.h $(SOFTFLOAT_H) \ | ||
326 | + $(SUBJ_SOURCE_DIR)/subjfloat_config.h $(SOURCE_DIR)/subjfloat.h \ | ||
327 | + $(SOURCE_DIR)/functions.h $(SOURCE_DIR)/genCases.h $(SOURCE_DIR)/verCases.h \ | ||
328 | + $(SOURCE_DIR)/testLoops.h $(SOURCE_DIR)/testfloat.c | ||
329 | + $(COMPILE_C) $(SOURCE_DIR)/testfloat.c | ||
330 | + | ||
331 | +testfloat$(EXE): $(OBJS_TESTFLOAT) testfloat$(LIB) $(SOFTFLOAT_LIB) | ||
332 | + $(LINK) $^ $(OTHER_LIBS) | ||
333 | + | ||
334 | +.PHONY: clean | ||
335 | +clean: | ||
336 | + $(DELETE) $(OBJS_LIB) testfloat$(LIB) | ||
337 | + $(DELETE) $(OBJS_TESTSOFTFLOAT) testsoftfloat$(EXE) | ||
338 | + $(DELETE) $(OBJS_TIMESOFTFLOAT) timesoftfloat$(EXE) | ||
339 | + $(DELETE) $(OBJS_TESTFLOAT_GEN) testfloat_gen$(EXE) | ||
340 | + $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE) | ||
341 | + $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE) | ||
342 | + | ||
343 | diff --git a/TestFloat-3a/build/Linux-Cross-Compile/platform.h b/TestFloat-3a/build/Linux-Cross-Compile/platform.h | ||
344 | new file mode 100644 | ||
345 | index 0000000..09e63a0 | ||
346 | --- /dev/null | ||
347 | +++ b/TestFloat-3a/build/Linux-Cross-Compile/platform.h | ||
348 | @@ -0,0 +1,45 @@ | ||
349 | + | ||
350 | +/*============================================================================ | ||
351 | + | ||
352 | +This C header file is part of TestFloat, Release 3a, a package of programs for | ||
353 | +testing the correctness of floating-point arithmetic complying with the IEEE | ||
354 | +Standard for Floating-Point, by John R. Hauser. | ||
355 | + | ||
356 | +Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. | ||
357 | +All rights reserved. | ||
358 | + | ||
359 | +Redistribution and use in source and binary forms, with or without | ||
360 | +modification, are permitted provided that the following conditions are met: | ||
361 | + | ||
362 | + 1. Redistributions of source code must retain the above copyright notice, | ||
363 | + this list of conditions, and the following disclaimer. | ||
364 | + | ||
365 | + 2. Redistributions in binary form must reproduce the above copyright notice, | ||
366 | + this list of conditions, and the following disclaimer in the documentation | ||
367 | + and/or other materials provided with the distribution. | ||
368 | + | ||
369 | + 3. Neither the name of the University nor the names of its contributors may | ||
370 | + be used to endorse or promote products derived from this software without | ||
371 | + specific prior written permission. | ||
372 | + | ||
373 | +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY | ||
374 | +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
375 | +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE | ||
376 | +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY | ||
377 | +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
378 | +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
379 | +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
380 | +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
381 | +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
382 | +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
383 | + | ||
384 | +=============================================================================*/ | ||
385 | + | ||
386 | +/*---------------------------------------------------------------------------- | ||
387 | +*----------------------------------------------------------------------------*/ | ||
388 | +#define LITTLEENDIAN 1 | ||
389 | + | ||
390 | +/*---------------------------------------------------------------------------- | ||
391 | +*----------------------------------------------------------------------------*/ | ||
392 | +#define INLINE extern inline | ||
393 | + | ||
394 | -- | ||
395 | 2.1.4 | ||
396 | |||
diff --git a/meta-oe/recipes-test/testfloat/testfloat_3a.bb b/meta-oe/recipes-test/testfloat/testfloat_3a.bb new file mode 100644 index 000000000..28e967762 --- /dev/null +++ b/meta-oe/recipes-test/testfloat/testfloat_3a.bb | |||
@@ -0,0 +1,35 @@ | |||
1 | DESCRIPTION = "Berkeley TestFloat is a small collection of programs for \ | ||
2 | testing that an implementation of binary floating-point conforms to the \ | ||
3 | IEEE Standard for Floating-Point Arithmetic." | ||
4 | |||
5 | HOMEPAGE = "http://www.jhauser.us/arithmetic/TestFloat.html" | ||
6 | |||
7 | LICENSE = "BSD" | ||
8 | LIC_FILES_CHKSUM = "file://TestFloat-${PV}/COPYING.txt;md5=e45c175a323b5727777fb6bd4b26eafc" | ||
9 | |||
10 | SRC_URI = "\ | ||
11 | http://www.jhauser.us/arithmetic/TestFloat-3a.zip;name=TestFloat \ | ||
12 | http://www.jhauser.us/arithmetic/SoftFloat-3a.zip;name=SoftFloat \ | ||
13 | file://0001-Makefile-for-cross-compile-SoftFloat.patch \ | ||
14 | file://0002-Makefile-for-cross-compile-TestFloat.patch \ | ||
15 | " | ||
16 | SRC_URI[TestFloat.md5sum] = "5a124e85ab74c5e52da27d401cea6cc3" | ||
17 | SRC_URI[TestFloat.sha256sum] = "fa258b5b3c751656a372051adee4183e19ad4763032322eb7a87dfb9e2c22c75" | ||
18 | SRC_URI[SoftFloat.md5sum] = "e53bd4550cf99690642c41374d188517" | ||
19 | SRC_URI[SoftFloat.sha256sum] = "946fd23180559d60eb6683dda1cf8b142f5426dedfefb97b03c6afdfd70ee9e0" | ||
20 | |||
21 | S = "${WORKDIR}" | ||
22 | |||
23 | do_compile(){ | ||
24 | oe_runmake -C SoftFloat-${PV}/build/Linux-Cross-Compile/ | ||
25 | oe_runmake -C TestFloat-${PV}/build/Linux-Cross-Compile/ | ||
26 | } | ||
27 | |||
28 | do_install(){ | ||
29 | install -d ${D}/${bindir} | ||
30 | install ${S}/TestFloat-${PV}/build/Linux-Cross-Compile/testfloat ${D}/${bindir} | ||
31 | install ${S}/TestFloat-${PV}/build/Linux-Cross-Compile/testfloat_gen ${D}/${bindir} | ||
32 | install ${S}/TestFloat-${PV}/build/Linux-Cross-Compile/testfloat_ver ${D}/${bindir} | ||
33 | install ${S}/TestFloat-${PV}/build/Linux-Cross-Compile/testsoftfloat ${D}/${bindir} | ||
34 | install ${S}/TestFloat-${PV}/build/Linux-Cross-Compile/timesoftfloat ${D}/${bindir} | ||
35 | } | ||