common/math_errf.c: Enable compilation of __math_oflowf

Message ID 1564169966-24625-1-git-send-email-joel@rtems.org
State Accepted
Commit 3e5302714fae99acc8c439f5870846312d081631
Headers show
Series
  • common/math_errf.c: Enable compilation of __math_oflowf
Related show

Commit Message

Joel Sherrill July 26, 2019, 7:39 p.m.
From: Joel Sherrill <joel@rtems.org>


	This resolved linking errors when using methods such as
	expm1().
---
 newlib/libm/common/math_errf.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
1.8.3.1

Comments

Corinna Vinschen July 29, 2019, 8:58 a.m. | #1
On Jul 26 14:39, joel@rtems.org wrote:
> From: Joel Sherrill <joel@rtems.org>

> 

> 	This resolved linking errors when using methods such as

> 	expm1().

> ---

>  newlib/libm/common/math_errf.c | 5 +++--

>  1 file changed, 3 insertions(+), 2 deletions(-)


Ok, please push.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
Joel Sherrill July 29, 2019, 1:56 p.m. | #2
On Mon, Jul 29, 2019 at 3:58 AM Corinna Vinschen <vinschen@redhat.com>
wrote:

> On Jul 26 14:39, joel@rtems.org wrote:

> > From: Joel Sherrill <joel@rtems.org>

> >

> >       This resolved linking errors when using methods such as

> >       expm1().

> > ---

> >  newlib/libm/common/math_errf.c | 5 +++--

> >  1 file changed, 3 insertions(+), 2 deletions(-)

>

> Ok, please push.

>


Pushed. Thanks.

It seems as though a set of tests which invoke a single method and just link
(not execute) would have been sufficient to catch this.  RTEMS has tests
which
ensure the signatures matches POSIX but they don't link to ensure all the
supporting symbols are satisfied. Looks like something to put on the todo
list.

--joel

>

>

> Thanks,

> Corinna

>

> --

> Corinna Vinschen

> Cygwin Maintainer

> Red Hat

>

Patch

diff --git a/newlib/libm/common/math_errf.c b/newlib/libm/common/math_errf.c
index e050cdb..762fc27 100644
--- a/newlib/libm/common/math_errf.c
+++ b/newlib/libm/common/math_errf.c
@@ -27,8 +27,6 @@ 
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
 
 #include "fdlibm.h"
-#if !__OBSOLETE_MATH
-
 #include "math_config.h"
 
 #if WANT_ERRNO
@@ -53,6 +51,7 @@  xflowf (uint32_t sign, float y)
   return with_errnof (y, ERANGE);
 }
 
+#if !__OBSOLETE_MATH
 HIDDEN float
 __math_uflowf (uint32_t sign)
 {
@@ -68,6 +67,7 @@  __math_may_uflowf (uint32_t sign)
   return xflowf (sign, 0x1.4p-75f);
 }
 #endif
+#endif /* !__OBSOLETE_MATH */
 
 HIDDEN float
 __math_oflowf (uint32_t sign)
@@ -75,6 +75,7 @@  __math_oflowf (uint32_t sign)
   return xflowf (sign, 0x1p97f);
 }
 
+#if !__OBSOLETE_MATH
 HIDDEN float
 __math_divzerof (uint32_t sign)
 {