pru: libm: Fix incorrect function name

Message ID 20231204154242.1391291-1-dimitar@dinux.eu
State New
Headers
Series pru: libm: Fix incorrect function name |

Commit Message

Dimitar Dimitrov Dec. 4, 2023, 3:42 p.m. UTC
  Upstream GCC changed -Wimplicit-function-declaration warning into an
error. The build break about missing fpclassifyf function prototype
exposed a bug in the PRU port of libm.

The fix is to use the fpclassify macro for both double and float types.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
 newlib/libm/machine/pru/fpclassifyf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Corinna Vinschen Dec. 4, 2023, 4:38 p.m. UTC | #1
On Dec  4 17:42, Dimitar Dimitrov wrote:
> Upstream GCC changed -Wimplicit-function-declaration warning into an
> error. The build break about missing fpclassifyf function prototype
> exposed a bug in the PRU port of libm.
> 
> The fix is to use the fpclassify macro for both double and float types.
> 
> Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
> ---
>  newlib/libm/machine/pru/fpclassifyf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/newlib/libm/machine/pru/fpclassifyf.c b/newlib/libm/machine/pru/fpclassifyf.c
> index f4dd201d9..6d82ea777 100644
> --- a/newlib/libm/machine/pru/fpclassifyf.c
> +++ b/newlib/libm/machine/pru/fpclassifyf.c
> @@ -32,5 +32,5 @@
>     by TI ABI.  */
>  int __pruabi_fpclassifyf(float a)
>  {
> -  return fpclassifyf(a);
> +  return fpclassify(a);
>  }
> -- 
> 2.43.0

Pushed.

Thanks,
Corinna
  

Patch

diff --git a/newlib/libm/machine/pru/fpclassifyf.c b/newlib/libm/machine/pru/fpclassifyf.c
index f4dd201d9..6d82ea777 100644
--- a/newlib/libm/machine/pru/fpclassifyf.c
+++ b/newlib/libm/machine/pru/fpclassifyf.c
@@ -32,5 +32,5 @@ 
    by TI ABI.  */
 int __pruabi_fpclassifyf(float a)
 {
-  return fpclassifyf(a);
+  return fpclassify(a);
 }