Skip to content

Commit 0b3a89f

Browse files
[builtins] Avoid using long double in FreeBSD standalone environment (#76175)
After 05a4212 a number of long double related declarations are enabled in `int_types.h`, whenever the CPU architecture and platform support it. However, this does not work with FreeBSD's standalone environment, which disallows any use of floating point. In add98b2 this was made conditional with `CRT_HAS_FLOATING_POINT`, so extend the block guarded by that define to include all floating point related declarations.
1 parent eba2b78 commit 0b3a89f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

compiler-rt/lib/builtins/int_types.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ typedef union {
139139
udwords u;
140140
double f;
141141
} double_bits;
142-
#endif
143142

144143
typedef struct {
145144
#if _YUGA_LITTLE_ENDIAN
@@ -220,7 +219,6 @@ typedef union {
220219
#define CRT_HAS_TF_MODE
221220
#endif
222221

223-
#if CRT_HAS_FLOATING_POINT
224222
#if __STDC_VERSION__ >= 199901L
225223
typedef float _Complex Fcomplex;
226224
typedef double _Complex Dcomplex;
@@ -270,5 +268,5 @@ typedef struct {
270268
#define COMPLEXTF_IMAGINARY(x) (x).imaginary
271269
#endif
272270

273-
#endif
271+
#endif // CRT_HAS_FLOATING_POINT
274272
#endif // INT_TYPES_H

0 commit comments

Comments
 (0)