* [PATCH v4 0/5] Improve libm.a static coverage @ 2024-05-21 16:52 Adhemerval Zanella 2024-05-21 16:52 ` [PATCH v4 1/5] math: Add support for auto static math tests Adhemerval Zanella ` (4 more replies) 0 siblings, 5 replies; 12+ messages in thread From: Adhemerval Zanella @ 2024-05-21 16:52 UTC (permalink / raw) To: libc-alpha; +Cc: H . J . Lu Some recent math optimizations removed some symbols from the static build and due to the limited static build check, along with --disable-shared being broken for some time [1], this issue has slipped some releases. Although the fix is straightforward, I added an extra framework to enable static build for math libraries using the generic type framework (which autogenerated the tests for all supported types using the C template files). I have not enabled it for all tests due to the required extra size constraint, this is done with a new define that can be used with make check (build-math-static-tests). As an experiment, I enabled static build for all autogenerated math tests. This has uncovered some extra missing symbols on some ABIs, along with some issues with implementation used on static for some ABIs. On x86_64/i686 it shows that the assembly optimizations for acos, log10, log2, and ldbl-96 y0/y1 show some issues: x86_64-linux-gnu$ grep ^FAIL math/subdir-tests.sum FAIL: math/test-float64x-acos-static FAIL: math/test-float64x-log10-static FAIL: math/test-float64x-log2-static FAIL: math/test-float64x-y0-static FAIL: math/test-float64x-y1-static FAIL: math/test-ldouble-acos-static FAIL: math/test-ldouble-log10-static FAIL: math/test-ldouble-log2-static FAIL: math/test-ldouble-y0-static FAIL: math/test-ldouble-y1-static i686-linux-gnu$ grep ^FAIL math/subdir-tests.sum FAIL: math/test-double-atanh-static FAIL: math/test-float-atanh-static FAIL: math/test-float32-atanh-static FAIL: math/test-float32x-atanh-static FAIL: math/test-float64-atanh-static FAIL: math/test-float64x-acos-static FAIL: math/test-float64x-acosh-static FAIL: math/test-float64x-atanh-static FAIL: math/test-float64x-log10-static FAIL: math/test-float64x-log2-static FAIL: math/test-float64x-y0-static FAIL: math/test-float64x-y1-static FAIL: math/test-ldouble-acos-static FAIL: math/test-ldouble-acosh-static FAIL: math/test-ldouble-atanh-static FAIL: math/test-ldouble-log10-static FAIL: math/test-ldouble-log2-static FAIL: math/test-ldouble-y0-static FAIL: math/test-ldouble-y1-static The powerpc64le also shows multiple issues with the static linking (using gcc 13.1): FAIL: math/test-float128-exp10-static FAIL: math/test-float64x-exp10-static FAIL: math/test-ibm128-acos-static FAIL: math/test-ibm128-copysign-static FAIL: math/test-ibm128-exp10-static FAIL: math/test-ibm128-fmod-static FAIL: math/test-ibm128-frexp-static FAIL: math/test-ibm128-modf-static [...] I have not analyzed what is happening, but it might be due to the '-mabi=ibmlongdouble' along with how libgcc.a was built (I saw some issues on GCC bugzilla). I also tested this patchset with build-math-static-tests=yes for all ABIs, and there is not more build failures. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=20845 Adhemerval Zanella (5): math: Add support for auto static math tests math: Fix isnanf128 static build (BZ 31774) math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 math: Provide frexpf128 for static libm on alpha, s390, and sparcv9 math: Provide modf128 for static libm on alpha, s390, and sparcv9 Makeconfig | 5 + Makefile.help | 4 + math/Makefile | 120 +++++++++++++++++++++- math/test-double-static.h | 1 + math/test-float-static.h | 1 + math/test-float128-static.h | 1 + math/test-float32-static.h | 1 + math/test-float32x-static.h | 1 + math/test-float64-static.h | 1 + math/test-float64x-static.h | 1 + math/test-ibm128-static.h | 1 + math/test-ldouble-static.h | 1 + sysdeps/ieee754/float128/s_isnanf128.c | 4 + sysdeps/ieee754/ldbl-64-128/s_copysignl.c | 4 +- sysdeps/ieee754/ldbl-64-128/s_frexpl.c | 4 +- sysdeps/ieee754/ldbl-64-128/s_modfl.c | 4 +- 16 files changed, 143 insertions(+), 11 deletions(-) create mode 100644 math/test-double-static.h create mode 100644 math/test-float-static.h create mode 100644 math/test-float128-static.h create mode 100644 math/test-float32-static.h create mode 100644 math/test-float32x-static.h create mode 100644 math/test-float64-static.h create mode 100644 math/test-float64x-static.h create mode 100644 math/test-ibm128-static.h create mode 100644 math/test-ldouble-static.h -- 2.43.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 1/5] math: Add support for auto static math tests 2024-05-21 16:52 [PATCH v4 0/5] Improve libm.a static coverage Adhemerval Zanella @ 2024-05-21 16:52 ` Adhemerval Zanella 2024-05-21 19:12 ` H.J. Lu 2024-05-21 16:52 ` [PATCH v4 2/5] math: Fix isnanf128 static build (BZ 31774) Adhemerval Zanella ` (3 subsequent siblings) 4 siblings, 1 reply; 12+ messages in thread From: Adhemerval Zanella @ 2024-05-21 16:52 UTC (permalink / raw) To: libc-alpha; +Cc: H . J . Lu It basically copy the already in place rules for dynamic tests for auto-generated math functions for all support types. To avoid the need to duplicate .inc files, a .SECONDEXPANSION rules is adeed for the gen-libm-test.py generation. New tests are added on the new rules 'libm-test-funcs-auto-static', 'libm-test-funcs-noauto-static', and 'libm-test-funcs-narrow-static'; similar to the non-static counterparts. To avoid add extra build and disk requirement, the new math static tests are only enable with a new define 'build-math-static-tests'. --- Makeconfig | 5 ++ Makefile.help | 4 ++ math/Makefile | 120 ++++++++++++++++++++++++++++++++++-- math/test-double-static.h | 1 + math/test-float-static.h | 1 + math/test-float128-static.h | 1 + math/test-float32-static.h | 1 + math/test-float32x-static.h | 1 + math/test-float64-static.h | 1 + math/test-float64x-static.h | 1 + math/test-ibm128-static.h | 1 + math/test-ldouble-static.h | 1 + 12 files changed, 133 insertions(+), 5 deletions(-) create mode 100644 math/test-double-static.h create mode 100644 math/test-float-static.h create mode 100644 math/test-float128-static.h create mode 100644 math/test-float32-static.h create mode 100644 math/test-float32x-static.h create mode 100644 math/test-float64-static.h create mode 100644 math/test-float64x-static.h create mode 100644 math/test-ibm128-static.h create mode 100644 math/test-ldouble-static.h diff --git a/Makeconfig b/Makeconfig index 9fe664ae3a..29819363da 100644 --- a/Makeconfig +++ b/Makeconfig @@ -768,6 +768,11 @@ run-built-tests = yes endif endif +# Whether to build the static math tests +ifndef build-math-static-tests +build-math-static-tests = no +endif + # Whether to stop immediately when a test fails. Nonempty means to # stop, empty means not to stop. ifndef stop-on-test-failure diff --git a/Makefile.help b/Makefile.help index b49df9c5c9..17e7154797 100644 --- a/Makefile.help +++ b/Makefile.help @@ -33,6 +33,10 @@ test Note that this will rebuild the test if needed, but will not rebuild what "make all" would have rebuilt. +build-math-static-tests + Enable extra math tests for static linking. Use like this: + make test t=math/test-float-exp10-static build-math-static-tests=yes + -- Other useful hints: diff --git a/math/Makefile b/math/Makefile index 36024a5039..58e5c070cf 100644 --- a/math/Makefile +++ b/math/Makefile @@ -593,8 +593,10 @@ endif libm-vec-tests = $(addprefix test-,$(libmvec-tests)) libm-test-support = $(foreach t,$(test-types),libm-test-support-$(t)) -test-extras += $(libm-test-support) -extra-test-objs += $(addsuffix .o, $(libm-test-support)) +libm-test-support-static = $(foreach t,$(test-types),libm-test-support-$(t)-static) +test-extras += $(libm-test-support) $(libm-test-support-static) +extra-test-objs += $(addsuffix .o, $(libm-test-support)) \ + $(addsuffix .o, $(libm-test-support-static)) libm-vec-test-wrappers = $(addsuffix -wrappers, $(libm-vec-tests)) test-extras += $(libm-vec-test-wrappers) extra-test-objs += $(addsuffix .o, $(libm-vec-test-wrappers)) @@ -664,12 +666,10 @@ libm-test-funcs-auto = \ y1 \ yn \ # libm-test-funcs-auto -libm-test-funcs-noauto = \ +libm-test-funcs-noauto-base = \ canonicalize \ ceil \ cimag \ - compat_totalorder \ - compat_totalordermag \ conj \ copysign \ cproj \ @@ -740,6 +740,11 @@ libm-test-funcs-noauto = \ trunc \ ufromfp \ ufromfpx \ + # libm-test-funcs-noauto-base +libm-test-funcs-noauto = \ + $(libm-test-funcs-noauto-base) \ + compat_totalorder \ + compat_totalordermag \ # libm-test-funcs-noauto libm-test-funcs-compat = \ compat_totalorder \ @@ -816,6 +821,71 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ $(make-target-directory) $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out$* -C $@ + +libm-test-funcs-auto-static = \ + $(libm-test-funcs-auto) \ + # libm-test-funcs-auto-static +libm-test-funcs-noauto-static = \ + $(libm-test-funcs-noauto-base) \ + # libm-test-funcs-noauto-static +libm-test-funcs-narrow-static = \ + $(libm-test-funcs-narrow) \ + # libm-test-funcs-narrow-static +libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static) + +libm-test-c-auto-static = $(foreach f,$(libm-test-funcs-auto-static),libm-test-$(f)-static.c) +libm-test-c-noauto-static = $(foreach f,$(libm-test-funcs-noauto-static),libm-test-$(f)-static.c) +libm-test-c-narrow-static = $(foreach f,$(libm-test-funcs-narrow-static),\ + libm-test-narrow-$(f)-static.c) +generated += $(libm-test-c-auto-static) $(libm-test-c-noauto-static) $(libm-test-c-narrow-static) + +libm-tests-normal-static = $(foreach t,$(libm-tests-base-normal),\ + $(foreach f,$(libm-test-funcs-all-static),\ + $(t)-$(f)-static)) +libm-tests-narrow-static = $(foreach t,$(libm-tests-base-narrow-static),\ + $(foreach f,$(libm-test-funcs-narrow-static),\ + $(t)-$(f)-static)) +libm-tests-vector-static = $(foreach t,$(libmvec-tests-static),\ + $(foreach f,$($(t)-funcs),test-$(t)-$(f)-static)) +libm-tests-static = $(libm-tests-normal-static) $(libm-tests-narrow-static) $(libm-tests-vector-static) +libm-tests-for-type-static = $(foreach f,$(libm-test-funcs-all-static),\ + test-$(1)-$(f)-static test-i$(1)-$(f)-static) \ + $(filter test-$(1)-%,$(libm-tests-vector-static) \ + $(libm-tests-narrow-static)) + +libm-tests.o += $(addsuffix .o,$(libm-tests-static)) + +ifeq ($(build-math-static-tests),yes) +tests-static += $(libm-tests-static) +generated += $(addsuffix .c,$(libm-tests)) \ + $(foreach t,$(test-types),libm-test-support-$(t)-static.c) +endif + +libm-test-c-auto-obj-static = $(addprefix $(objpfx),$(libm-test-c-auto-static)) +libm-test-c-noauto-obj-static = $(addprefix $(objpfx),$(libm-test-c-noauto-static)) +libm-test-c-narrow-obj-static = $(addprefix $(objpfx),$(libm-test-c-narrow-static)) + +# Use the same input test definitions for both dynamic and static tests. +.SECONDEXPANSION: +$(libm-test-c-noauto-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ + gen-libm-test.py + $(make-target-directory) + $(PYTHON) gen-libm-test.py -c $< -a /dev/null -C $@ + +.SECONDEXPANSION: +$(libm-test-c-auto-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ + gen-libm-test.py \ + auto-libm-test-out$$(subst -static,,%) + $(make-target-directory) + $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out`echo $* | sed 's/-static//'` -C $@ + +.SECONDEXPANSION: +$(libm-test-c-narrow-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ + gen-libm-test.py \ + auto-libm-test-out$$(subst -static,,%) + $(make-target-directory) + $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out`echo $* | sed 's/-static//'` -C $@ + # Tests for totalorder compat symbols reuse the table of tests as # processed by gen-libm-test.py, so add dependencies on the generated # .c files. @@ -1044,6 +1114,18 @@ $(foreach t,$(libm-tests-normal),$(objpfx)$(t).c): $(objpfx)test-%.c: echo "#include <libm-test-$$func.c>"; \ ) > $@ +$(foreach t,$(libm-tests-normal-static),$(objpfx)$(t).c): $(objpfx)test-%.c: + type_func=$*; \ + type=$${type_func%%-*}; \ + func=$${type_func#*-}; \ + ( \ + echo "#include <test-$$type.h>"; \ + echo "#include <test-math-exceptions.h>"; \ + echo "#include <test-math-errno.h>"; \ + echo "#include <test-math-scalar.h>"; \ + echo "#include <libm-test-$$func.c>"; \ + ) > $@ + $(foreach t,$(libm-tests-narrow),$(objpfx)$(t).c): $(objpfx)test-%.c: type_pair_func=$*; \ type_pair=$${type_pair_func%-*}; \ @@ -1078,6 +1160,13 @@ $(foreach t,$(test-types),\ echo "#include <libm-test-support.c>"; \ ) > $@ +$(foreach t,$(test-types),\ + $(objpfx)libm-test-support-$(t)-static.c): $(objpfx)libm-test-support-%.c: + ( \ + echo "#include <test-$*.h>"; \ + echo "#include <libm-test-support.c>"; \ + ) > $@ + $(addprefix $(objpfx), $(libm-tests.o)): $(objpfx)libm-test-ulps.h define o-iterator-doit @@ -1087,6 +1176,13 @@ endef object-suffixes-left := $(libm-tests-base) include $(o-iterator) +define o-iterator-doit +$(foreach f,$(libm-test-funcs-all-static),\ + $(objpfx)$(o)-$(f)-static.o): $(objpfx)$(o)%.o: $(objpfx)libm-test%.c +endef +object-suffixes-left := $(libm-tests-base) +include $(o-iterator) + define o-iterator-doit $(foreach f,$(libm-test-funcs-narrow),\ $(objpfx)$(o)-$(f).o): $(objpfx)$(o)%.o: \ @@ -1102,6 +1198,13 @@ endef object-suffixes-left := $(libm-tests-base-normal) include $(o-iterator) +define o-iterator-doit +$(foreach f,$(libm-test-funcs-all-static),\ + $(objpfx)$(o)-$(f)-static.o): CFLAGS += $(libm-test-no-inline-cflags) +endef +object-suffixes-left := $(libm-tests-base-normal) +include $(o-iterator) + define o-iterator-doit $(foreach f,$(libm-test-funcs-narrow),\ $(objpfx)$(o)-$(f).o): CFLAGS += $(libm-test-no-inline-cflags) @@ -1123,6 +1226,13 @@ endef object-suffixes-left := $(test-types) include $(o-iterator) +define o-iterator-doit +$(addprefix $(objpfx),\ + $(call libm-tests-for-type-static,$(o))): $(objpfx)libm-test-support-$(o)-static.o +endef +object-suffixes-left := $(test-types) +include $(o-iterator) + define o-iterator-doit $(objpfx)libm-test-support-$(o).o: CFLAGS += $(libm-test-no-inline-cflags) endef diff --git a/math/test-double-static.h b/math/test-double-static.h new file mode 100644 index 0000000000..d53f46819f --- /dev/null +++ b/math/test-double-static.h @@ -0,0 +1 @@ +#include "test-double.h" diff --git a/math/test-float-static.h b/math/test-float-static.h new file mode 100644 index 0000000000..7834c9e1f1 --- /dev/null +++ b/math/test-float-static.h @@ -0,0 +1 @@ +#include "test-float.h" diff --git a/math/test-float128-static.h b/math/test-float128-static.h new file mode 100644 index 0000000000..5f8206456a --- /dev/null +++ b/math/test-float128-static.h @@ -0,0 +1 @@ +#include "test-float128.h" diff --git a/math/test-float32-static.h b/math/test-float32-static.h new file mode 100644 index 0000000000..2df27d1ca0 --- /dev/null +++ b/math/test-float32-static.h @@ -0,0 +1 @@ +#include "test-float32.h" diff --git a/math/test-float32x-static.h b/math/test-float32x-static.h new file mode 100644 index 0000000000..62f78b49d8 --- /dev/null +++ b/math/test-float32x-static.h @@ -0,0 +1 @@ +#include "test-float32x.h" diff --git a/math/test-float64-static.h b/math/test-float64-static.h new file mode 100644 index 0000000000..807c174df1 --- /dev/null +++ b/math/test-float64-static.h @@ -0,0 +1 @@ +#include "test-float64.h" diff --git a/math/test-float64x-static.h b/math/test-float64x-static.h new file mode 100644 index 0000000000..a7801dbc10 --- /dev/null +++ b/math/test-float64x-static.h @@ -0,0 +1 @@ +#include "test-float64x.h" diff --git a/math/test-ibm128-static.h b/math/test-ibm128-static.h new file mode 100644 index 0000000000..b66a57050b --- /dev/null +++ b/math/test-ibm128-static.h @@ -0,0 +1 @@ +#include "test-ibm128.h" diff --git a/math/test-ldouble-static.h b/math/test-ldouble-static.h new file mode 100644 index 0000000000..beabedb817 --- /dev/null +++ b/math/test-ldouble-static.h @@ -0,0 +1 @@ +#include "test-ldouble.h" -- 2.43.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v4 1/5] math: Add support for auto static math tests 2024-05-21 16:52 ` [PATCH v4 1/5] math: Add support for auto static math tests Adhemerval Zanella @ 2024-05-21 19:12 ` H.J. Lu 0 siblings, 0 replies; 12+ messages in thread From: H.J. Lu @ 2024-05-21 19:12 UTC (permalink / raw) To: Adhemerval Zanella; +Cc: libc-alpha On Tue, May 21, 2024 at 9:54 AM Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > > It basically copy the already in place rules for dynamic tests for > auto-generated math functions for all support types. To avoid the > need to duplicate .inc files, a .SECONDEXPANSION rules is adeed for > the gen-libm-test.py generation. > > New tests are added on the new rules 'libm-test-funcs-auto-static', > 'libm-test-funcs-noauto-static', and 'libm-test-funcs-narrow-static'; > similar to the non-static counterparts. > > To avoid add extra build and disk requirement, the new math static > tests are only enable with a new define 'build-math-static-tests'. > --- > Makeconfig | 5 ++ > Makefile.help | 4 ++ > math/Makefile | 120 ++++++++++++++++++++++++++++++++++-- > math/test-double-static.h | 1 + > math/test-float-static.h | 1 + > math/test-float128-static.h | 1 + > math/test-float32-static.h | 1 + > math/test-float32x-static.h | 1 + > math/test-float64-static.h | 1 + > math/test-float64x-static.h | 1 + > math/test-ibm128-static.h | 1 + > math/test-ldouble-static.h | 1 + > 12 files changed, 133 insertions(+), 5 deletions(-) > create mode 100644 math/test-double-static.h > create mode 100644 math/test-float-static.h > create mode 100644 math/test-float128-static.h > create mode 100644 math/test-float32-static.h > create mode 100644 math/test-float32x-static.h > create mode 100644 math/test-float64-static.h > create mode 100644 math/test-float64x-static.h > create mode 100644 math/test-ibm128-static.h > create mode 100644 math/test-ldouble-static.h > > diff --git a/Makeconfig b/Makeconfig > index 9fe664ae3a..29819363da 100644 > --- a/Makeconfig > +++ b/Makeconfig > @@ -768,6 +768,11 @@ run-built-tests = yes > endif > endif > > +# Whether to build the static math tests > +ifndef build-math-static-tests > +build-math-static-tests = no > +endif > + > # Whether to stop immediately when a test fails. Nonempty means to > # stop, empty means not to stop. > ifndef stop-on-test-failure > diff --git a/Makefile.help b/Makefile.help > index b49df9c5c9..17e7154797 100644 > --- a/Makefile.help > +++ b/Makefile.help > @@ -33,6 +33,10 @@ test > Note that this will rebuild the test if needed, but will not > rebuild what "make all" would have rebuilt. > > +build-math-static-tests > + Enable extra math tests for static linking. Use like this: > + make test t=math/test-float-exp10-static build-math-static-tests=yes > + > -- > Other useful hints: > > diff --git a/math/Makefile b/math/Makefile > index 36024a5039..58e5c070cf 100644 > --- a/math/Makefile > +++ b/math/Makefile > @@ -593,8 +593,10 @@ endif > > libm-vec-tests = $(addprefix test-,$(libmvec-tests)) > libm-test-support = $(foreach t,$(test-types),libm-test-support-$(t)) > -test-extras += $(libm-test-support) > -extra-test-objs += $(addsuffix .o, $(libm-test-support)) > +libm-test-support-static = $(foreach t,$(test-types),libm-test-support-$(t)-static) > +test-extras += $(libm-test-support) $(libm-test-support-static) > +extra-test-objs += $(addsuffix .o, $(libm-test-support)) \ > + $(addsuffix .o, $(libm-test-support-static)) > libm-vec-test-wrappers = $(addsuffix -wrappers, $(libm-vec-tests)) > test-extras += $(libm-vec-test-wrappers) > extra-test-objs += $(addsuffix .o, $(libm-vec-test-wrappers)) > @@ -664,12 +666,10 @@ libm-test-funcs-auto = \ > y1 \ > yn \ > # libm-test-funcs-auto > -libm-test-funcs-noauto = \ > +libm-test-funcs-noauto-base = \ > canonicalize \ > ceil \ > cimag \ > - compat_totalorder \ > - compat_totalordermag \ > conj \ > copysign \ > cproj \ > @@ -740,6 +740,11 @@ libm-test-funcs-noauto = \ > trunc \ > ufromfp \ > ufromfpx \ > + # libm-test-funcs-noauto-base > +libm-test-funcs-noauto = \ > + $(libm-test-funcs-noauto-base) \ > + compat_totalorder \ > + compat_totalordermag \ > # libm-test-funcs-noauto > libm-test-funcs-compat = \ > compat_totalorder \ > @@ -816,6 +821,71 @@ $(libm-test-c-narrow-obj): $(objpfx)libm-test%.c: libm-test%.inc \ > $(make-target-directory) > $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out$* -C $@ > > + > +libm-test-funcs-auto-static = \ > + $(libm-test-funcs-auto) \ > + # libm-test-funcs-auto-static > +libm-test-funcs-noauto-static = \ > + $(libm-test-funcs-noauto-base) \ > + # libm-test-funcs-noauto-static > +libm-test-funcs-narrow-static = \ > + $(libm-test-funcs-narrow) \ > + # libm-test-funcs-narrow-static > +libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static) > + > +libm-test-c-auto-static = $(foreach f,$(libm-test-funcs-auto-static),libm-test-$(f)-static.c) > +libm-test-c-noauto-static = $(foreach f,$(libm-test-funcs-noauto-static),libm-test-$(f)-static.c) > +libm-test-c-narrow-static = $(foreach f,$(libm-test-funcs-narrow-static),\ > + libm-test-narrow-$(f)-static.c) > +generated += $(libm-test-c-auto-static) $(libm-test-c-noauto-static) $(libm-test-c-narrow-static) > + > +libm-tests-normal-static = $(foreach t,$(libm-tests-base-normal),\ > + $(foreach f,$(libm-test-funcs-all-static),\ > + $(t)-$(f)-static)) > +libm-tests-narrow-static = $(foreach t,$(libm-tests-base-narrow-static),\ > + $(foreach f,$(libm-test-funcs-narrow-static),\ > + $(t)-$(f)-static)) > +libm-tests-vector-static = $(foreach t,$(libmvec-tests-static),\ > + $(foreach f,$($(t)-funcs),test-$(t)-$(f)-static)) > +libm-tests-static = $(libm-tests-normal-static) $(libm-tests-narrow-static) $(libm-tests-vector-static) > +libm-tests-for-type-static = $(foreach f,$(libm-test-funcs-all-static),\ > + test-$(1)-$(f)-static test-i$(1)-$(f)-static) \ > + $(filter test-$(1)-%,$(libm-tests-vector-static) \ > + $(libm-tests-narrow-static)) > + > +libm-tests.o += $(addsuffix .o,$(libm-tests-static)) > + > +ifeq ($(build-math-static-tests),yes) > +tests-static += $(libm-tests-static) > +generated += $(addsuffix .c,$(libm-tests)) \ > + $(foreach t,$(test-types),libm-test-support-$(t)-static.c) > +endif > + > +libm-test-c-auto-obj-static = $(addprefix $(objpfx),$(libm-test-c-auto-static)) > +libm-test-c-noauto-obj-static = $(addprefix $(objpfx),$(libm-test-c-noauto-static)) > +libm-test-c-narrow-obj-static = $(addprefix $(objpfx),$(libm-test-c-narrow-static)) > + > +# Use the same input test definitions for both dynamic and static tests. > +.SECONDEXPANSION: > +$(libm-test-c-noauto-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ > + gen-libm-test.py > + $(make-target-directory) > + $(PYTHON) gen-libm-test.py -c $< -a /dev/null -C $@ > + > +.SECONDEXPANSION: > +$(libm-test-c-auto-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ > + gen-libm-test.py \ > + auto-libm-test-out$$(subst -static,,%) > + $(make-target-directory) > + $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out`echo $* | sed 's/-static//'` -C $@ > + > +.SECONDEXPANSION: > +$(libm-test-c-narrow-obj-static): $(objpfx)libm-test%.c: libm-test$$(subst -static,,%).inc \ > + gen-libm-test.py \ > + auto-libm-test-out$$(subst -static,,%) > + $(make-target-directory) > + $(PYTHON) gen-libm-test.py -c $< -a auto-libm-test-out`echo $* | sed 's/-static//'` -C $@ > + > # Tests for totalorder compat symbols reuse the table of tests as > # processed by gen-libm-test.py, so add dependencies on the generated > # .c files. > @@ -1044,6 +1114,18 @@ $(foreach t,$(libm-tests-normal),$(objpfx)$(t).c): $(objpfx)test-%.c: > echo "#include <libm-test-$$func.c>"; \ > ) > $@ > > +$(foreach t,$(libm-tests-normal-static),$(objpfx)$(t).c): $(objpfx)test-%.c: > + type_func=$*; \ > + type=$${type_func%%-*}; \ > + func=$${type_func#*-}; \ > + ( \ > + echo "#include <test-$$type.h>"; \ > + echo "#include <test-math-exceptions.h>"; \ > + echo "#include <test-math-errno.h>"; \ > + echo "#include <test-math-scalar.h>"; \ > + echo "#include <libm-test-$$func.c>"; \ > + ) > $@ > + > $(foreach t,$(libm-tests-narrow),$(objpfx)$(t).c): $(objpfx)test-%.c: > type_pair_func=$*; \ > type_pair=$${type_pair_func%-*}; \ > @@ -1078,6 +1160,13 @@ $(foreach t,$(test-types),\ > echo "#include <libm-test-support.c>"; \ > ) > $@ > > +$(foreach t,$(test-types),\ > + $(objpfx)libm-test-support-$(t)-static.c): $(objpfx)libm-test-support-%.c: > + ( \ > + echo "#include <test-$*.h>"; \ > + echo "#include <libm-test-support.c>"; \ > + ) > $@ > + > $(addprefix $(objpfx), $(libm-tests.o)): $(objpfx)libm-test-ulps.h > > define o-iterator-doit > @@ -1087,6 +1176,13 @@ endef > object-suffixes-left := $(libm-tests-base) > include $(o-iterator) > > +define o-iterator-doit > +$(foreach f,$(libm-test-funcs-all-static),\ > + $(objpfx)$(o)-$(f)-static.o): $(objpfx)$(o)%.o: $(objpfx)libm-test%.c > +endef > +object-suffixes-left := $(libm-tests-base) > +include $(o-iterator) > + > define o-iterator-doit > $(foreach f,$(libm-test-funcs-narrow),\ > $(objpfx)$(o)-$(f).o): $(objpfx)$(o)%.o: \ > @@ -1102,6 +1198,13 @@ endef > object-suffixes-left := $(libm-tests-base-normal) > include $(o-iterator) > > +define o-iterator-doit > +$(foreach f,$(libm-test-funcs-all-static),\ > + $(objpfx)$(o)-$(f)-static.o): CFLAGS += $(libm-test-no-inline-cflags) > +endef > +object-suffixes-left := $(libm-tests-base-normal) > +include $(o-iterator) > + > define o-iterator-doit > $(foreach f,$(libm-test-funcs-narrow),\ > $(objpfx)$(o)-$(f).o): CFLAGS += $(libm-test-no-inline-cflags) > @@ -1123,6 +1226,13 @@ endef > object-suffixes-left := $(test-types) > include $(o-iterator) > > +define o-iterator-doit > +$(addprefix $(objpfx),\ > + $(call libm-tests-for-type-static,$(o))): $(objpfx)libm-test-support-$(o)-static.o > +endef > +object-suffixes-left := $(test-types) > +include $(o-iterator) > + > define o-iterator-doit > $(objpfx)libm-test-support-$(o).o: CFLAGS += $(libm-test-no-inline-cflags) > endef > diff --git a/math/test-double-static.h b/math/test-double-static.h > new file mode 100644 > index 0000000000..d53f46819f > --- /dev/null > +++ b/math/test-double-static.h > @@ -0,0 +1 @@ > +#include "test-double.h" > diff --git a/math/test-float-static.h b/math/test-float-static.h > new file mode 100644 > index 0000000000..7834c9e1f1 > --- /dev/null > +++ b/math/test-float-static.h > @@ -0,0 +1 @@ > +#include "test-float.h" > diff --git a/math/test-float128-static.h b/math/test-float128-static.h > new file mode 100644 > index 0000000000..5f8206456a > --- /dev/null > +++ b/math/test-float128-static.h > @@ -0,0 +1 @@ > +#include "test-float128.h" > diff --git a/math/test-float32-static.h b/math/test-float32-static.h > new file mode 100644 > index 0000000000..2df27d1ca0 > --- /dev/null > +++ b/math/test-float32-static.h > @@ -0,0 +1 @@ > +#include "test-float32.h" > diff --git a/math/test-float32x-static.h b/math/test-float32x-static.h > new file mode 100644 > index 0000000000..62f78b49d8 > --- /dev/null > +++ b/math/test-float32x-static.h > @@ -0,0 +1 @@ > +#include "test-float32x.h" > diff --git a/math/test-float64-static.h b/math/test-float64-static.h > new file mode 100644 > index 0000000000..807c174df1 > --- /dev/null > +++ b/math/test-float64-static.h > @@ -0,0 +1 @@ > +#include "test-float64.h" > diff --git a/math/test-float64x-static.h b/math/test-float64x-static.h > new file mode 100644 > index 0000000000..a7801dbc10 > --- /dev/null > +++ b/math/test-float64x-static.h > @@ -0,0 +1 @@ > +#include "test-float64x.h" > diff --git a/math/test-ibm128-static.h b/math/test-ibm128-static.h > new file mode 100644 > index 0000000000..b66a57050b > --- /dev/null > +++ b/math/test-ibm128-static.h > @@ -0,0 +1 @@ > +#include "test-ibm128.h" > diff --git a/math/test-ldouble-static.h b/math/test-ldouble-static.h > new file mode 100644 > index 0000000000..beabedb817 > --- /dev/null > +++ b/math/test-ldouble-static.h > @@ -0,0 +1 @@ > +#include "test-ldouble.h" > -- > 2.43.0 > LGTM. Reviewed-by: H.J. Lu <hjl.tools@gmail.com> Thanks. -- H.J. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 2/5] math: Fix isnanf128 static build (BZ 31774) 2024-05-21 16:52 [PATCH v4 0/5] Improve libm.a static coverage Adhemerval Zanella 2024-05-21 16:52 ` [PATCH v4 1/5] math: Add support for auto static math tests Adhemerval Zanella @ 2024-05-21 16:52 ` Adhemerval Zanella 2024-05-21 17:32 ` H.J. Lu 2024-05-21 16:52 ` [PATCH v4 3/5] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 Adhemerval Zanella ` (2 subsequent siblings) 4 siblings, 1 reply; 12+ messages in thread From: Adhemerval Zanella @ 2024-05-21 16:52 UTC (permalink / raw) To: libc-alpha; +Cc: H . J . Lu Some static implementation of float128 routines might call __isnanf128, which is not provided by the static object. Checked on x86_64-linux-gnu. --- sysdeps/ieee754/float128/s_isnanf128.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sysdeps/ieee754/float128/s_isnanf128.c b/sysdeps/ieee754/float128/s_isnanf128.c index 59f71533ce..b73a4e80d7 100644 --- a/sysdeps/ieee754/float128/s_isnanf128.c +++ b/sysdeps/ieee754/float128/s_isnanf128.c @@ -11,7 +11,11 @@ #include "../ldbl-128/s_isnanl.c" #if !IS_IN (libm) #include <float128-abi.h> +#ifdef SHARED hidden_ver (__isnanf128_impl, __isnanf128) +#else +strong_alias (__isnanf128_impl, __isnanf128) +#endif _weak_alias (__isnanf128_impl, isnanl) versioned_symbol (libc, __isnanf128_impl, __isnanf128, GLIBC_2_34); #if (SHLIB_COMPAT (libc, FLOAT128_VERSION_M, GLIBC_2_34)) -- 2.43.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v4 2/5] math: Fix isnanf128 static build (BZ 31774) 2024-05-21 16:52 ` [PATCH v4 2/5] math: Fix isnanf128 static build (BZ 31774) Adhemerval Zanella @ 2024-05-21 17:32 ` H.J. Lu 0 siblings, 0 replies; 12+ messages in thread From: H.J. Lu @ 2024-05-21 17:32 UTC (permalink / raw) To: Adhemerval Zanella; +Cc: libc-alpha On Tue, May 21, 2024 at 9:54 AM Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > > Some static implementation of float128 routines might call __isnanf128, > which is not provided by the static object. > > Checked on x86_64-linux-gnu. > --- > sysdeps/ieee754/float128/s_isnanf128.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/sysdeps/ieee754/float128/s_isnanf128.c b/sysdeps/ieee754/float128/s_isnanf128.c > index 59f71533ce..b73a4e80d7 100644 > --- a/sysdeps/ieee754/float128/s_isnanf128.c > +++ b/sysdeps/ieee754/float128/s_isnanf128.c > @@ -11,7 +11,11 @@ > #include "../ldbl-128/s_isnanl.c" > #if !IS_IN (libm) > #include <float128-abi.h> > +#ifdef SHARED > hidden_ver (__isnanf128_impl, __isnanf128) > +#else > +strong_alias (__isnanf128_impl, __isnanf128) > +#endif > _weak_alias (__isnanf128_impl, isnanl) > versioned_symbol (libc, __isnanf128_impl, __isnanf128, GLIBC_2_34); > #if (SHLIB_COMPAT (libc, FLOAT128_VERSION_M, GLIBC_2_34)) > -- > 2.43.0 > LGTM. Reviewed-by: H.J. Lu <hjl.tools@gmail.com> Thanks. -- H.J. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 3/5] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 2024-05-21 16:52 [PATCH v4 0/5] Improve libm.a static coverage Adhemerval Zanella 2024-05-21 16:52 ` [PATCH v4 1/5] math: Add support for auto static math tests Adhemerval Zanella 2024-05-21 16:52 ` [PATCH v4 2/5] math: Fix isnanf128 static build (BZ 31774) Adhemerval Zanella @ 2024-05-21 16:52 ` Adhemerval Zanella 2024-05-21 17:34 ` H.J. Lu 2024-05-21 16:52 ` [PATCH v4 4/5] math: Provide frexpf128 " Adhemerval Zanella 2024-05-21 16:52 ` [PATCH v4 5/5] math: Provide modf128 " Adhemerval Zanella 4 siblings, 1 reply; 12+ messages in thread From: Adhemerval Zanella @ 2024-05-21 16:52 UTC (permalink / raw) To: libc-alpha; +Cc: H . J . Lu Checked with a static build for the affected ABIs. --- sysdeps/ieee754/ldbl-64-128/s_copysignl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c index 11b42d04ba..80137847d3 100644 --- a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c +++ b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c @@ -1,10 +1,10 @@ #include <math_ldbl_opt.h> #include <libm-alias-ldouble.h> -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # undef libm_alias_ldouble # define libm_alias_ldouble(from, to) #endif #include <sysdeps/ieee754/ldbl-128/s_copysignl.c> -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __copysignl, copysignl); #endif -- 2.43.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v4 3/5] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 2024-05-21 16:52 ` [PATCH v4 3/5] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 Adhemerval Zanella @ 2024-05-21 17:34 ` H.J. Lu 2024-05-21 19:52 ` Adhemerval Zanella Netto 0 siblings, 1 reply; 12+ messages in thread From: H.J. Lu @ 2024-05-21 17:34 UTC (permalink / raw) To: Adhemerval Zanella; +Cc: libc-alpha On Tue, May 21, 2024 at 9:54 AM Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > > Checked with a static build for the affected ABIs. > --- > sysdeps/ieee754/ldbl-64-128/s_copysignl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c > index 11b42d04ba..80137847d3 100644 > --- a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c > +++ b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c > @@ -1,10 +1,10 @@ > #include <math_ldbl_opt.h> > #include <libm-alias-ldouble.h> > -#if IS_IN (libc) > +#if IS_IN (libc) && defined SHARED > # undef libm_alias_ldouble > # define libm_alias_ldouble(from, to) > #endif > #include <sysdeps/ieee754/ldbl-128/s_copysignl.c> > -#if IS_IN (libc) > +#if IS_IN (libc) && defined SHARED > long_double_symbol (libc, __copysignl, copysignl); > #endif > -- > 2.43.0 > I think you should combine copysignf128, frexpf128, modff128 patches and also fix scalbnf128 in a single patch for: https://sourceware.org/bugzilla/show_bug.cgi?id=31781 -- H.J. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v4 3/5] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 2024-05-21 17:34 ` H.J. Lu @ 2024-05-21 19:52 ` Adhemerval Zanella Netto 2024-05-21 20:05 ` H.J. Lu 0 siblings, 1 reply; 12+ messages in thread From: Adhemerval Zanella Netto @ 2024-05-21 19:52 UTC (permalink / raw) To: H.J. Lu; +Cc: libc-alpha On 21/05/24 14:34, H.J. Lu wrote: > On Tue, May 21, 2024 at 9:54 AM Adhemerval Zanella > <adhemerval.zanella@linaro.org> wrote: >> >> Checked with a static build for the affected ABIs. >> --- >> sysdeps/ieee754/ldbl-64-128/s_copysignl.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c >> index 11b42d04ba..80137847d3 100644 >> --- a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c >> +++ b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c >> @@ -1,10 +1,10 @@ >> #include <math_ldbl_opt.h> >> #include <libm-alias-ldouble.h> >> -#if IS_IN (libc) >> +#if IS_IN (libc) && defined SHARED >> # undef libm_alias_ldouble >> # define libm_alias_ldouble(from, to) >> #endif >> #include <sysdeps/ieee754/ldbl-128/s_copysignl.c> >> -#if IS_IN (libc) >> +#if IS_IN (libc) && defined SHARED >> long_double_symbol (libc, __copysignl, copysignl); >> #endif >> -- >> 2.43.0 >> > > I think you should combine copysignf128, frexpf128, modff128 patches > and also fix scalbnf128 in a single patch for: > > https://sourceware.org/bugzilla/show_bug.cgi?id=31781 > Ack, although scalbnf128 is already exported by libc.a. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v4 3/5] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 2024-05-21 19:52 ` Adhemerval Zanella Netto @ 2024-05-21 20:05 ` H.J. Lu 0 siblings, 0 replies; 12+ messages in thread From: H.J. Lu @ 2024-05-21 20:05 UTC (permalink / raw) To: Adhemerval Zanella Netto; +Cc: libc-alpha On Tue, May 21, 2024 at 12:52 PM Adhemerval Zanella Netto <adhemerval.zanella@linaro.org> wrote: > > > > On 21/05/24 14:34, H.J. Lu wrote: > > On Tue, May 21, 2024 at 9:54 AM Adhemerval Zanella > > <adhemerval.zanella@linaro.org> wrote: > >> > >> Checked with a static build for the affected ABIs. > >> --- > >> sysdeps/ieee754/ldbl-64-128/s_copysignl.c | 4 ++-- > >> 1 file changed, 2 insertions(+), 2 deletions(-) > >> > >> diff --git a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c > >> index 11b42d04ba..80137847d3 100644 > >> --- a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c > >> +++ b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c > >> @@ -1,10 +1,10 @@ > >> #include <math_ldbl_opt.h> > >> #include <libm-alias-ldouble.h> > >> -#if IS_IN (libc) > >> +#if IS_IN (libc) && defined SHARED > >> # undef libm_alias_ldouble > >> # define libm_alias_ldouble(from, to) > >> #endif > >> #include <sysdeps/ieee754/ldbl-128/s_copysignl.c> > >> -#if IS_IN (libc) > >> +#if IS_IN (libc) && defined SHARED > >> long_double_symbol (libc, __copysignl, copysignl); > >> #endif > >> -- > >> 2.43.0 > >> > > > > I think you should combine copysignf128, frexpf128, modff128 patches > > and also fix scalbnf128 in a single patch for: > > > > https://sourceware.org/bugzilla/show_bug.cgi?id=31781 > > > > Ack, although scalbnf128 is already exported by libc.a. The updated missing list is copysignf128 copysignf64x frexpf128 frexpf64x modff128 modff64x -- H.J. ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 4/5] math: Provide frexpf128 for static libm on alpha, s390, and sparcv9 2024-05-21 16:52 [PATCH v4 0/5] Improve libm.a static coverage Adhemerval Zanella ` (2 preceding siblings ...) 2024-05-21 16:52 ` [PATCH v4 3/5] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 Adhemerval Zanella @ 2024-05-21 16:52 ` Adhemerval Zanella 2024-05-21 16:52 ` [PATCH v4 5/5] math: Provide modf128 " Adhemerval Zanella 4 siblings, 0 replies; 12+ messages in thread From: Adhemerval Zanella @ 2024-05-21 16:52 UTC (permalink / raw) To: libc-alpha; +Cc: H . J . Lu hecked with a build for the affected ABIs. --- sysdeps/ieee754/ldbl-64-128/s_frexpl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c index 73ac41e40c..f5f7d349f7 100644 --- a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c +++ b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c @@ -1,10 +1,10 @@ #include <math_ldbl_opt.h> #include <libm-alias-ldouble.h> -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # undef libm_alias_ldouble # define libm_alias_ldouble(from, to) #endif #include <sysdeps/ieee754/ldbl-128/s_frexpl.c> -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __frexpl, frexpl); #endif -- 2.43.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v4 5/5] math: Provide modf128 for static libm on alpha, s390, and sparcv9 2024-05-21 16:52 [PATCH v4 0/5] Improve libm.a static coverage Adhemerval Zanella ` (3 preceding siblings ...) 2024-05-21 16:52 ` [PATCH v4 4/5] math: Provide frexpf128 " Adhemerval Zanella @ 2024-05-21 16:52 ` Adhemerval Zanella 2024-05-21 17:35 ` H.J. Lu 4 siblings, 1 reply; 12+ messages in thread From: Adhemerval Zanella @ 2024-05-21 16:52 UTC (permalink / raw) To: libc-alpha; +Cc: H . J . Lu Checked with a build for the affected ABIs --- sysdeps/ieee754/ldbl-64-128/s_modfl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sysdeps/ieee754/ldbl-64-128/s_modfl.c b/sysdeps/ieee754/ldbl-64-128/s_modfl.c index 7d7aeae111..ba3d31334a 100644 --- a/sysdeps/ieee754/ldbl-64-128/s_modfl.c +++ b/sysdeps/ieee754/ldbl-64-128/s_modfl.c @@ -1,10 +1,10 @@ #include <math_ldbl_opt.h> #include <libm-alias-ldouble.h> -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED # undef libm_alias_ldouble # define libm_alias_ldouble(from, to) #endif #include <sysdeps/ieee754/ldbl-128/s_modfl.c> -#if IS_IN (libc) +#if IS_IN (libc) && defined SHARED long_double_symbol (libc, __modfl, modfl); #endif -- 2.43.0 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v4 5/5] math: Provide modf128 for static libm on alpha, s390, and sparcv9 2024-05-21 16:52 ` [PATCH v4 5/5] math: Provide modf128 " Adhemerval Zanella @ 2024-05-21 17:35 ` H.J. Lu 0 siblings, 0 replies; 12+ messages in thread From: H.J. Lu @ 2024-05-21 17:35 UTC (permalink / raw) To: Adhemerval Zanella; +Cc: libc-alpha On Tue, May 21, 2024 at 9:54 AM Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > > Checked with a build for the affected ABIs BTW, it is modff128, not modf128. > --- > sysdeps/ieee754/ldbl-64-128/s_modfl.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/sysdeps/ieee754/ldbl-64-128/s_modfl.c b/sysdeps/ieee754/ldbl-64-128/s_modfl.c > index 7d7aeae111..ba3d31334a 100644 > --- a/sysdeps/ieee754/ldbl-64-128/s_modfl.c > +++ b/sysdeps/ieee754/ldbl-64-128/s_modfl.c > @@ -1,10 +1,10 @@ > #include <math_ldbl_opt.h> > #include <libm-alias-ldouble.h> > -#if IS_IN (libc) > +#if IS_IN (libc) && defined SHARED > # undef libm_alias_ldouble > # define libm_alias_ldouble(from, to) > #endif > #include <sysdeps/ieee754/ldbl-128/s_modfl.c> > -#if IS_IN (libc) > +#if IS_IN (libc) && defined SHARED > long_double_symbol (libc, __modfl, modfl); > #endif > -- > 2.43.0 > -- H.J. ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2024-05-21 20:05 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-05-21 16:52 [PATCH v4 0/5] Improve libm.a static coverage Adhemerval Zanella 2024-05-21 16:52 ` [PATCH v4 1/5] math: Add support for auto static math tests Adhemerval Zanella 2024-05-21 19:12 ` H.J. Lu 2024-05-21 16:52 ` [PATCH v4 2/5] math: Fix isnanf128 static build (BZ 31774) Adhemerval Zanella 2024-05-21 17:32 ` H.J. Lu 2024-05-21 16:52 ` [PATCH v4 3/5] math: Provided copysignf128 for static libm on alpha, s390, and sparcv9 Adhemerval Zanella 2024-05-21 17:34 ` H.J. Lu 2024-05-21 19:52 ` Adhemerval Zanella Netto 2024-05-21 20:05 ` H.J. Lu 2024-05-21 16:52 ` [PATCH v4 4/5] math: Provide frexpf128 " Adhemerval Zanella 2024-05-21 16:52 ` [PATCH v4 5/5] math: Provide modf128 " Adhemerval Zanella 2024-05-21 17:35 ` H.J. Lu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).