From 2080b236904af5d719b7beafe132cb807221abd2 Mon Sep 17 00:00:00 2001 From: gufe44 <56860520+gufe44@users.noreply.github.com> Date: Fri, 25 Oct 2019 18:32:47 +0200 Subject: [PATCH 1/4] NetBSD fix --- src/cdefs-compat.h | 24 +++++++++++++++--------- src/e_acos.c | 2 +- src/e_asin.c | 2 +- src/e_atan2.c | 2 +- src/e_hypot.c | 2 +- src/e_remainder.c | 2 +- src/e_sqrt.c | 2 +- src/s_atan.c | 2 +- src/s_cbrt.c | 2 +- src/s_ceil.c | 2 +- src/s_cos.c | 2 +- src/s_cproj.c | 2 +- src/s_csqrt.c | 2 +- src/s_exp2.c | 2 +- src/s_floor.c | 2 +- src/s_fma.c | 2 +- src/s_frexp.c | 2 +- src/s_isinf.c | 2 +- src/s_isnan.c | 2 +- src/s_logb.c | 2 +- src/s_nan.c | 2 +- src/s_nextafter.c | 6 +++--- src/s_remquo.c | 2 +- src/s_rint.c | 2 +- src/s_scalbn.c | 4 ++-- src/s_sin.c | 2 +- src/s_sincos.c | 2 +- src/s_tan.c | 2 +- src/s_trunc.c | 2 +- src/w_cabs.c | 2 +- 30 files changed, 47 insertions(+), 41 deletions(-) diff --git a/src/cdefs-compat.h b/src/cdefs-compat.h index 2b0bf87..6da89d7 100644 --- a/src/cdefs-compat.h +++ b/src/cdefs-compat.h @@ -14,7 +14,7 @@ #ifdef __GNUC__ #ifndef __strong_reference #ifdef __APPLE__ -#define __strong_reference(sym,aliassym) __weak_reference(sym,aliassym) +#define __strong_reference(sym,aliassym) __weak_reference_compat(sym,aliassym) #else #define __strong_reference(sym,aliassym) \ OLM_DLLEXPORT extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))); @@ -22,13 +22,19 @@ #endif /* __strong_reference */ #ifdef __wasm__ -# define __weak_reference(sym,alias) __strong_reference(sym,alias) +# define __weak_reference_compat(sym,alias) __strong_reference(sym,alias) #endif -#ifndef __weak_reference +#ifdef __weak_reference +#ifdef __NetBSD__ +#define __weak_reference_compat(sym,alias) __weak_reference(sym) +#else +#define __weak_reference_compat(sym,alias) __weak_reference(sym,alias) +#endif +#else #ifdef __ELF__ #ifdef __STDC__ -#define __weak_reference(sym,alias) \ +#define __weak_reference_compat(sym,alias) \ __asm__(".weak " #alias); \ __asm__(".equ " #alias ", " #sym) #ifndef __warn_references @@ -38,7 +44,7 @@ __asm__(".previous") #endif /* __warn_references */ #else -#define __weak_reference(sym,alias) \ +#define __weak_reference_compat(sym,alias) \ __asm__(".weak alias"); \ __asm__(".equ alias, sym") #ifndef __warn_references @@ -50,17 +56,17 @@ #endif /* __STDC__ */ #elif defined(__clang__) /* CLANG */ #ifdef __STDC__ -#define __weak_reference(sym,alias) \ +#define __weak_reference_compat(sym,alias) \ __asm__(".weak_reference " #alias); \ __asm__(".set " #alias ", " #sym) #else -#define __weak_reference(sym,alias) \ +#define __weak_referenc_compate(sym,alias) \ __asm__(".weak_reference alias");\ __asm__(".set alias, sym") #endif #else /* !__ELF__ */ #ifdef __STDC__ -#define __weak_reference(sym,alias) \ +#define __weak_reference_compat(sym,alias) \ __asm__(".stabs \"_" #alias "\",11,0,0,0"); \ __asm__(".stabs \"_" #sym "\",1,0,0,0") #ifndef __warn_references @@ -69,7 +75,7 @@ __asm__(".stabs \"_" #sym "\",1,0,0,0") #endif /* __warn_references */ #else -#define __weak_reference(sym,alias) \ +#define __weak_reference_compat(sym,alias) \ __asm__(".stabs \"_/**/alias\",11,0,0,0"); \ __asm__(".stabs \"_/**/sym\",1,0,0,0") #ifndef __warn_references diff --git a/src/e_acos.c b/src/e_acos.c index b7a74b9..1098cd2 100644 --- a/src/e_acos.c +++ b/src/e_acos.c @@ -107,5 +107,5 @@ __ieee754_acos(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference(acos, acosl); +__weak_reference_compat(acos, acosl); #endif diff --git a/src/e_asin.c b/src/e_asin.c index 2ec1764..0cf22a8 100644 --- a/src/e_asin.c +++ b/src/e_asin.c @@ -113,5 +113,5 @@ __ieee754_asin(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference(asin, asinl); +__weak_reference_compat(asin, asinl); #endif diff --git a/src/e_atan2.c b/src/e_atan2.c index 70384dc..e698f69 100644 --- a/src/e_atan2.c +++ b/src/e_atan2.c @@ -125,5 +125,5 @@ __ieee754_atan2(double y, double x) } #if LDBL_MANT_DIG == 53 -__weak_reference(atan2, atan2l); +__weak_reference_compat(atan2, atan2l); #endif diff --git a/src/e_hypot.c b/src/e_hypot.c index 23fdc95..235cc3b 100644 --- a/src/e_hypot.c +++ b/src/e_hypot.c @@ -127,5 +127,5 @@ __ieee754_hypot(double x, double y) } #if LDBL_MANT_DIG == 53 -__weak_reference(hypot, hypotl); +__weak_reference_compat(hypot, hypotl); #endif diff --git a/src/e_remainder.c b/src/e_remainder.c index bc9d9bf..8439113 100644 --- a/src/e_remainder.c +++ b/src/e_remainder.c @@ -75,5 +75,5 @@ __ieee754_remainder(double x, double p) } #if LDBL_MANT_DIG == 53 -__weak_reference(remainder, remainderl); +__weak_reference_compat(remainder, remainderl); #endif diff --git a/src/e_sqrt.c b/src/e_sqrt.c index 01c7104..9e83354 100644 --- a/src/e_sqrt.c +++ b/src/e_sqrt.c @@ -189,7 +189,7 @@ __ieee754_sqrt(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference(sqrt, sqrtl); +__weak_reference_compat(sqrt, sqrtl); #endif /* diff --git a/src/s_atan.c b/src/s_atan.c index f87e486..fe67196 100644 --- a/src/s_atan.c +++ b/src/s_atan.c @@ -120,5 +120,5 @@ atan(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference(atan, atanl); +__weak_reference_compat(atan, atanl); #endif diff --git a/src/s_cbrt.c b/src/s_cbrt.c index dd3c141..165f876 100644 --- a/src/s_cbrt.c +++ b/src/s_cbrt.c @@ -114,5 +114,5 @@ cbrt(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference(cbrt, cbrtl); +__weak_reference_compat(cbrt, cbrtl); #endif diff --git a/src/s_ceil.c b/src/s_ceil.c index bdac17f..d4f500d 100644 --- a/src/s_ceil.c +++ b/src/s_ceil.c @@ -73,5 +73,5 @@ ceil(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference(ceil, ceill); +__weak_reference_compat(ceil, ceill); #endif diff --git a/src/s_cos.c b/src/s_cos.c index ea84163..8d5ff02 100644 --- a/src/s_cos.c +++ b/src/s_cos.c @@ -85,5 +85,5 @@ cos(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference(cos, cosl); +__weak_reference_compat(cos, cosl); #endif diff --git a/src/s_cproj.c b/src/s_cproj.c index 89dfc55..12baf1b 100644 --- a/src/s_cproj.c +++ b/src/s_cproj.c @@ -43,5 +43,5 @@ cproj(double complex z) } #if LDBL_MANT_DIG == 53 -__weak_reference(cproj, cprojl); +__weak_reference_compat(cproj, cprojl); #endif diff --git a/src/s_csqrt.c b/src/s_csqrt.c index 105592f..6618b32 100644 --- a/src/s_csqrt.c +++ b/src/s_csqrt.c @@ -110,5 +110,5 @@ csqrt(double complex z) } #if LDBL_MANT_DIG == 53 -__weak_reference(csqrt, csqrtl); +__weak_reference_compat(csqrt, csqrtl); #endif diff --git a/src/s_exp2.c b/src/s_exp2.c index e5faf7f..03ca5bd 100644 --- a/src/s_exp2.c +++ b/src/s_exp2.c @@ -392,5 +392,5 @@ exp2(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference(exp2, exp2l); +__weak_reference_compat(exp2, exp2l); #endif diff --git a/src/s_floor.c b/src/s_floor.c index 1d67a21..3d26c88 100644 --- a/src/s_floor.c +++ b/src/s_floor.c @@ -74,5 +74,5 @@ floor(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference(floor, floorl); +__weak_reference_compat(floor, floorl); #endif diff --git a/src/s_fma.c b/src/s_fma.c index 798e426..819f512 100644 --- a/src/s_fma.c +++ b/src/s_fma.c @@ -280,5 +280,5 @@ fma(double x, double y, double z) } #if (LDBL_MANT_DIG == 53) -__weak_reference(fma, fmal); +__weak_reference_compat(fma, fmal); #endif diff --git a/src/s_frexp.c b/src/s_frexp.c index 46367a4..28de411 100644 --- a/src/s_frexp.c +++ b/src/s_frexp.c @@ -52,5 +52,5 @@ frexp(double x, int *eptr) } #if (LDBL_MANT_DIG == 53) -__weak_reference(frexp, frexpl); +__weak_reference_compat(frexp, frexpl); #endif diff --git a/src/s_isinf.c b/src/s_isinf.c index a9bd858..c9072b5 100644 --- a/src/s_isinf.c +++ b/src/s_isinf.c @@ -63,4 +63,4 @@ __isinfl(long double e) } #endif -__weak_reference(__isinff, isinff); +__weak_reference_compat(__isinff, isinff); diff --git a/src/s_isnan.c b/src/s_isnan.c index e66bb9a..f44eb4d 100644 --- a/src/s_isnan.c +++ b/src/s_isnan.c @@ -64,4 +64,4 @@ __isnanl(long double e) } #endif -__weak_reference(__isnanf, isnanf); +__weak_reference_compat(__isnanf, isnanf); diff --git a/src/s_logb.c b/src/s_logb.c index 6395dd6..aad9c45 100644 --- a/src/s_logb.c +++ b/src/s_logb.c @@ -45,5 +45,5 @@ logb(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference(logb, logbl); +__weak_reference_compat(logb, logbl); #endif diff --git a/src/s_nan.c b/src/s_nan.c index 3539a82..11d0555 100644 --- a/src/s_nan.c +++ b/src/s_nan.c @@ -120,5 +120,5 @@ nanf(const char *s) } #if (LDBL_MANT_DIG == 53) -__weak_reference(nan, nanl); +__weak_reference_compat(nan, nanl); #endif diff --git a/src/s_nextafter.c b/src/s_nextafter.c index 2fbf2ed..cd15552 100644 --- a/src/s_nextafter.c +++ b/src/s_nextafter.c @@ -77,7 +77,7 @@ nextafter(double x, double y) } #if (LDBL_MANT_DIG == 53) -__weak_reference(nextafter, nexttoward); -__weak_reference(nextafter, nexttowardl); -__weak_reference(nextafter, nextafterl); +__weak_reference_compat(nextafter, nexttoward); +__weak_reference_compat(nextafter, nexttowardl); +__weak_reference_compat(nextafter, nextafterl); #endif diff --git a/src/s_remquo.c b/src/s_remquo.c index 13375c3..7ecf62e 100644 --- a/src/s_remquo.c +++ b/src/s_remquo.c @@ -154,5 +154,5 @@ fixup: } #if LDBL_MANT_DIG == 53 -__weak_reference(remquo, remquol); +__weak_reference_compat(remquo, remquol); #endif diff --git a/src/s_rint.c b/src/s_rint.c index f2d8c0e..27f45cc 100644 --- a/src/s_rint.c +++ b/src/s_rint.c @@ -88,5 +88,5 @@ rint(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference(rint, rintl); +__weak_reference_compat(rint, rintl); #endif diff --git a/src/s_scalbn.c b/src/s_scalbn.c index 4ab59ca..402652b 100644 --- a/src/s_scalbn.c +++ b/src/s_scalbn.c @@ -59,8 +59,8 @@ scalbn (double x, int n) } #if (LDBL_MANT_DIG == 53) -__weak_reference(scalbn, ldexpl); -__weak_reference(scalbn, scalbnl); +__weak_reference_compat(scalbn, ldexpl); +__weak_reference_compat(scalbn, scalbnl); #endif __strong_reference(scalbn, ldexp); diff --git a/src/s_sin.c b/src/s_sin.c index 3eb0c4a..617ba8f 100644 --- a/src/s_sin.c +++ b/src/s_sin.c @@ -85,5 +85,5 @@ sin(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference(sin, sinl); +__weak_reference_compat(sin, sinl); #endif diff --git a/src/s_sincos.c b/src/s_sincos.c index 229d967..e333bde 100644 --- a/src/s_sincos.c +++ b/src/s_sincos.c @@ -146,5 +146,5 @@ sincos(double x, double * s, double * c) } #if (LDBL_MANT_DIG == 53) -__weak_reference(sincos, sincosl); +__weak_reference_compat(sincos, sincosl); #endif diff --git a/src/s_tan.c b/src/s_tan.c index 07f2244..f32b834 100644 --- a/src/s_tan.c +++ b/src/s_tan.c @@ -79,5 +79,5 @@ tan(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference(tan, tanl); +__weak_reference_compat(tan, tanl); #endif diff --git a/src/s_trunc.c b/src/s_trunc.c index b01bfef..61c2b40 100644 --- a/src/s_trunc.c +++ b/src/s_trunc.c @@ -63,5 +63,5 @@ trunc(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference(trunc, truncl); +__weak_reference_compat(trunc, truncl); #endif diff --git a/src/w_cabs.c b/src/w_cabs.c index 6b53a60..e5fcf16 100644 --- a/src/w_cabs.c +++ b/src/w_cabs.c @@ -21,5 +21,5 @@ cabs(double complex z) } #if LDBL_MANT_DIG == 53 -__weak_reference(cabs, cabsl); +__weak_reference_compat(cabs, cabsl); #endif From ea065f90cb850012bafde1011dc27af8ab59bf21 Mon Sep 17 00:00:00 2001 From: gufe44 <56860520+gufe44@users.noreply.github.com> Date: Fri, 25 Oct 2019 23:45:13 +0200 Subject: [PATCH 2/4] Update src/cdefs-compat.h Co-Authored-By: Jameson Nash --- src/cdefs-compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cdefs-compat.h b/src/cdefs-compat.h index 6da89d7..0affcd6 100644 --- a/src/cdefs-compat.h +++ b/src/cdefs-compat.h @@ -27,7 +27,7 @@ #ifdef __weak_reference #ifdef __NetBSD__ -#define __weak_reference_compat(sym,alias) __weak_reference(sym) +#define __weak_reference_compat(sym,alias) __weak_alias(alias,sym) #else #define __weak_reference_compat(sym,alias) __weak_reference(sym,alias) #endif From d4077aa13178dd3f84af8041951a4a64047761fd Mon Sep 17 00:00:00 2001 From: gufe44 <56860520+gufe44@users.noreply.github.com> Date: Sat, 26 Oct 2019 01:05:27 +0200 Subject: [PATCH 3/4] Suggestions https://github.com/JuliaMath/openlibm/pull/197#pullrequestreview-307404318 --- src/cdefs-compat.h | 60 +++++++++++++++++++++++++++------------------- src/e_acos.c | 2 +- src/e_asin.c | 2 +- src/e_atan2.c | 2 +- src/e_hypot.c | 2 +- src/e_remainder.c | 2 +- src/e_sqrt.c | 2 +- src/s_atan.c | 2 +- 8 files changed, 42 insertions(+), 32 deletions(-) diff --git a/src/cdefs-compat.h b/src/cdefs-compat.h index 0affcd6..2b20736 100644 --- a/src/cdefs-compat.h +++ b/src/cdefs-compat.h @@ -12,43 +12,49 @@ #endif /* !defined(__BEGIN_DECLS) */ #ifdef __GNUC__ -#ifndef __strong_reference -#ifdef __APPLE__ -#define __strong_reference(sym,aliassym) __weak_reference_compat(sym,aliassym) +#if defined(__strong_alias) && defined(__NetBSD__) +#define openlibm_strong_reference(sym,alias) __strong_alias(alias,sym) +#elif defined(__strong_reference) +#define openlibm_strong_reference(sym,alias) __strong_reference(sym,alias) #else -#define __strong_reference(sym,aliassym) \ +#ifdef __APPLE__ +#define openlibm_strong_reference(sym,aliassym) openlibm_weak_reference(sym,aliassym) +#else +#define openlibm_strong_reference(sym,aliassym) \ OLM_DLLEXPORT extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))); #endif /* __APPLE__ */ #endif /* __strong_reference */ #ifdef __wasm__ -# define __weak_reference_compat(sym,alias) __strong_reference(sym,alias) +# define openlibm_weak_reference(sym,alias) openlibm_strong_reference(sym,alias) #endif -#ifdef __weak_reference -#ifdef __NetBSD__ -#define __weak_reference_compat(sym,alias) __weak_alias(alias,sym) -#else -#define __weak_reference_compat(sym,alias) __weak_reference(sym,alias) -#endif +#if defined(__weak_alias) && defined(__NetBSD__) +#define openlibm_weak_reference(sym,alias) __weak_alias(alias,sym) +#elif defined(__weak_reference) +#define openlibm_weak_reference(sym,alias) __weak_reference(sym,alias) #else #ifdef __ELF__ #ifdef __STDC__ -#define __weak_reference_compat(sym,alias) \ +#define openlibm_weak_reference(sym,alias) \ __asm__(".weak " #alias); \ __asm__(".equ " #alias ", " #sym) -#ifndef __warn_references -#define __warn_references(sym,msg) \ +#ifdef __warn_references +#define openlibm_warn_references(sym,msg) __warn_references(sym,msg) +#else +#define openlibm_warn_references(sym,msg) \ __asm__(".section .gnu.warning." #sym); \ __asm__(".asciz \"" msg "\""); \ __asm__(".previous") #endif /* __warn_references */ #else -#define __weak_reference_compat(sym,alias) \ +#define openlibm_weak_reference(sym,alias) \ __asm__(".weak alias"); \ __asm__(".equ alias, sym") -#ifndef __warn_references -#define __warn_references(sym,msg) \ +#ifdef __warn_references +#define openlibm_warn_references(sym,msg) __warn_references(sym,msg) +#else +#define openlibm_warn_references(sym,msg) \ __asm__(".section .gnu.warning.sym"); \ __asm__(".asciz \"msg\""); \ __asm__(".previous") @@ -56,30 +62,34 @@ #endif /* __STDC__ */ #elif defined(__clang__) /* CLANG */ #ifdef __STDC__ -#define __weak_reference_compat(sym,alias) \ +#define openlibm_weak_reference(sym,alias) \ __asm__(".weak_reference " #alias); \ __asm__(".set " #alias ", " #sym) #else -#define __weak_referenc_compate(sym,alias) \ +#define openlibm_weak_reference(sym,alias) \ __asm__(".weak_reference alias");\ __asm__(".set alias, sym") #endif #else /* !__ELF__ */ #ifdef __STDC__ -#define __weak_reference_compat(sym,alias) \ +#define openlibm_weak_reference(sym,alias) \ __asm__(".stabs \"_" #alias "\",11,0,0,0"); \ __asm__(".stabs \"_" #sym "\",1,0,0,0") -#ifndef __warn_references -#define __warn_references(sym,msg) \ +#ifdef __warn_references +#define openlibm_warn_references(sym,msg) __warn_references(sym,msg) +#else +#define openlibm_warn_references(sym,msg) \ __asm__(".stabs \"" msg "\",30,0,0,0"); \ __asm__(".stabs \"_" #sym "\",1,0,0,0") #endif /* __warn_references */ #else -#define __weak_reference_compat(sym,alias) \ +#define openlibm_weak_reference(sym,alias) \ __asm__(".stabs \"_/**/alias\",11,0,0,0"); \ __asm__(".stabs \"_/**/sym\",1,0,0,0") -#ifndef __warn_references -#define __warn_references(sym,msg) \ +#ifdef __warn_references +#define openlibm_warn_references(sym,msg) __warn_references(sym,msg) +#else +#define openlibm_warn_references(sym,msg) \ __asm__(".stabs msg,30,0,0,0"); \ __asm__(".stabs \"_/**/sym\",1,0,0,0") #endif /* __warn_references */ diff --git a/src/e_acos.c b/src/e_acos.c index 1098cd2..7295ad6 100644 --- a/src/e_acos.c +++ b/src/e_acos.c @@ -107,5 +107,5 @@ __ieee754_acos(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(acos, acosl); +openlibm_weak_reference(acos, acosl); #endif diff --git a/src/e_asin.c b/src/e_asin.c index 0cf22a8..e287bf1 100644 --- a/src/e_asin.c +++ b/src/e_asin.c @@ -113,5 +113,5 @@ __ieee754_asin(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(asin, asinl); +openlibm_weak_reference(asin, asinl); #endif diff --git a/src/e_atan2.c b/src/e_atan2.c index e698f69..9b021b9 100644 --- a/src/e_atan2.c +++ b/src/e_atan2.c @@ -125,5 +125,5 @@ __ieee754_atan2(double y, double x) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(atan2, atan2l); +openlibm_weak_reference(atan2, atan2l); #endif diff --git a/src/e_hypot.c b/src/e_hypot.c index 235cc3b..3f4c1d1 100644 --- a/src/e_hypot.c +++ b/src/e_hypot.c @@ -127,5 +127,5 @@ __ieee754_hypot(double x, double y) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(hypot, hypotl); +openlibm_weak_reference(hypot, hypotl); #endif diff --git a/src/e_remainder.c b/src/e_remainder.c index 8439113..a72631c 100644 --- a/src/e_remainder.c +++ b/src/e_remainder.c @@ -75,5 +75,5 @@ __ieee754_remainder(double x, double p) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(remainder, remainderl); +openlibm_weak_reference(remainder, remainderl); #endif diff --git a/src/e_sqrt.c b/src/e_sqrt.c index 9e83354..2eb4a1a 100644 --- a/src/e_sqrt.c +++ b/src/e_sqrt.c @@ -189,7 +189,7 @@ __ieee754_sqrt(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(sqrt, sqrtl); +openlibm_weak_reference(sqrt, sqrtl); #endif /* diff --git a/src/s_atan.c b/src/s_atan.c index fe67196..23a2949 100644 --- a/src/s_atan.c +++ b/src/s_atan.c @@ -120,5 +120,5 @@ atan(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(atan, atanl); +openlibm_weak_reference(atan, atanl); #endif From c4dca1e84afa46b7f3a0f3c5f1f32e2db292f4e0 Mon Sep 17 00:00:00 2001 From: gufe44 <56860520+gufe44@users.noreply.github.com> Date: Sat, 26 Oct 2019 01:53:42 +0200 Subject: [PATCH 4/4] Add files via upload --- src/s_cbrt.c | 2 +- src/s_ceil.c | 2 +- src/s_cos.c | 2 +- src/s_cproj.c | 2 +- src/s_csqrt.c | 2 +- src/s_exp2.c | 2 +- src/s_floor.c | 2 +- src/s_fma.c | 2 +- src/s_frexp.c | 2 +- src/s_isinf.c | 2 +- src/s_isnan.c | 2 +- src/s_logb.c | 2 +- src/s_nan.c | 2 +- src/s_nextafter.c | 6 +++--- src/s_nextafterl.c | 2 +- src/s_remquo.c | 2 +- src/s_rint.c | 2 +- src/s_scalbn.c | 6 +++--- src/s_scalbnf.c | 2 +- src/s_scalbnl.c | 2 +- src/s_sin.c | 2 +- src/s_sincos.c | 2 +- src/s_tan.c | 2 +- src/s_trunc.c | 2 +- src/w_cabs.c | 2 +- 25 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/s_cbrt.c b/src/s_cbrt.c index 165f876..b6316ad 100644 --- a/src/s_cbrt.c +++ b/src/s_cbrt.c @@ -114,5 +114,5 @@ cbrt(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(cbrt, cbrtl); +openlibm_weak_reference(cbrt, cbrtl); #endif diff --git a/src/s_ceil.c b/src/s_ceil.c index d4f500d..9c70a97 100644 --- a/src/s_ceil.c +++ b/src/s_ceil.c @@ -73,5 +73,5 @@ ceil(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(ceil, ceill); +openlibm_weak_reference(ceil, ceill); #endif diff --git a/src/s_cos.c b/src/s_cos.c index 8d5ff02..9896bd8 100644 --- a/src/s_cos.c +++ b/src/s_cos.c @@ -85,5 +85,5 @@ cos(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(cos, cosl); +openlibm_weak_reference(cos, cosl); #endif diff --git a/src/s_cproj.c b/src/s_cproj.c index 12baf1b..b9faa24 100644 --- a/src/s_cproj.c +++ b/src/s_cproj.c @@ -43,5 +43,5 @@ cproj(double complex z) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(cproj, cprojl); +openlibm_weak_reference(cproj, cprojl); #endif diff --git a/src/s_csqrt.c b/src/s_csqrt.c index 6618b32..9cf4255 100644 --- a/src/s_csqrt.c +++ b/src/s_csqrt.c @@ -110,5 +110,5 @@ csqrt(double complex z) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(csqrt, csqrtl); +openlibm_weak_reference(csqrt, csqrtl); #endif diff --git a/src/s_exp2.c b/src/s_exp2.c index 03ca5bd..d643dbb 100644 --- a/src/s_exp2.c +++ b/src/s_exp2.c @@ -392,5 +392,5 @@ exp2(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(exp2, exp2l); +openlibm_weak_reference(exp2, exp2l); #endif diff --git a/src/s_floor.c b/src/s_floor.c index 3d26c88..4a44bd5 100644 --- a/src/s_floor.c +++ b/src/s_floor.c @@ -74,5 +74,5 @@ floor(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(floor, floorl); +openlibm_weak_reference(floor, floorl); #endif diff --git a/src/s_fma.c b/src/s_fma.c index 819f512..63e529e 100644 --- a/src/s_fma.c +++ b/src/s_fma.c @@ -280,5 +280,5 @@ fma(double x, double y, double z) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(fma, fmal); +openlibm_weak_reference(fma, fmal); #endif diff --git a/src/s_frexp.c b/src/s_frexp.c index 28de411..0385acf 100644 --- a/src/s_frexp.c +++ b/src/s_frexp.c @@ -52,5 +52,5 @@ frexp(double x, int *eptr) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(frexp, frexpl); +openlibm_weak_reference(frexp, frexpl); #endif diff --git a/src/s_isinf.c b/src/s_isinf.c index c9072b5..02eaff3 100644 --- a/src/s_isinf.c +++ b/src/s_isinf.c @@ -63,4 +63,4 @@ __isinfl(long double e) } #endif -__weak_reference_compat(__isinff, isinff); +openlibm_weak_reference(__isinff, isinff); diff --git a/src/s_isnan.c b/src/s_isnan.c index f44eb4d..b9066aa 100644 --- a/src/s_isnan.c +++ b/src/s_isnan.c @@ -64,4 +64,4 @@ __isnanl(long double e) } #endif -__weak_reference_compat(__isnanf, isnanf); +openlibm_weak_reference(__isnanf, isnanf); diff --git a/src/s_logb.c b/src/s_logb.c index aad9c45..116b696 100644 --- a/src/s_logb.c +++ b/src/s_logb.c @@ -45,5 +45,5 @@ logb(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(logb, logbl); +openlibm_weak_reference(logb, logbl); #endif diff --git a/src/s_nan.c b/src/s_nan.c index 11d0555..dd1c5af 100644 --- a/src/s_nan.c +++ b/src/s_nan.c @@ -120,5 +120,5 @@ nanf(const char *s) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(nan, nanl); +openlibm_weak_reference(nan, nanl); #endif diff --git a/src/s_nextafter.c b/src/s_nextafter.c index cd15552..8b2ea05 100644 --- a/src/s_nextafter.c +++ b/src/s_nextafter.c @@ -77,7 +77,7 @@ nextafter(double x, double y) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(nextafter, nexttoward); -__weak_reference_compat(nextafter, nexttowardl); -__weak_reference_compat(nextafter, nextafterl); +openlibm_weak_reference(nextafter, nexttoward); +openlibm_weak_reference(nextafter, nexttowardl); +openlibm_weak_reference(nextafter, nextafterl); #endif diff --git a/src/s_nextafterl.c b/src/s_nextafterl.c index d00cd65..bb73141 100644 --- a/src/s_nextafterl.c +++ b/src/s_nextafterl.c @@ -77,4 +77,4 @@ nextafterl(long double x, long double y) return ux.e; } -__strong_reference(nextafterl, nexttowardl); +openlibm_strong_reference(nextafterl, nexttowardl); diff --git a/src/s_remquo.c b/src/s_remquo.c index 7ecf62e..5c566c7 100644 --- a/src/s_remquo.c +++ b/src/s_remquo.c @@ -154,5 +154,5 @@ fixup: } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(remquo, remquol); +openlibm_weak_reference(remquo, remquol); #endif diff --git a/src/s_rint.c b/src/s_rint.c index 27f45cc..f81e692 100644 --- a/src/s_rint.c +++ b/src/s_rint.c @@ -88,5 +88,5 @@ rint(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(rint, rintl); +openlibm_weak_reference(rint, rintl); #endif diff --git a/src/s_scalbn.c b/src/s_scalbn.c index 402652b..dc3a0cf 100644 --- a/src/s_scalbn.c +++ b/src/s_scalbn.c @@ -59,8 +59,8 @@ scalbn (double x, int n) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(scalbn, ldexpl); -__weak_reference_compat(scalbn, scalbnl); +openlibm_weak_reference(scalbn, ldexpl); +openlibm_weak_reference(scalbn, scalbnl); #endif -__strong_reference(scalbn, ldexp); +openlibm_strong_reference(scalbn, ldexp); diff --git a/src/s_scalbnf.c b/src/s_scalbnf.c index 3e8c471..930ab8f 100644 --- a/src/s_scalbnf.c +++ b/src/s_scalbnf.c @@ -54,4 +54,4 @@ scalbnf (float x, int n) return x*twom25; } -__strong_reference(scalbnf, ldexpf); +openlibm_strong_reference(scalbnf, ldexpf); diff --git a/src/s_scalbnl.c b/src/s_scalbnl.c index d41cd02..7732944 100644 --- a/src/s_scalbnl.c +++ b/src/s_scalbnl.c @@ -67,4 +67,4 @@ scalbnl (long double x, int n) return u.e*0x1p-128; } -__strong_reference(scalbnl, ldexpl); +openlibm_strong_reference(scalbnl, ldexpl); diff --git a/src/s_sin.c b/src/s_sin.c index 617ba8f..cc0a5c6 100644 --- a/src/s_sin.c +++ b/src/s_sin.c @@ -85,5 +85,5 @@ sin(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(sin, sinl); +openlibm_weak_reference(sin, sinl); #endif diff --git a/src/s_sincos.c b/src/s_sincos.c index e333bde..44a4a24 100644 --- a/src/s_sincos.c +++ b/src/s_sincos.c @@ -146,5 +146,5 @@ sincos(double x, double * s, double * c) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(sincos, sincosl); +openlibm_weak_reference(sincos, sincosl); #endif diff --git a/src/s_tan.c b/src/s_tan.c index f32b834..2b234a2 100644 --- a/src/s_tan.c +++ b/src/s_tan.c @@ -79,5 +79,5 @@ tan(double x) } #if (LDBL_MANT_DIG == 53) -__weak_reference_compat(tan, tanl); +openlibm_weak_reference(tan, tanl); #endif diff --git a/src/s_trunc.c b/src/s_trunc.c index 61c2b40..c460cc9 100644 --- a/src/s_trunc.c +++ b/src/s_trunc.c @@ -63,5 +63,5 @@ trunc(double x) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(trunc, truncl); +openlibm_weak_reference(trunc, truncl); #endif diff --git a/src/w_cabs.c b/src/w_cabs.c index e5fcf16..6dc9bde 100644 --- a/src/w_cabs.c +++ b/src/w_cabs.c @@ -21,5 +21,5 @@ cabs(double complex z) } #if LDBL_MANT_DIG == 53 -__weak_reference_compat(cabs, cabsl); +openlibm_weak_reference(cabs, cabsl); #endif