Skip to content

Commit 885f884

Browse files
committed
Compute all float data information at compile time, not config time
For multilib configurations which have varying sets of floating point data definitions that depend on the multilib configuration, don't attempt to discover any properties at build time. Instead, do all of that at compile time so that things can vary depending on the compiler options. Signed-off-by: Keith Packard <[email protected]>
1 parent f0ede8b commit 885f884

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

meson.build

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -145,30 +145,6 @@ long double test(void)
145145

146146
have_long_double = cc.compiles(long_double_code, name : 'long double check', args: core_c_args)
147147

148-
have_sizeof_float = cc.get_define('__SIZEOF_FLOAT__') != ''
149-
have_sizeof_double = cc.get_define('__SIZEOF_DOUBLE__') != ''
150-
have_sizeof_long_double = have_long_double and cc.get_define('__SIZEOF_LONG_DOUBLE__') != ''
151-
152-
set_double_equals_float = not have_sizeof_float or not have_sizeof_double
153-
154-
if set_double_equals_float
155-
float_double_code = '''
156-
char size_test[sizeof(float) == sizeof(double) ? 1 : -1];
157-
'''
158-
set_double_equals_float =
159-
double_equals_float = cc.compiles(float_double_code, name : 'double same as float', args : core_c_args)
160-
endif
161-
162-
set_long_double_equals_double = not have_sizeof_double or not have_sizeof_long_double
163-
164-
if set_long_double_equals_double
165-
long_double_size_code = '''
166-
#include <float.h>
167-
char size_test[sizeof(double) == sizeof(long double) ? 1 : -1];
168-
'''
169-
long_double_equals_double = cc.compiles(long_double_size_code, name : 'long double same as double', args: core_c_args)
170-
endif
171-
172148
enable_multilib = get_option('multilib')
173149
multilib_list = get_option('multilib-list')
174150
enable_picolib = get_option('picolib')
@@ -1259,14 +1235,6 @@ conf_data.set('_HAVE_NO_BUILTIN_ATTRIBUTE',
12591235

12601236
conf_data.set('_HAVE_LONG_DOUBLE', have_long_double,
12611237
description: 'Compiler has long double type')
1262-
if set_double_equals_float
1263-
conf_data.set('_DBL_EQ_FLT', double_equals_float,
1264-
description: 'double is the same as float')
1265-
endif
1266-
if set_long_double_equals_double
1267-
conf_data.set('_LDBL_EQ_DBL', long_double_equals_double,
1268-
description: 'long double is the same as double')
1269-
endif
12701238
conf_data.set('_HAVE_ALIAS_ATTRIBUTE', have_alias_attribute)
12711239
conf_data.set('_HAVE_FORMAT_ATTRIBUTE', have_format_attribute)
12721240
conf_data.set('_HAVE_WEAK_ATTRIBUTE', have_weak_attribute)

0 commit comments

Comments
 (0)