embox

Форк
0
/
openlibm.patch 
495 строк · 17.6 Кб
1
diff -aur ./openlibm-0.8.3/Make.inc ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/Make.inc
2
--- ./openlibm-0.8.3/Make.inc	2024-06-19 22:02:50.000000000 +0300
3
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/Make.inc	2024-08-12 03:22:44.200450784 +0300
4
@@ -160,15 +160,8 @@
5
 endif
6
 endif
7
 
8
-ifneq ($(filter $(ARCH),i387 amd64),)
9
-# Determines whether `long double` is the same as `double` on this arch.
10
-# linux x86_64, for instance, `long double` is 80 bits wide, whereas on macOS aarch64,
11
-# `long double` is the same as `double`. 
12
+ifneq ($(LONG_DOUBLE_SIZE),64)
13
 LONG_DOUBLE_NOT_DOUBLE := 1
14
-else ifeq ($(ARCH), aarch64)
15
-ifeq ($(filter $(OS),Darwin WINNT),)
16
-LONG_DOUBLE_NOT_DOUBLE := 1
17
-endif
18
 endif
19
 
20
 ifeq ($(CODE_COVERAGE),1)
21
@@ -176,12 +169,18 @@
22
 LDFLAGS_add += --coverage
23
 endif # CODE_COVERAGE==1
24
 
25
+CPPFLAGS_add += -I$(OPENLIBM_HOME) -I$(OPENLIBM_HOME)/include -I$(OPENLIBM_HOME)/$(ARCH) -I$(OPENLIBM_HOME)/src -DASSEMBLER -D__BSD_VISIBLE -Wno-implicit-function-declaration
26
+ifeq ($(LONG_DOUBLE_SIZE),80)
27
+CPPFLAGS_add += -I$(OPENLIBM_HOME)/ld80
28
+else ifeq ($(LONG_DOUBLE_SIZE),128)
29
+CPPFLAGS_add += -I$(OPENLIBM_HOME)/ld128
30
+endif
31
 
32
 %.c.o: %.c
33
-	$(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_add) -c $< -o $@
34
+	$(CC) $(CPPFLAGS) $(CPPFLAGS_add) -c $< -o $@
35
 
36
 %.S.o: %.S
37
-	$(CC) $(CPPFLAGS) $(SFLAGS) $(SFLAGS_add) $(filter -m% -B% -I% -D%,$(CFLAGS_add)) -c $< -o $@
38
+	$(CC) $(CPPFLAGS) $(CPPFLAGS_add) -c $< -o $@
39
 
40
 
41
 # Makefile debugging trick:
42
diff -aur ./openlibm-0.8.3/Makefile ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/Makefile
43
--- ./openlibm-0.8.3/Makefile	2024-06-19 22:02:50.000000000 +0300
44
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/Makefile	2024-08-12 03:22:44.200450784 +0300
45
@@ -2,16 +2,10 @@
46
 include ./Make.inc
47
 
48
 SUBDIRS = src $(ARCH) bsdsrc
49
-ifeq ($(LONG_DOUBLE_NOT_DOUBLE),1)
50
-# Add ld80 directory on x86 and x64
51
-ifneq ($(filter $(ARCH),i387 amd64),)
52
+ifeq ($(LONG_DOUBLE_SIZE),80)
53
 SUBDIRS += ld80
54
-else
55
-ifneq ($(filter $(ARCH),aarch64),)
56
+else ifeq ($(LONG_DOUBLE_SIZE),128)
57
 SUBDIRS += ld128
58
-else
59
-endif
60
-endif
61
 endif
62
 
63
 define INC_template
64
diff -aur ./openlibm-0.8.3/i387/fenv.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/i387/fenv.c
65
--- ./openlibm-0.8.3/i387/fenv.c	2024-06-19 22:02:50.000000000 +0300
66
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/i387/fenv.c	2024-08-12 03:22:44.200450784 +0300
67
@@ -70,22 +70,6 @@
68
 int
69
 __test_sse(void)
70
 {
71
-	int flag, nflag;
72
-	int dx_features;
73
-
74
-	/* Am I a 486? */
75
-	getfl(&flag);
76
-	nflag = flag ^ 0x200000;
77
-	setfl(nflag);
78
-	getfl(&nflag);
79
-	if (flag != nflag) {
80
-		/* Not a 486, so CPUID should work. */
81
-		cpuid_dx(&dx_features);
82
-		if (dx_features & 0x2000000) {
83
-			__has_sse = __SSE_YES;
84
-			return (1);
85
-		}
86
-	}
87
 	__has_sse = __SSE_NO;
88
 	return (0);
89
 }
90
diff -aur ./openlibm-0.8.3/include/openlibm_math.h ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/include/openlibm_math.h
91
--- ./openlibm-0.8.3/include/openlibm_math.h	2024-06-19 22:02:50.000000000 +0300
92
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/include/openlibm_math.h	2024-08-12 03:22:44.200450784 +0300
93
@@ -27,9 +27,7 @@
94
     #define __WIN32__
95
 #endif
96
 
97
-#if !defined(__arm__) && !defined(__wasm__)
98
 #define OLM_LONG_DOUBLE
99
-#endif
100
 
101
 #ifndef __pure2
102
 #define __pure2
103
diff -aur ./openlibm-0.8.3/riscv64/fenv.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/riscv64/fenv.c
104
--- ./openlibm-0.8.3/riscv64/fenv.c	2024-06-19 22:02:50.000000000 +0300
105
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/riscv64/fenv.c	2024-08-12 03:23:26.397245861 +0300
106
@@ -27,7 +27,7 @@
107
  */
108
 
109
 #define	__fenv_static
110
-#include "fenv.h"
111
+#include <openlibm_fenv.h>
112
 
113
 #ifdef __GNUC_GNU_INLINE__
114
 #error "This file must be compiled with C99 'inline' semantics"
115
diff -aur ./openlibm-0.8.3/src/cdefs-compat.h ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/cdefs-compat.h
116
--- ./openlibm-0.8.3/src/cdefs-compat.h	2024-06-19 22:02:50.000000000 +0300
117
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/cdefs-compat.h	2024-08-12 03:22:44.200450784 +0300
118
@@ -1,6 +1,8 @@
119
 #ifndef _CDEFS_COMPAT_H_
120
 #define	_CDEFS_COMPAT_H_
121
 
122
+#include <sys/cdefs.h>
123
+
124
 #if !defined(__BEGIN_DECLS)
125
 #if defined(__cplusplus)
126
 #define	__BEGIN_DECLS	extern "C" {
127
@@ -101,5 +103,10 @@
128
 #endif  /* __weak_reference */
129
 #endif	/* __GNUC__ */
130
 
131
+#undef openlibm_strong_reference
132
+#define openlibm_strong_reference(sym,alias) __strong_alias(alias,sym)
133
+
134
+#undef openlibm_weak_reference
135
+#define openlibm_weak_reference(sym,alias) __strong_alias(alias,sym)
136
 
137
 #endif /* _CDEFS_COMPAT_H_ */
138
diff -aur ./openlibm-0.8.3/src/e_fmod.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/e_fmod.c
139
--- ./openlibm-0.8.3/src/e_fmod.c	2024-06-19 22:02:50.000000000 +0300
140
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/e_fmod.c	2024-08-12 03:22:44.200450784 +0300
141
@@ -131,3 +131,7 @@
142
 	}
143
 	return x;		/* exact output */
144
 }
145
+
146
+#if (LDBL_MANT_DIG == 53)
147
+openlibm_weak_reference(fmod, fmodl);
148
+#endif
149
diff -aur ./openlibm-0.8.3/src/e_lgamma.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/e_lgamma.c
150
--- ./openlibm-0.8.3/src/e_lgamma.c	2024-06-19 22:02:50.000000000 +0300
151
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/e_lgamma.c	2024-08-12 03:22:44.200450784 +0300
152
@@ -34,3 +34,7 @@
153
 
154
 	return __ieee754_lgamma_r(x,&signgam);
155
 }
156
+
157
+#if (LDBL_MANT_DIG == 53)
158
+openlibm_weak_reference(lgamma, lgammal);
159
+#endif
160
diff -aur ./openlibm-0.8.3/src/e_lgamma_r.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/e_lgamma_r.c
161
--- ./openlibm-0.8.3/src/e_lgamma_r.c	2024-06-19 22:02:50.000000000 +0300
162
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/e_lgamma_r.c	2024-08-12 03:22:44.200450784 +0300
163
@@ -296,3 +296,7 @@
164
 	if(hx<0) r = nadj - r;
165
 	return r;
166
 }
167
+
168
+#if (LDBL_MANT_DIG == 53)
169
+openlibm_weak_reference(lgamma_r, lgammal_r);
170
+#endif
171
diff -aur ./openlibm-0.8.3/src/fpmath.h ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/fpmath.h
172
--- ./openlibm-0.8.3/src/fpmath.h	2024-06-19 22:02:50.000000000 +0300
173
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/fpmath.h	2024-08-12 03:22:44.200450784 +0300
174
@@ -29,26 +29,6 @@
175
 #ifndef _FPMATH_H_
176
 #define _FPMATH_H_
177
 
178
-#if defined(__aarch64__)
179
-#include "aarch64_fpmath.h"
180
-#elif defined(__i386__) || defined(__x86_64__)
181
-#ifdef __LP64__
182
-#include "amd64_fpmath.h"
183
-#else 
184
-#include "i386_fpmath.h"
185
-#endif
186
-#elif defined(__powerpc__) || defined(__POWERPC__)
187
-#include "powerpc_fpmath.h"
188
-#elif defined(__mips__)
189
-#include "mips_fpmath.h"
190
-#elif defined(__s390__)
191
-#include "s390_fpmath.h"
192
-#elif defined(__riscv)
193
-#include "riscv_fpmath.h"
194
-#elif defined(__loongarch64)
195
-#include "loongarch64_fpmath.h"
196
-#endif
197
-
198
 /* Definitions provided directly by GCC and Clang. */
199
 #if !(defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__))
200
 
201
@@ -81,6 +61,60 @@
202
 #define __FLOAT_WORD_ORDER__     __BYTE_ORDER__
203
 #endif
204
 
205
+#if defined(__aarch64__)
206
+#include "aarch64_fpmath.h"
207
+#elif defined(__i386__) || defined(__x86_64__)
208
+#ifdef __LP64__
209
+#include "amd64_fpmath.h"
210
+#else 
211
+#include "i386_fpmath.h"
212
+#endif
213
+#elif defined(__powerpc__) || defined(__POWERPC__)
214
+#include "powerpc_fpmath.h"
215
+#elif defined(__mips__)
216
+#include "mips_fpmath.h"
217
+#elif defined(__s390__)
218
+#include "s390_fpmath.h"
219
+#elif defined(__riscv)
220
+#include "riscv_fpmath.h"
221
+#elif defined(__loongarch64)
222
+#include "loongarch64_fpmath.h"
223
+#else
224
+union IEEEl2bits {
225
+	long double	e;
226
+	struct {
227
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
228
+#if __FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__
229
+		unsigned int	manl	:32;
230
+#endif
231
+		unsigned int	manh	:20;
232
+		unsigned int	exp	:11;
233
+		unsigned int	sign	:1;
234
+#if __FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__
235
+		unsigned int	manl	:32;
236
+#endif
237
+#else /* _BIG_ENDIAN */
238
+		unsigned int	sign	:1;
239
+		unsigned int	exp	:11;
240
+		unsigned int	manh	:20;
241
+		unsigned int	manl	:32;
242
+#endif
243
+	} bits;
244
+};
245
+
246
+#define	LDBL_NBIT	0
247
+#define	mask_nbit_l(u)	((void)0)
248
+#define	LDBL_IMPLICIT_NBIT
249
+
250
+#define	LDBL_MANH_SIZE	20
251
+#define	LDBL_MANL_SIZE	32
252
+
253
+#define	LDBL_TO_ARRAY32(u, a) do {			\
254
+	(a)[0] = (uint32_t)(u).bits.manl;		\
255
+	(a)[1] = (uint32_t)(u).bits.manh;		\
256
+} while(0)
257
+#endif
258
+
259
 union IEEEf2bits {
260
 	float	f;
261
 	struct {
262
diff -aur ./openlibm-0.8.3/src/math_private.h ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/math_private.h
263
--- ./openlibm-0.8.3/src/math_private.h	2024-06-19 22:02:50.000000000 +0300
264
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/math_private.h	2024-08-12 03:22:44.204450861 +0300
265
@@ -24,6 +24,7 @@
266
 #include "fpmath.h"
267
 #include <stdint.h>
268
 #include "math_private_openbsd.h"
269
+#include <float.h>
270
 
271
 /*
272
  * The original fdlibm code used statements like:
273
diff -aur ./openlibm-0.8.3/src/s_carg.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_carg.c
274
--- ./openlibm-0.8.3/src/s_carg.c	2024-06-19 22:02:50.000000000 +0300
275
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_carg.c	2024-08-12 03:22:44.204450861 +0300
276
@@ -38,3 +38,7 @@
277
 
278
 	return (atan2(cimag(z), creal(z)));
279
 }
280
+
281
+#if LDBL_MANT_DIG == 53
282
+openlibm_weak_reference(carg, cargl);
283
+#endif
284
diff -aur ./openlibm-0.8.3/src/s_ccosh.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_ccosh.c
285
--- ./openlibm-0.8.3/src/s_ccosh.c	2024-06-19 22:02:50.000000000 +0300
286
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_ccosh.c	2024-08-12 03:22:44.204450861 +0300
287
@@ -153,3 +153,8 @@
288
 	/* ccos(z) = ccosh(I * z) */
289
 	return (ccosh(CMPLX(-cimag(z), creal(z))));
290
 }
291
+
292
+#if	LDBL_MANT_DIG == DBL_MANT_DIG
293
+openlibm_strong_reference(ccos, ccosl);
294
+openlibm_strong_reference(ccosh, ccoshl);
295
+#endif	/* LDBL_MANT_DIG == DBL_MANT_DIG */
296
diff -aur ./openlibm-0.8.3/src/s_cexp.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_cexp.c
297
--- ./openlibm-0.8.3/src/s_cexp.c	2024-06-19 22:02:50.000000000 +0300
298
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_cexp.c	2024-08-12 03:22:44.204450861 +0300
299
@@ -87,3 +87,7 @@
300
 		return (CMPLX(exp_x * cos(y), exp_x * sin(y)));
301
 	}
302
 }
303
+
304
+#if	LDBL_MANT_DIG == DBL_MANT_DIG
305
+openlibm_strong_reference(cexp, cexpl);
306
+#endif	/* LDBL_MANT_DIG == DBL_MANT_DIG */
307
diff -aur ./openlibm-0.8.3/src/s_cimag.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_cimag.c
308
--- ./openlibm-0.8.3/src/s_cimag.c	2024-06-19 22:02:50.000000000 +0300
309
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_cimag.c	2024-08-12 03:22:44.204450861 +0300
310
@@ -35,3 +35,7 @@
311
 {
312
 	return (__imag__ z);
313
 }
314
+
315
+#if	LDBL_MANT_DIG == DBL_MANT_DIG
316
+openlibm_strong_reference(cimag, cimagl);
317
+#endif	/* LDBL_MANT_DIG == DBL_MANT_DIG */
318
diff -aur ./openlibm-0.8.3/src/s_conj.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_conj.c
319
--- ./openlibm-0.8.3/src/s_conj.c	2024-06-19 22:02:50.000000000 +0300
320
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_conj.c	2024-08-12 03:22:44.204450861 +0300
321
@@ -36,3 +36,7 @@
322
 
323
 	return (CMPLX(creal(z), -cimag(z)));
324
 }
325
+
326
+#if	LDBL_MANT_DIG == DBL_MANT_DIG
327
+openlibm_strong_reference(conj, conjl);
328
+#endif	/* LDBL_MANT_DIG == DBL_MANT_DIG */
329
diff -aur ./openlibm-0.8.3/src/s_copysign.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_copysign.c
330
--- ./openlibm-0.8.3/src/s_copysign.c	2024-06-19 22:02:50.000000000 +0300
331
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_copysign.c	2024-08-12 03:22:44.204450861 +0300
332
@@ -32,3 +32,7 @@
333
 	SET_HIGH_WORD(x,(hx&0x7fffffff)|(hy&0x80000000));
334
         return x;
335
 }
336
+
337
+#if (LDBL_MANT_DIG == 53)
338
+openlibm_weak_reference(copysign, copysignl);
339
+#endif
340
diff -aur ./openlibm-0.8.3/src/s_creal.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_creal.c
341
--- ./openlibm-0.8.3/src/s_creal.c	2024-06-19 22:02:50.000000000 +0300
342
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_creal.c	2024-08-12 03:22:44.204450861 +0300
343
@@ -35,3 +35,7 @@
344
 {
345
 	return z;
346
 }
347
+
348
+#if	LDBL_MANT_DIG == DBL_MANT_DIG
349
+openlibm_strong_reference(creal, creall);
350
+#endif	/* LDBL_MANT_DIG == DBL_MANT_DIG */
351
diff -aur ./openlibm-0.8.3/src/s_csinh.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_csinh.c
352
--- ./openlibm-0.8.3/src/s_csinh.c	2024-06-19 22:02:50.000000000 +0300
353
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_csinh.c	2024-08-12 03:22:44.204450861 +0300
354
@@ -155,3 +155,8 @@
355
 	z = csinh(CMPLX(-cimag(z), creal(z)));
356
 	return (CMPLX(cimag(z), -creal(z)));
357
 }
358
+
359
+#if	LDBL_MANT_DIG == DBL_MANT_DIG
360
+openlibm_strong_reference(csin, csinl);
361
+openlibm_strong_reference(csinh, csinhl);
362
+#endif	/* LDBL_MANT_DIG == DBL_MANT_DIG */
363
diff -aur ./openlibm-0.8.3/src/s_ctanh.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_ctanh.c
364
--- ./openlibm-0.8.3/src/s_ctanh.c	2024-06-19 22:02:50.000000000 +0300
365
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_ctanh.c	2024-08-12 03:22:44.204450861 +0300
366
@@ -142,3 +142,8 @@
367
 	z = ctanh(CMPLX(-cimag(z), creal(z)));
368
 	return (CMPLX(cimag(z), -creal(z)));
369
 }
370
+
371
+#if	LDBL_MANT_DIG == DBL_MANT_DIG
372
+openlibm_strong_reference(ctan, ctanl);
373
+openlibm_strong_reference(ctanh, ctanhl);
374
+#endif	/* LDBL_MANT_DIG == DBL_MANT_DIG */
375
diff -aur ./openlibm-0.8.3/src/s_fabs.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_fabs.c
376
--- ./openlibm-0.8.3/src/s_fabs.c	2024-06-19 22:02:50.000000000 +0300
377
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_fabs.c	2024-08-12 03:22:44.204450861 +0300
378
@@ -26,3 +26,7 @@
379
 	SET_HIGH_WORD(x,high&0x7fffffff);
380
         return x;
381
 }
382
+
383
+#if (LDBL_MANT_DIG == 53)
384
+openlibm_weak_reference(fabs, fabsl);
385
+#endif
386
diff -aur ./openlibm-0.8.3/src/s_fmax.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_fmax.c
387
--- ./openlibm-0.8.3/src/s_fmax.c	2024-06-19 22:02:50.000000000 +0300
388
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_fmax.c	2024-08-12 03:22:44.204450861 +0300
389
@@ -52,3 +52,7 @@
390
 
391
 	return (x > y ? x : y);
392
 }
393
+
394
+#if (LDBL_MANT_DIG == 53)
395
+openlibm_weak_reference(fmax, fmaxl);
396
+#endif
397
diff -aur ./openlibm-0.8.3/src/s_fmin.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_fmin.c
398
--- ./openlibm-0.8.3/src/s_fmin.c	2024-06-19 22:02:50.000000000 +0300
399
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_fmin.c	2024-08-12 03:22:44.204450861 +0300
400
@@ -52,3 +52,7 @@
401
 
402
 	return (x < y ? x : y);
403
 }
404
+
405
+#if (LDBL_MANT_DIG == 53)
406
+openlibm_weak_reference(fmin, fminl);
407
+#endif
408
diff -aur ./openlibm-0.8.3/src/s_ilogb.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_ilogb.c
409
--- ./openlibm-0.8.3/src/s_ilogb.c	2024-06-19 22:02:50.000000000 +0300
410
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_ilogb.c	2024-08-12 03:22:44.204450861 +0300
411
@@ -47,3 +47,7 @@
412
 	else if (hx>0x7ff00000 || lx!=0) return FP_ILOGBNAN;
413
 	else return INT_MAX;
414
 }
415
+
416
+#if (LDBL_MANT_DIG == 53)
417
+openlibm_weak_reference(ilogb, ilogbl);
418
+#endif
419
diff -aur ./openlibm-0.8.3/src/s_llrint.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_llrint.c
420
--- ./openlibm-0.8.3/src/s_llrint.c	2024-06-19 22:02:50.000000000 +0300
421
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_llrint.c	2024-08-12 03:22:44.204450861 +0300
422
@@ -7,3 +7,7 @@
423
 #define	fn		llrint
424
 
425
 #include "s_lrint.c"
426
+
427
+#if (LDBL_MANT_DIG == 53)
428
+openlibm_weak_reference(llrint, llrintl);
429
+#endif
430
diff -aur ./openlibm-0.8.3/src/s_llround.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_llround.c
431
--- ./openlibm-0.8.3/src/s_llround.c	2024-06-19 22:02:50.000000000 +0300
432
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_llround.c	2024-08-12 03:22:44.204450861 +0300
433
@@ -9,3 +9,7 @@
434
 #define	fn		llround
435
 
436
 #include "s_lround.c"
437
+
438
+#if (LDBL_MANT_DIG == 53)
439
+openlibm_weak_reference(llround, llroundl);
440
+#endif
441
diff -aur ./openlibm-0.8.3/src/s_lrint.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_lrint.c
442
--- ./openlibm-0.8.3/src/s_lrint.c	2024-06-19 22:02:50.000000000 +0300
443
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_lrint.c	2024-08-12 03:22:44.204450861 +0300
444
@@ -59,3 +59,7 @@
445
 	feupdateenv(&env);
446
 	return (d);
447
 }
448
+
449
+#if (LDBL_MANT_DIG == 53)
450
+openlibm_weak_reference(lrint, lrintl);
451
+#endif
452
diff -aur ./openlibm-0.8.3/src/s_lround.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_lround.c
453
--- ./openlibm-0.8.3/src/s_lround.c	2024-06-19 22:02:50.000000000 +0300
454
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_lround.c	2024-08-12 03:22:44.204450861 +0300
455
@@ -67,3 +67,7 @@
456
 		return (DTYPE_MAX);
457
 	}
458
 }
459
+
460
+#if (LDBL_MANT_DIG == 53)
461
+openlibm_weak_reference(lround, lroundl);
462
+#endif
463
diff -aur ./openlibm-0.8.3/src/s_modf.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_modf.c
464
--- ./openlibm-0.8.3/src/s_modf.c	2024-06-19 22:02:50.000000000 +0300
465
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_modf.c	2024-08-12 03:22:44.204450861 +0300
466
@@ -74,3 +74,7 @@
467
 	    }
468
 	}
469
 }
470
+
471
+#if (LDBL_MANT_DIG == 53)
472
+openlibm_weak_reference(modf, modfl);
473
+#endif
474
diff -aur ./openlibm-0.8.3/src/s_nearbyint.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_nearbyint.c
475
--- ./openlibm-0.8.3/src/s_nearbyint.c	2024-06-19 22:02:50.000000000 +0300
476
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_nearbyint.c	2024-08-12 03:22:44.204450861 +0300
477
@@ -54,3 +54,7 @@
478
 
479
 DECL(double, nearbyint, rint)
480
 DECL(float, nearbyintf, rintf)
481
+
482
+#if (LDBL_MANT_DIG == 53)
483
+openlibm_weak_reference(nearbyint, nearbyintl);
484
+#endif
485
diff -aur ./openlibm-0.8.3/src/s_round.c ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_round.c
486
--- ./openlibm-0.8.3/src/s_round.c	2024-06-19 22:02:50.000000000 +0300
487
+++ ../build/extbld/third_party/lib/OpenLibm/openlibm-0.8.3/src/s_round.c	2024-08-12 03:22:44.204450861 +0300
488
@@ -53,3 +53,7 @@
489
 		return (-t);
490
 	}
491
 }
492
+
493
+#if (LDBL_MANT_DIG == 53)
494
+openlibm_weak_reference(round, roundl);
495
+#endif
496

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.