mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-30 00:31:08 +00:00
c38a4bfd59
With support for _Float128 functions on platforms where that type has the same ABI as long double, as well as on platforms where it is ABI-distinct, those functions will need to be exported from glibc's shared libraries at appropriate symbol versions in each case. This patch avoids duplication of lists of symbols to export by moving the symbols other than __* to math/Versions and stdlib/Versions. There, they are conditional on <float128-abi.h> defining FLOAT128_VERSION and a default version of that header is added that does not define that macro. Enabling the float128 function aliases will then include adding a sysdeps/ieee754/ldbl-128/float128-abi.h that defines FLOAT128_VERSION to GLIBC_2.27. Symbols __* remain in sysdeps/ieee754/float128/Versions; those symbols should be present only once per floating-point format, not once per type. Note that if any platforms currently lacking support for a type with binary128 format get glibc support for such a type in future (whether only as _Float128, or also as a new long double format), and new libm functions (present for all types) have been added by then, additional macros will be needed to allow such functions to get a version of the form "GLIBC_2.28 if the platform had _Float128 support by then, or the later version at which that platform had _Float128 support added". This is not however a preexisting condition, but would have applied equally to the existing support for _Float128 as an ABI-distinct type. New all-type libm functions should just be added to the appropriate symbol version (currently GLIBC_2.27) for all types, with such special-case handling for _Float128 versions (and _Float64x as well in future) waiting until someone actually wants to add support for _Float128 to an existing platform after a release in which that platform and a post-2.26 libm function had support but that platform lacked _Float128 support. Tested with build-many-glibcs.py that installed stripped shared libraries are unchanged by this patch. Also tested in conjunction with the remaining changes to enable float128 aliases. * sysdeps/generic/float128-abi.h: New file. * sysdeps/ieee754/float128/Versions (FLOAT128_VERSION): Move non-__prefixed symbols to .... * math/Versions: ... here. Include <float128-abi.h>. * stdlib/Versions ... and here. Include <float128-abi.h>
52 lines
1.0 KiB
Plaintext
52 lines
1.0 KiB
Plaintext
%include <float128-abi.h>
|
|
%ifndef FLOAT128_VERSION
|
|
% error "float128-abi.h must define FLOAT128_VERSION"
|
|
%endif
|
|
libc {
|
|
FLOAT128_VERSION {
|
|
__strtof128_internal;
|
|
__wcstof128_internal;
|
|
}
|
|
GLIBC_PRIVATE {
|
|
# For __nanf128.
|
|
__strtof128_nan;
|
|
}
|
|
}
|
|
libm {
|
|
FLOAT128_VERSION {
|
|
__acosf128_finite;
|
|
__acoshf128_finite;
|
|
__asinf128_finite;
|
|
__atan2f128_finite;
|
|
__atanhf128_finite;
|
|
__coshf128_finite;
|
|
__exp10f128_finite;
|
|
__exp2f128_finite;
|
|
__expf128_finite;
|
|
__finitef128;
|
|
__fmodf128_finite;
|
|
__fpclassifyf128;
|
|
__gammaf128_r_finite;
|
|
__hypotf128_finite;
|
|
__iseqsigf128;
|
|
__isinff128;
|
|
__isnanf128;
|
|
__issignalingf128;
|
|
__j0f128_finite;
|
|
__j1f128_finite;
|
|
__jnf128_finite;
|
|
__lgammaf128_r_finite;
|
|
__log10f128_finite;
|
|
__log2f128_finite;
|
|
__logf128_finite;
|
|
__powf128_finite;
|
|
__remainderf128_finite;
|
|
__signbitf128;
|
|
__sinhf128_finite;
|
|
__sqrtf128_finite;
|
|
__y0f128_finite;
|
|
__y1f128_finite;
|
|
__ynf128_finite;
|
|
}
|
|
}
|