[PATCH 5/5] libm: Control errno support with _IEEE_LIBM configuration parameter

Corinna Vinschen vinschen@redhat.com
Wed Aug 5 20:43:10 GMT 2020


Hi Keith,

On Aug  4 15:22, Keith Packard via Newlib wrote:
> This removes the run-time configuration of errno support present in
> portions of the math library and unifies all of the compile-time errno
> configuration under a single parameter so that the whole library
> is consistent.
> 
> The run-time support provided by _LIB_VERSION is no longer present in
> the public API, although it is still used internally to disable errno
> setting in some functions. Now that it is a constant, the compiler should
> remove that code when errno is not supported.
> 
> This removes s_lib_ver.c as _LIB_VERSION is no longer variable.
> 
> Signed-off-by: Keith Packard <keithp@keithp.com>
> ---
> [...]
> diff --git a/newlib/libm/common/Makefile.am b/newlib/libm/common/Makefile.am
> index 1eef0236a..1d178da4d 100644
> --- a/newlib/libm/common/Makefile.am
> +++ b/newlib/libm/common/Makefile.am
> @@ -8,7 +8,7 @@ src = 	s_finite.c s_copysign.c s_modf.c s_scalbn.c \
>  	s_cbrt.c s_exp10.c s_expm1.c s_ilogb.c \
>  	s_infinity.c s_isinf.c s_isinfd.c s_isnan.c s_isnand.c \
>  	s_log1p.c s_nan.c s_nextafter.c s_pow10.c \
> -	s_rint.c s_logb.c s_log2.c s_lib_ver.c \
> +	s_rint.c s_logb.c s_log2.c \
>  	s_fdim.c s_fma.c s_fmax.c s_fmin.c s_fpclassify.c \
>  	s_lrint.c s_llrint.c \
>  	s_lround.c s_llround.c s_nearbyint.c s_remquo.c s_round.c s_scalbln.c \
> diff --git a/newlib/libm/common/Makefile.in b/newlib/libm/common/Makefile.in
> index 2caf7dd6c..b1098565f 100644
> --- a/newlib/libm/common/Makefile.in
> +++ b/newlib/libm/common/Makefile.in
> @@ -85,7 +85,6 @@ am__objects_1 = lib_a-s_finite.$(OBJEXT) lib_a-s_copysign.$(OBJEXT) \
>  	lib_a-s_nan.$(OBJEXT) lib_a-s_nextafter.$(OBJEXT) \
>  	lib_a-s_pow10.$(OBJEXT) lib_a-s_rint.$(OBJEXT) \
>  	lib_a-s_logb.$(OBJEXT) lib_a-s_log2.$(OBJEXT) \
> -	lib_a-s_lib_ver.$(OBJEXT) lib_a-s_fdim.$(OBJEXT) \

This accidentally removes lib_a-s_fdim.o, so building Cygwin fails.
Not much of a problem, though.  I pushed the series with regen'ed
newlib/libm/common/Makefile.in file.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat



More information about the Newlib mailing list