[PATCH, RFC v2 5/8] libm: add attribute weak for __ieee754_sqrtf

Alexey Lapshin alexey.lapshin@espressif.com
Mon May 15 13:51:56 GMT 2023


newlib:
        * libm/math/ef_sqrt.c: add attribute weak for __ieee754_sqrtf because
        it could have implementation from libgcc
---
 newlib/libm/math/ef_sqrt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/newlib/libm/math/ef_sqrt.c b/newlib/libm/math/ef_sqrt.c
index 80e7f360e..7589bc6c1 100644
--- a/newlib/libm/math/ef_sqrt.c
+++ b/newlib/libm/math/ef_sqrt.c
@@ -21,6 +21,7 @@ static	const float	one	= 1.0, tiny=1.0e-30;
 static	float	one	= 1.0, tiny=1.0e-30;
 #endif
 
+__attribute__((weak)) /* may have implementation in libgcc */
 #ifdef __STDC__
 	float __ieee754_sqrtf(float x)
 #else
-- 
2.34.1



More information about the Newlib mailing list