summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch')
-rw-r--r--meta-oe/recipes-test/testfloat/files/0002-Makefile-for-cross-compile-TestFloat.patch117
1 files changed, 77 insertions, 40 deletions
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
index 71ca343cc0..b7d861f8fc 100644
--- 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
@@ -1,33 +1,35 @@
1Upstream-Status: Inappropriate [configuration] 1From 3503f7f3845caba454949fdf8408e85ca4fdb943 Mon Sep 17 00:00:00 2001
2From: Zong Li <zong.li@sifive.com>
3Date: Wed, 6 May 2020 01:25:55 -0700
4Subject: [PATCH] Makefile for cross compile TestFloat 3e
2 5
3From 9aa4a416f05967320c1aa52bdccfe105a3bf3269 Mon Sep 17 00:00:00 2001 6This commit adds a Makefile for cross compile on TestFloat
4From: Fabio Berton <fabio.berton@ossystems.com.br> 73e version. Almost implementation is based on meta-oe porting
5Date: Thu, 4 Feb 2016 09:16:09 -0200 8from Fabio Berton <fabio.berton@ossystems.com.br>.
6Subject: [PATCH 2/2] Makefile for cross compile TestFloat
7 9
8Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> 10Signed-off-by: Zong Li <zongbox@gmail.com>
9--- 11---
10 TestFloat-3a/build/Linux-Cross-Compile/Makefile | 321 ++++++++++++++++++++++ 12 TestFloat-3e/build/Linux-Cross-Compile/Makefile | 353 ++++++++++++++++++++++
11 TestFloat-3a/build/Linux-Cross-Compile/platform.h | 45 +++ 13 TestFloat-3e/build/Linux-Cross-Compile/platform.h | 48 +++
12 2 files changed, 366 insertions(+) 14 2 files changed, 401 insertions(+)
13 create mode 100644 TestFloat-3a/build/Linux-Cross-Compile/Makefile 15 create mode 100644 TestFloat-3e/build/Linux-Cross-Compile/Makefile
14 create mode 100644 TestFloat-3a/build/Linux-Cross-Compile/platform.h 16 create mode 100644 TestFloat-3e/build/Linux-Cross-Compile/platform.h
15 17
16diff --git a/TestFloat-3a/build/Linux-Cross-Compile/Makefile b/TestFloat-3a/build/Linux-Cross-Compile/Makefile 18diff --git a/TestFloat-3e/build/Linux-Cross-Compile/Makefile b/TestFloat-3e/build/Linux-Cross-Compile/Makefile
17new file mode 100644 19new file mode 100644
18index 0000000..a89326a 20index 0000000..d82b9ed
19--- /dev/null 21--- /dev/null
20+++ b/TestFloat-3a/build/Linux-Cross-Compile/Makefile 22+++ b/TestFloat-3e/build/Linux-Cross-Compile/Makefile
21@@ -0,0 +1,321 @@ 23@@ -0,0 +1,353 @@
22+ 24+
23+#============================================================================= 25+#=============================================================================
24+# 26+#
25+# This Makefile is part of TestFloat, Release 3a, a package of programs for 27+# This Makefile template is part of TestFloat, Release 3b, a package of
26+# testing the correctness of floating-point arithmetic complying with the IEEE 28+# programs for testing the correctness of floating-point arithmetic complying
27+# Standard for Floating-Point, by John R. Hauser. 29+# with the IEEE Standard for Floating-Point, by John R. Hauser.
28+# 30+#
29+# Copyright 2011, 2012, 2013, 2014, 2015 The Regents of the University of 31+# Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University
30+# California. All rights reserved. 32+# of California. All rights reserved.
31+# 33+#
32+# Redistribution and use in source and binary forms, with or without 34+# Redistribution and use in source and binary forms, with or without
33+# modification, are permitted provided that the following conditions are met: 35+# modification, are permitted provided that the following conditions are met:
@@ -56,28 +58,29 @@ index 0000000..a89326a
56+# 58+#
57+#============================================================================= 59+#=============================================================================
58+ 60+
59+SOURCE_DIR = ../../source 61+SOURCE_DIR ?= ../../source
62+SOFTFLOAT_DIR ?= ../../../SoftFloat-3e
63+PLATFORM ?= Linux-Cross-Compile
64+
60+SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C 65+SUBJ_SOURCE_DIR = $(SOURCE_DIR)/subj-C
61+SOFTFLOAT_DIR = ../../../SoftFloat-3a
62+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include 66+SOFTFLOAT_INCLUDE_DIR = $(SOFTFLOAT_DIR)/source/include
63+PLATFORM = Linux-Cross-Compile
64+ 67+
65+SOFTFLOAT_H = \ 68+SOFTFLOAT_H = \
66+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \ 69+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat_types.h \
67+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h 70+ $(SOFTFLOAT_INCLUDE_DIR)/softfloat.h
68+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB) 71+SOFTFLOAT_LIB = $(SOFTFLOAT_DIR)/build/$(PLATFORM)/softfloat$(LIB)
69+ 72+
70+TESTFLOAT_OPTS = -DEXTFLOAT80 -DFLOAT128 -DLONG_DOUBLE_IS_EXTFLOAT80 -fgnu89-inline 73+TESTFLOAT_OPTS ?= -DFLOAT16 -DFLOAT64 -DEXTFLOAT80 -DFLOAT128 -DFLOAT_ROUND_ODD
71+ 74+
72+DELETE = rm -f 75+DELETE = rm -f
73+C_INCLUDES = \ 76+C_INCLUDES = \
74+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR) 77+ -I. -I$(SUBJ_SOURCE_DIR) -I$(SOURCE_DIR) -I$(SOFTFLOAT_INCLUDE_DIR)
75+COMPILE_C = \ 78+COMPILE_C = \
76+ ${CC} -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \ 79+ ${CC} -c -Werror-implicit-function-declaration \
77+ $(C_INCLUDES) -O2 -o $@ 80+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O2 -o $@
78+COMPILE_SLOWFLOAT_C = \ 81+COMPILE_SLOWFLOAT_C = \
79+ ${CC} -c -Werror-implicit-function-declaration $(TESTFLOAT_OPTS) \ 82+ ${CC} -c -Werror-implicit-function-declaration \
80+ $(C_INCLUDES) -O3 -o $@ 83+ $(TESTFLOAT_OPTS) $(C_INCLUDES) -O3 -o $@
81+MAKELIB = ${AR} crs $@ 84+MAKELIB = ${AR} crs $@
82+LINK = ${CC} -o $@ ${LDFLAGS} 85+LINK = ${CC} -o $@ ${LDFLAGS}
83+OTHER_LIBS = -lm 86+OTHER_LIBS = -lm
@@ -99,6 +102,7 @@ index 0000000..a89326a
99+ genCases_ui64$(OBJ) \ 102+ genCases_ui64$(OBJ) \
100+ genCases_i32$(OBJ) \ 103+ genCases_i32$(OBJ) \
101+ genCases_i64$(OBJ) \ 104+ genCases_i64$(OBJ) \
105+ genCases_f16$(OBJ) \
102+ genCases_f32$(OBJ) \ 106+ genCases_f32$(OBJ) \
103+ genCases_f64$(OBJ) \ 107+ genCases_f64$(OBJ) \
104+ genCases_extF80$(OBJ) \ 108+ genCases_extF80$(OBJ) \
@@ -107,6 +111,9 @@ index 0000000..a89326a
107+OBJS_WRITECASE = \ 111+OBJS_WRITECASE = \
108+ writeCase_a_ui32$(OBJ) \ 112+ writeCase_a_ui32$(OBJ) \
109+ writeCase_a_ui64$(OBJ) \ 113+ writeCase_a_ui64$(OBJ) \
114+ writeCase_a_f16$(OBJ) \
115+ writeCase_ab_f16$(OBJ) \
116+ writeCase_abc_f16$(OBJ) \
110+ writeCase_a_f32$(OBJ) \ 117+ writeCase_a_f32$(OBJ) \
111+ writeCase_ab_f32$(OBJ) \ 118+ writeCase_ab_f32$(OBJ) \
112+ writeCase_abc_f32$(OBJ) \ 119+ writeCase_abc_f32$(OBJ) \
@@ -115,35 +122,56 @@ index 0000000..a89326a
115+ writeCase_abc_f64$(OBJ) \ 122+ writeCase_abc_f64$(OBJ) \
116+ writeCase_a_extF80M$(OBJ) \ 123+ writeCase_a_extF80M$(OBJ) \
117+ writeCase_ab_extF80M$(OBJ) \ 124+ writeCase_ab_extF80M$(OBJ) \
118+ writeCase_abc_extF80M$(OBJ) \
119+ writeCase_a_f128M$(OBJ) \ 125+ writeCase_a_f128M$(OBJ) \
120+ writeCase_ab_f128M$(OBJ) \ 126+ writeCase_ab_f128M$(OBJ) \
121+ writeCase_abc_f128M$(OBJ) \ 127+ writeCase_abc_f128M$(OBJ) \
122+ writeCase_z_bool$(OBJ) \ 128+ writeCase_z_bool$(OBJ) \
123+ writeCase_z_ui32$(OBJ) \ 129+ writeCase_z_ui32$(OBJ) \
124+ writeCase_z_ui64$(OBJ) \ 130+ writeCase_z_ui64$(OBJ) \
131+ writeCase_z_f16$(OBJ) \
125+ writeCase_z_f32$(OBJ) \ 132+ writeCase_z_f32$(OBJ) \
126+ writeCase_z_f64$(OBJ) \ 133+ writeCase_z_f64$(OBJ) \
127+ writeCase_z_extF80M$(OBJ) \ 134+ writeCase_z_extF80M$(OBJ) \
128+ writeCase_z_f128M$(OBJ) \ 135+ writeCase_z_f128M$(OBJ) \
129+ 136+
130+OBJS_TEST = \ 137+OBJS_TEST = \
138+ test_a_ui32_z_f16$(OBJ) \
131+ test_a_ui32_z_f32$(OBJ) \ 139+ test_a_ui32_z_f32$(OBJ) \
132+ test_a_ui32_z_f64$(OBJ) \ 140+ test_a_ui32_z_f64$(OBJ) \
133+ test_a_ui32_z_extF80$(OBJ) \ 141+ test_a_ui32_z_extF80$(OBJ) \
134+ test_a_ui32_z_f128$(OBJ) \ 142+ test_a_ui32_z_f128$(OBJ) \
143+ test_a_ui64_z_f16$(OBJ) \
135+ test_a_ui64_z_f32$(OBJ) \ 144+ test_a_ui64_z_f32$(OBJ) \
136+ test_a_ui64_z_f64$(OBJ) \ 145+ test_a_ui64_z_f64$(OBJ) \
137+ test_a_ui64_z_extF80$(OBJ) \ 146+ test_a_ui64_z_extF80$(OBJ) \
138+ test_a_ui64_z_f128$(OBJ) \ 147+ test_a_ui64_z_f128$(OBJ) \
148+ test_a_i32_z_f16$(OBJ) \
139+ test_a_i32_z_f32$(OBJ) \ 149+ test_a_i32_z_f32$(OBJ) \
140+ test_a_i32_z_f64$(OBJ) \ 150+ test_a_i32_z_f64$(OBJ) \
141+ test_a_i32_z_extF80$(OBJ) \ 151+ test_a_i32_z_extF80$(OBJ) \
142+ test_a_i32_z_f128$(OBJ) \ 152+ test_a_i32_z_f128$(OBJ) \
153+ test_a_i64_z_f16$(OBJ) \
143+ test_a_i64_z_f32$(OBJ) \ 154+ test_a_i64_z_f32$(OBJ) \
144+ test_a_i64_z_f64$(OBJ) \ 155+ test_a_i64_z_f64$(OBJ) \
145+ test_a_i64_z_extF80$(OBJ) \ 156+ test_a_i64_z_extF80$(OBJ) \
146+ test_a_i64_z_f128$(OBJ) \ 157+ test_a_i64_z_f128$(OBJ) \
158+ test_a_f16_z_ui32_rx$(OBJ) \
159+ test_a_f16_z_ui64_rx$(OBJ) \
160+ test_a_f16_z_i32_rx$(OBJ) \
161+ test_a_f16_z_i64_rx$(OBJ) \
162+ test_a_f16_z_ui32_x$(OBJ) \
163+ test_a_f16_z_ui64_x$(OBJ) \
164+ test_a_f16_z_i32_x$(OBJ) \
165+ test_a_f16_z_i64_x$(OBJ) \
166+ test_a_f16_z_f32$(OBJ) \
167+ test_a_f16_z_f64$(OBJ) \
168+ test_a_f16_z_extF80$(OBJ) \
169+ test_a_f16_z_f128$(OBJ) \
170+ test_az_f16$(OBJ) \
171+ test_az_f16_rx$(OBJ) \
172+ test_abz_f16$(OBJ) \
173+ test_abcz_f16$(OBJ) \
174+ test_ab_f16_z_bool$(OBJ) \
147+ test_a_f32_z_ui32_rx$(OBJ) \ 175+ test_a_f32_z_ui32_rx$(OBJ) \
148+ test_a_f32_z_ui64_rx$(OBJ) \ 176+ test_a_f32_z_ui64_rx$(OBJ) \
149+ test_a_f32_z_i32_rx$(OBJ) \ 177+ test_a_f32_z_i32_rx$(OBJ) \
@@ -152,6 +180,7 @@ index 0000000..a89326a
152+ test_a_f32_z_ui64_x$(OBJ) \ 180+ test_a_f32_z_ui64_x$(OBJ) \
153+ test_a_f32_z_i32_x$(OBJ) \ 181+ test_a_f32_z_i32_x$(OBJ) \
154+ test_a_f32_z_i64_x$(OBJ) \ 182+ test_a_f32_z_i64_x$(OBJ) \
183+ test_a_f32_z_f16$(OBJ) \
155+ test_a_f32_z_f64$(OBJ) \ 184+ test_a_f32_z_f64$(OBJ) \
156+ test_a_f32_z_extF80$(OBJ) \ 185+ test_a_f32_z_extF80$(OBJ) \
157+ test_a_f32_z_f128$(OBJ) \ 186+ test_a_f32_z_f128$(OBJ) \
@@ -168,6 +197,7 @@ index 0000000..a89326a
168+ test_a_f64_z_ui64_x$(OBJ) \ 197+ test_a_f64_z_ui64_x$(OBJ) \
169+ test_a_f64_z_i32_x$(OBJ) \ 198+ test_a_f64_z_i32_x$(OBJ) \
170+ test_a_f64_z_i64_x$(OBJ) \ 199+ test_a_f64_z_i64_x$(OBJ) \
200+ test_a_f64_z_f16$(OBJ) \
171+ test_a_f64_z_f32$(OBJ) \ 201+ test_a_f64_z_f32$(OBJ) \
172+ test_a_f64_z_extF80$(OBJ) \ 202+ test_a_f64_z_extF80$(OBJ) \
173+ test_a_f64_z_f128$(OBJ) \ 203+ test_a_f64_z_f128$(OBJ) \
@@ -184,6 +214,7 @@ index 0000000..a89326a
184+ test_a_extF80_z_ui64_x$(OBJ) \ 214+ test_a_extF80_z_ui64_x$(OBJ) \
185+ test_a_extF80_z_i32_x$(OBJ) \ 215+ test_a_extF80_z_i32_x$(OBJ) \
186+ test_a_extF80_z_i64_x$(OBJ) \ 216+ test_a_extF80_z_i64_x$(OBJ) \
217+ test_a_extF80_z_f16$(OBJ) \
187+ test_a_extF80_z_f32$(OBJ) \ 218+ test_a_extF80_z_f32$(OBJ) \
188+ test_a_extF80_z_f64$(OBJ) \ 219+ test_a_extF80_z_f64$(OBJ) \
189+ test_a_extF80_z_f128$(OBJ) \ 220+ test_a_extF80_z_f128$(OBJ) \
@@ -199,6 +230,7 @@ index 0000000..a89326a
199+ test_a_f128_z_ui64_x$(OBJ) \ 230+ test_a_f128_z_ui64_x$(OBJ) \
200+ test_a_f128_z_i32_x$(OBJ) \ 231+ test_a_f128_z_i32_x$(OBJ) \
201+ test_a_f128_z_i64_x$(OBJ) \ 232+ test_a_f128_z_i64_x$(OBJ) \
233+ test_a_f128_z_f16$(OBJ) \
202+ test_a_f128_z_f32$(OBJ) \ 234+ test_a_f128_z_f32$(OBJ) \
203+ test_a_f128_z_f64$(OBJ) \ 235+ test_a_f128_z_f64$(OBJ) \
204+ test_a_f128_z_extF80$(OBJ) \ 236+ test_a_f128_z_extF80$(OBJ) \
@@ -209,6 +241,7 @@ index 0000000..a89326a
209+ test_ab_f128_z_bool$(OBJ) \ 241+ test_ab_f128_z_bool$(OBJ) \
210+ 242+
211+OBJS_LIB = \ 243+OBJS_LIB = \
244+ uint128_inline$(OBJ) \
212+ uint128$(OBJ) \ 245+ uint128$(OBJ) \
213+ fail$(OBJ) \ 246+ fail$(OBJ) \
214+ functions_common$(OBJ) \ 247+ functions_common$(OBJ) \
@@ -218,6 +251,7 @@ index 0000000..a89326a
218+ genCases_common$(OBJ) \ 251+ genCases_common$(OBJ) \
219+ $(OBJS_GENCASES) \ 252+ $(OBJS_GENCASES) \
220+ genCases_writeTestsTotal$(OBJ) \ 253+ genCases_writeTestsTotal$(OBJ) \
254+ verCases_inline$(OBJ) \
221+ verCases_common$(OBJ) \ 255+ verCases_common$(OBJ) \
222+ verCases_writeFunctionName$(OBJ) \ 256+ verCases_writeFunctionName$(OBJ) \
223+ readHex$(OBJ) \ 257+ readHex$(OBJ) \
@@ -340,21 +374,21 @@ index 0000000..a89326a
340+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE) 374+ $(DELETE) $(OBJS_TESTFLOAT_VER) testfloat_ver$(EXE)
341+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE) 375+ $(DELETE) $(OBJS_TESTFLOAT) testfloat$(EXE)
342+ 376+
343diff --git a/TestFloat-3a/build/Linux-Cross-Compile/platform.h b/TestFloat-3a/build/Linux-Cross-Compile/platform.h 377diff --git a/TestFloat-3e/build/Linux-Cross-Compile/platform.h b/TestFloat-3e/build/Linux-Cross-Compile/platform.h
344new file mode 100644 378new file mode 100644
345index 0000000..09e63a0 379index 0000000..487a43b
346--- /dev/null 380--- /dev/null
347+++ b/TestFloat-3a/build/Linux-Cross-Compile/platform.h 381+++ b/TestFloat-3e/build/Linux-Cross-Compile/platform.h
348@@ -0,0 +1,45 @@ 382@@ -0,0 +1,48 @@
349+ 383+
350+/*============================================================================ 384+/*============================================================================
351+ 385+
352+This C header file is part of TestFloat, Release 3a, a package of programs for 386+This C header template is part of TestFloat, Release 3e, a package of programs
353+testing the correctness of floating-point arithmetic complying with the IEEE 387+for testing the correctness of floating-point arithmetic complying with the
354+Standard for Floating-Point, by John R. Hauser. 388+IEEE Standard for Floating-Point, by John R. Hauser.
355+ 389+
356+Copyright 2011, 2012, 2013, 2014 The Regents of the University of California. 390+Copyright 2011, 2012, 2013, 2014, 2015, 2016 The Regents of the University of
357+All rights reserved. 391+California. All rights reserved.
358+ 392+
359+Redistribution and use in source and binary forms, with or without 393+Redistribution and use in source and binary forms, with or without
360+modification, are permitted provided that the following conditions are met: 394+modification, are permitted provided that the following conditions are met:
@@ -389,8 +423,11 @@ index 0000000..09e63a0
389+ 423+
390+/*---------------------------------------------------------------------------- 424+/*----------------------------------------------------------------------------
391+*----------------------------------------------------------------------------*/ 425+*----------------------------------------------------------------------------*/
426+#ifdef __GNUC_STDC_INLINE__
427+#define INLINE inline
428+#else
392+#define INLINE extern inline 429+#define INLINE extern inline
393+ 430+#endif
394-- 431--
3952.1.4 4322.7.4
396 433