[v2,2/2] PRU: Align libmath to PRU ABI

Message ID 20190826041416.9176-2-dimitar@dinux.eu
State New
Headers show
Series
  • [v2,1/2] Initial PRU port
Related show

Commit Message

Dimitar Dimitrov Aug. 26, 2019, 4:14 a.m.
The TI proprietary toolchain uses nonstandard names for some math
library functions. In order to achieve ABI compatibility between
GNU and TI toolchains, add support for the TI function names.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>

---
 newlib/configure.host                 |  1 +
 newlib/libm/machine/configure.in      |  1 +
 newlib/libm/machine/pru/Makefile.am   | 19 ++++++++++++
 newlib/libm/machine/pru/configure.in  | 11 +++++++
 newlib/libm/machine/pru/fpclassify.c  | 43 +++++++++++++++++++++++++++
 newlib/libm/machine/pru/fpclassifyf.c | 43 +++++++++++++++++++++++++++
 newlib/libm/machine/pru/isfinite.c    | 43 +++++++++++++++++++++++++++
 newlib/libm/machine/pru/isfinitef.c   | 43 +++++++++++++++++++++++++++
 newlib/libm/machine/pru/isinf.c       | 43 +++++++++++++++++++++++++++
 newlib/libm/machine/pru/isinff.c      | 43 +++++++++++++++++++++++++++
 newlib/libm/machine/pru/isnan.c       | 43 +++++++++++++++++++++++++++
 newlib/libm/machine/pru/isnanf.c      | 43 +++++++++++++++++++++++++++
 newlib/libm/machine/pru/isnormal.c    | 43 +++++++++++++++++++++++++++
 newlib/libm/machine/pru/isnormalf.c   | 43 +++++++++++++++++++++++++++
 14 files changed, 462 insertions(+)
 create mode 100644 newlib/libm/machine/pru/Makefile.am
 create mode 100644 newlib/libm/machine/pru/configure.in
 create mode 100644 newlib/libm/machine/pru/fpclassify.c
 create mode 100644 newlib/libm/machine/pru/fpclassifyf.c
 create mode 100644 newlib/libm/machine/pru/isfinite.c
 create mode 100644 newlib/libm/machine/pru/isfinitef.c
 create mode 100644 newlib/libm/machine/pru/isinf.c
 create mode 100644 newlib/libm/machine/pru/isinff.c
 create mode 100644 newlib/libm/machine/pru/isnan.c
 create mode 100644 newlib/libm/machine/pru/isnanf.c
 create mode 100644 newlib/libm/machine/pru/isnormal.c
 create mode 100644 newlib/libm/machine/pru/isnormalf.c

-- 
2.20.1

Comments

Joel Sherrill Aug. 26, 2019, 3:12 p.m. | #1
Why the 3 paragraph BSD style license with notice required on binary
distributions?

Is it possible to just use the 2-paragraph style?

Thanks.

--joel

On Sun, Aug 25, 2019 at 11:15 PM Dimitar Dimitrov <dimitar@dinux.eu> wrote:
>

> The TI proprietary toolchain uses nonstandard names for some math

> library functions. In order to achieve ABI compatibility between

> GNU and TI toolchains, add support for the TI function names.

>

> Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>

> ---

>  newlib/configure.host                 |  1 +

>  newlib/libm/machine/configure.in      |  1 +

>  newlib/libm/machine/pru/Makefile.am   | 19 ++++++++++++

>  newlib/libm/machine/pru/configure.in  | 11 +++++++

>  newlib/libm/machine/pru/fpclassify.c  | 43 +++++++++++++++++++++++++++

>  newlib/libm/machine/pru/fpclassifyf.c | 43 +++++++++++++++++++++++++++

>  newlib/libm/machine/pru/isfinite.c    | 43 +++++++++++++++++++++++++++

>  newlib/libm/machine/pru/isfinitef.c   | 43 +++++++++++++++++++++++++++

>  newlib/libm/machine/pru/isinf.c       | 43 +++++++++++++++++++++++++++

>  newlib/libm/machine/pru/isinff.c      | 43 +++++++++++++++++++++++++++

>  newlib/libm/machine/pru/isnan.c       | 43 +++++++++++++++++++++++++++

>  newlib/libm/machine/pru/isnanf.c      | 43 +++++++++++++++++++++++++++

>  newlib/libm/machine/pru/isnormal.c    | 43 +++++++++++++++++++++++++++

>  newlib/libm/machine/pru/isnormalf.c   | 43 +++++++++++++++++++++++++++

>  14 files changed, 462 insertions(+)

>  create mode 100644 newlib/libm/machine/pru/Makefile.am

>  create mode 100644 newlib/libm/machine/pru/configure.in

>  create mode 100644 newlib/libm/machine/pru/fpclassify.c

>  create mode 100644 newlib/libm/machine/pru/fpclassifyf.c

>  create mode 100644 newlib/libm/machine/pru/isfinite.c

>  create mode 100644 newlib/libm/machine/pru/isfinitef.c

>  create mode 100644 newlib/libm/machine/pru/isinf.c

>  create mode 100644 newlib/libm/machine/pru/isinff.c

>  create mode 100644 newlib/libm/machine/pru/isnan.c

>  create mode 100644 newlib/libm/machine/pru/isnanf.c

>  create mode 100644 newlib/libm/machine/pru/isnormal.c

>  create mode 100644 newlib/libm/machine/pru/isnormalf.c

>

> diff --git a/newlib/configure.host b/newlib/configure.host

> index 6a6066bb2..6ee32ca3d 100644

> --- a/newlib/configure.host

> +++ b/newlib/configure.host

> @@ -296,6 +296,7 @@ case "${host_cpu}" in

>         default_newlib_nano_malloc="yes"

>         default_newlib_atexit_dynamic_alloc="no"

>         machine_dir=pru

> +       libm_machine_dir=pru

>         ;;

>    riscv*)

>         libm_machine_dir=riscv

> diff --git a/newlib/libm/machine/configure.in b/newlib/libm/machine/configure.in

> index 55e2d35c3..5a58b6bed 100644

> --- a/newlib/libm/machine/configure.in

> +++ b/newlib/libm/machine/configure.in

> @@ -29,6 +29,7 @@ if test -n "${libm_machine_dir}"; then

>         arm) AC_CONFIG_SUBDIRS(arm) ;;

>         i386) AC_CONFIG_SUBDIRS(i386) ;;

>         nds32) AC_CONFIG_SUBDIRS(nds32) ;;

> +       pru) AC_CONFIG_SUBDIRS(pru) ;;

>         spu) AC_CONFIG_SUBDIRS(spu) ;;

>         riscv) AC_CONFIG_SUBDIRS(riscv) ;;

>    esac;

> diff --git a/newlib/libm/machine/pru/Makefile.am b/newlib/libm/machine/pru/Makefile.am

> new file mode 100644

> index 000000000..69facdf34

> --- /dev/null

> +++ b/newlib/libm/machine/pru/Makefile.am

> @@ -0,0 +1,19 @@

> +## Process this file with automake to generate Makefile.in

> +

> +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \

> +       $(CROSS_CFLAGS) $(TARGET_CFLAGS)

> +

> +LIB_SOURCES = \

> +       fpclassify.c fpclassifyf.c isfinite.c isfinitef.c isinf.c \

> +       isinff.c isnan.c isnanf.c isnormal.c isnormalf.c

> +

> +noinst_LIBRARIES = lib.a

> +lib_a_SOURCES = $(LIB_SOURCES)

> +lib_a_CFLAGS = $(AM_CFLAGS)

> +lib_a_CCASFLAGS = $(AM_CCASFLAGS)

> +noinst_DATA =

> +

> +include $(srcdir)/../../../Makefile.shared

> +

> +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..

> +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host

> diff --git a/newlib/libm/machine/pru/configure.in b/newlib/libm/machine/pru/configure.in

> new file mode 100644

> index 000000000..7a22fa31c

> --- /dev/null

> +++ b/newlib/libm/machine/pru/configure.in

> @@ -0,0 +1,11 @@

> +

> +AC_PREREQ(2.59)

> +AC_INIT([newlib],[NEWLIB_VERSION])

> +AC_CONFIG_SRCDIR([Makefile.am])

> +

> +AC_CONFIG_AUX_DIR(../../../..)

> +

> +NEWLIB_CONFIGURE(../../..)

> +

> +AC_CONFIG_FILES([Makefile])

> +AC_OUTPUT

> diff --git a/newlib/libm/machine/pru/fpclassify.c b/newlib/libm/machine/pru/fpclassify.c

> new file mode 100644

> index 000000000..35f193974

> --- /dev/null

> +++ b/newlib/libm/machine/pru/fpclassify.c

> @@ -0,0 +1,43 @@

> +/*

> +  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

> +  All rights reserved.

> +

> +  Redistribution and use in source and binary forms, with or without

> +  modification, are permitted provided that the following conditions

> +  are met:

> +

> +  * Redistributions of source code must retain the above copyright

> +  notice, this list of conditions and the following disclaimer.

> +

> +  * Redistributions in binary form must reproduce the above copyright

> +  notice, this list of conditions and the following disclaimer in the

> +  documentation and/or other materials provided with the distribution.

> +

> +  * Neither the names of the copyright holders nor the names of their

> +  contributors may be used to endorse or promote products derived from

> +  this software without specific prior written permission.

> +

> +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

> +  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

> +  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

> +  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

> +  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

> +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

> +  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

> +  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

> +  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> +  POSSIBILITY OF SUCH DAMAGE.

> +*/

> +

> +#include <math.h>

> +

> +/* GCC will not generate code calling this function, since the corresponding

> +   builtin will produce code that uses simple ops only.  In order to support

> +   linking against TI CLPRU objects, though, provide the function mandated

> +   by TI ABI.  */

> +int __pruabi_fpclassify(double a)

> +{

> +  return fpclassify(a);

> +}

> diff --git a/newlib/libm/machine/pru/fpclassifyf.c b/newlib/libm/machine/pru/fpclassifyf.c

> new file mode 100644

> index 000000000..22beb1d28

> --- /dev/null

> +++ b/newlib/libm/machine/pru/fpclassifyf.c

> @@ -0,0 +1,43 @@

> +/*

> +  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

> +  All rights reserved.

> +

> +  Redistribution and use in source and binary forms, with or without

> +  modification, are permitted provided that the following conditions

> +  are met:

> +

> +  * Redistributions of source code must retain the above copyright

> +  notice, this list of conditions and the following disclaimer.

> +

> +  * Redistributions in binary form must reproduce the above copyright

> +  notice, this list of conditions and the following disclaimer in the

> +  documentation and/or other materials provided with the distribution.

> +

> +  * Neither the names of the copyright holders nor the names of their

> +  contributors may be used to endorse or promote products derived from

> +  this software without specific prior written permission.

> +

> +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

> +  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

> +  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

> +  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

> +  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

> +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

> +  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

> +  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

> +  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> +  POSSIBILITY OF SUCH DAMAGE.

> +*/

> +

> +#include <math.h>

> +

> +/* GCC will not generate code calling this function, since the corresponding

> +   builtin will produce code that uses simple ops only.  In order to support

> +   linking against TI CLPRU objects, though, provide the function mandated

> +   by TI ABI.  */

> +int __pruabi_fpclassifyf(float a)

> +{

> +  return fpclassifyf(a);

> +}

> diff --git a/newlib/libm/machine/pru/isfinite.c b/newlib/libm/machine/pru/isfinite.c

> new file mode 100644

> index 000000000..6c615c8cc

> --- /dev/null

> +++ b/newlib/libm/machine/pru/isfinite.c

> @@ -0,0 +1,43 @@

> +/*

> +  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

> +  All rights reserved.

> +

> +  Redistribution and use in source and binary forms, with or without

> +  modification, are permitted provided that the following conditions

> +  are met:

> +

> +  * Redistributions of source code must retain the above copyright

> +  notice, this list of conditions and the following disclaimer.

> +

> +  * Redistributions in binary form must reproduce the above copyright

> +  notice, this list of conditions and the following disclaimer in the

> +  documentation and/or other materials provided with the distribution.

> +

> +  * Neither the names of the copyright holders nor the names of their

> +  contributors may be used to endorse or promote products derived from

> +  this software without specific prior written permission.

> +

> +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

> +  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

> +  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

> +  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

> +  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

> +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

> +  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

> +  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

> +  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> +  POSSIBILITY OF SUCH DAMAGE.

> +*/

> +

> +#include <math.h>

> +

> +/* GCC will not generate code calling this function, since the corresponding

> +   builtin will produce code that uses simple ops only.  In order to support

> +   linking against TI CLPRU objects, though, provide the function mandated

> +   by TI ABI.  */

> +int __pruabi_isfinite(double a)

> +{

> +  return isfinite(a);

> +}

> diff --git a/newlib/libm/machine/pru/isfinitef.c b/newlib/libm/machine/pru/isfinitef.c

> new file mode 100644

> index 000000000..1b0a5cedc

> --- /dev/null

> +++ b/newlib/libm/machine/pru/isfinitef.c

> @@ -0,0 +1,43 @@

> +/*

> +  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

> +  All rights reserved.

> +

> +  Redistribution and use in source and binary forms, with or without

> +  modification, are permitted provided that the following conditions

> +  are met:

> +

> +  * Redistributions of source code must retain the above copyright

> +  notice, this list of conditions and the following disclaimer.

> +

> +  * Redistributions in binary form must reproduce the above copyright

> +  notice, this list of conditions and the following disclaimer in the

> +  documentation and/or other materials provided with the distribution.

> +

> +  * Neither the names of the copyright holders nor the names of their

> +  contributors may be used to endorse or promote products derived from

> +  this software without specific prior written permission.

> +

> +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

> +  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

> +  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

> +  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

> +  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

> +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

> +  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

> +  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

> +  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> +  POSSIBILITY OF SUCH DAMAGE.

> +*/

> +

> +#include <math.h>

> +

> +/* GCC will not generate code calling this function, since the corresponding

> +   builtin will produce code that uses simple ops only.  In order to support

> +   linking against TI CLPRU objects, though, provide the function mandated

> +   by TI ABI.  */

> +int __pruabi_isfinitef(float a)

> +{

> +  return isfinite(a);

> +}

> diff --git a/newlib/libm/machine/pru/isinf.c b/newlib/libm/machine/pru/isinf.c

> new file mode 100644

> index 000000000..2729e148d

> --- /dev/null

> +++ b/newlib/libm/machine/pru/isinf.c

> @@ -0,0 +1,43 @@

> +/*

> +  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

> +  All rights reserved.

> +

> +  Redistribution and use in source and binary forms, with or without

> +  modification, are permitted provided that the following conditions

> +  are met:

> +

> +  * Redistributions of source code must retain the above copyright

> +  notice, this list of conditions and the following disclaimer.

> +

> +  * Redistributions in binary form must reproduce the above copyright

> +  notice, this list of conditions and the following disclaimer in the

> +  documentation and/or other materials provided with the distribution.

> +

> +  * Neither the names of the copyright holders nor the names of their

> +  contributors may be used to endorse or promote products derived from

> +  this software without specific prior written permission.

> +

> +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

> +  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

> +  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

> +  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

> +  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

> +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

> +  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

> +  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

> +  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> +  POSSIBILITY OF SUCH DAMAGE.

> +*/

> +

> +#include <math.h>

> +

> +/* GCC will not generate code calling this function, since the corresponding

> +   builtin will produce code that uses simple ops only.  In order to support

> +   linking against TI CLPRU objects, though, provide the function mandated

> +   by TI ABI.  */

> +int __pruabi_isinf(double a)

> +{

> +  return isinf(a);

> +}

> diff --git a/newlib/libm/machine/pru/isinff.c b/newlib/libm/machine/pru/isinff.c

> new file mode 100644

> index 000000000..6d5a3dfcd

> --- /dev/null

> +++ b/newlib/libm/machine/pru/isinff.c

> @@ -0,0 +1,43 @@

> +/*

> +  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

> +  All rights reserved.

> +

> +  Redistribution and use in source and binary forms, with or without

> +  modification, are permitted provided that the following conditions

> +  are met:

> +

> +  * Redistributions of source code must retain the above copyright

> +  notice, this list of conditions and the following disclaimer.

> +

> +  * Redistributions in binary form must reproduce the above copyright

> +  notice, this list of conditions and the following disclaimer in the

> +  documentation and/or other materials provided with the distribution.

> +

> +  * Neither the names of the copyright holders nor the names of their

> +  contributors may be used to endorse or promote products derived from

> +  this software without specific prior written permission.

> +

> +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

> +  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

> +  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

> +  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

> +  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

> +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

> +  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

> +  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

> +  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> +  POSSIBILITY OF SUCH DAMAGE.

> +*/

> +

> +#include <math.h>

> +

> +/* GCC will not generate code calling this function, since the corresponding

> +   builtin will produce code that uses simple ops only.  In order to support

> +   linking against TI CLPRU objects, though, provide the function mandated

> +   by TI ABI.  */

> +int __pruabi_isinff(float a)

> +{

> +  return isinf(a);

> +}

> diff --git a/newlib/libm/machine/pru/isnan.c b/newlib/libm/machine/pru/isnan.c

> new file mode 100644

> index 000000000..2b27072e4

> --- /dev/null

> +++ b/newlib/libm/machine/pru/isnan.c

> @@ -0,0 +1,43 @@

> +/*

> +  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

> +  All rights reserved.

> +

> +  Redistribution and use in source and binary forms, with or without

> +  modification, are permitted provided that the following conditions

> +  are met:

> +

> +  * Redistributions of source code must retain the above copyright

> +  notice, this list of conditions and the following disclaimer.

> +

> +  * Redistributions in binary form must reproduce the above copyright

> +  notice, this list of conditions and the following disclaimer in the

> +  documentation and/or other materials provided with the distribution.

> +

> +  * Neither the names of the copyright holders nor the names of their

> +  contributors may be used to endorse or promote products derived from

> +  this software without specific prior written permission.

> +

> +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

> +  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

> +  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

> +  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

> +  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

> +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

> +  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

> +  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

> +  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> +  POSSIBILITY OF SUCH DAMAGE.

> +*/

> +

> +#include <math.h>

> +

> +/* GCC will not generate code calling this function, since the corresponding

> +   builtin will produce code that uses simple ops only.  In order to support

> +   linking against TI CLPRU objects, though, provide the function mandated

> +   by TI ABI.  */

> +int __pruabi_isnan(double a)

> +{

> +  return isnan(a);

> +}

> diff --git a/newlib/libm/machine/pru/isnanf.c b/newlib/libm/machine/pru/isnanf.c

> new file mode 100644

> index 000000000..f9a7f56b4

> --- /dev/null

> +++ b/newlib/libm/machine/pru/isnanf.c

> @@ -0,0 +1,43 @@

> +/*

> +  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

> +  All rights reserved.

> +

> +  Redistribution and use in source and binary forms, with or without

> +  modification, are permitted provided that the following conditions

> +  are met:

> +

> +  * Redistributions of source code must retain the above copyright

> +  notice, this list of conditions and the following disclaimer.

> +

> +  * Redistributions in binary form must reproduce the above copyright

> +  notice, this list of conditions and the following disclaimer in the

> +  documentation and/or other materials provided with the distribution.

> +

> +  * Neither the names of the copyright holders nor the names of their

> +  contributors may be used to endorse or promote products derived from

> +  this software without specific prior written permission.

> +

> +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

> +  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

> +  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

> +  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

> +  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

> +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

> +  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

> +  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

> +  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> +  POSSIBILITY OF SUCH DAMAGE.

> +*/

> +

> +#include <math.h>

> +

> +/* GCC will not generate code calling this function, since the corresponding

> +   builtin will produce code that uses simple ops only.  In order to support

> +   linking against TI CLPRU objects, though, provide the function mandated

> +   by TI ABI.  */

> +int __pruabi_isnanf(float a)

> +{

> +  return isnan(a);

> +}

> diff --git a/newlib/libm/machine/pru/isnormal.c b/newlib/libm/machine/pru/isnormal.c

> new file mode 100644

> index 000000000..2c84eb95c

> --- /dev/null

> +++ b/newlib/libm/machine/pru/isnormal.c

> @@ -0,0 +1,43 @@

> +/*

> +  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

> +  All rights reserved.

> +

> +  Redistribution and use in source and binary forms, with or without

> +  modification, are permitted provided that the following conditions

> +  are met:

> +

> +  * Redistributions of source code must retain the above copyright

> +  notice, this list of conditions and the following disclaimer.

> +

> +  * Redistributions in binary form must reproduce the above copyright

> +  notice, this list of conditions and the following disclaimer in the

> +  documentation and/or other materials provided with the distribution.

> +

> +  * Neither the names of the copyright holders nor the names of their

> +  contributors may be used to endorse or promote products derived from

> +  this software without specific prior written permission.

> +

> +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

> +  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

> +  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

> +  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

> +  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

> +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

> +  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

> +  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

> +  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> +  POSSIBILITY OF SUCH DAMAGE.

> +*/

> +

> +#include <math.h>

> +

> +/* GCC will not generate code calling this function, since the corresponding

> +   builtin will produce code that uses simple ops only.  In order to support

> +   linking against TI CLPRU objects, though, provide the function mandated

> +   by TI ABI.  */

> +int __pruabi_isnormal(double a)

> +{

> +  return isnormal(a);

> +}

> diff --git a/newlib/libm/machine/pru/isnormalf.c b/newlib/libm/machine/pru/isnormalf.c

> new file mode 100644

> index 000000000..d4f5bff3d

> --- /dev/null

> +++ b/newlib/libm/machine/pru/isnormalf.c

> @@ -0,0 +1,43 @@

> +/*

> +  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

> +  All rights reserved.

> +

> +  Redistribution and use in source and binary forms, with or without

> +  modification, are permitted provided that the following conditions

> +  are met:

> +

> +  * Redistributions of source code must retain the above copyright

> +  notice, this list of conditions and the following disclaimer.

> +

> +  * Redistributions in binary form must reproduce the above copyright

> +  notice, this list of conditions and the following disclaimer in the

> +  documentation and/or other materials provided with the distribution.

> +

> +  * Neither the names of the copyright holders nor the names of their

> +  contributors may be used to endorse or promote products derived from

> +  this software without specific prior written permission.

> +

> +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

> +  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

> +  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

> +  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

> +  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

> +  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

> +  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

> +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

> +  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

> +  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

> +  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

> +  POSSIBILITY OF SUCH DAMAGE.

> +*/

> +

> +#include <math.h>

> +

> +/* GCC will not generate code calling this function, since the corresponding

> +   builtin will produce code that uses simple ops only.  In order to support

> +   linking against TI CLPRU objects, though, provide the function mandated

> +   by TI ABI.  */

> +int __pruabi_isnormalf(float a)

> +{

> +  return isnormal(a);

> +}

> --

> 2.20.1

>
Dimitar Dimitrov Aug. 26, 2019, 8:08 p.m. | #2
There is no particular reason. I saw that it is being used by many libm sources. I'm willing to 
change it.

What is the preferred newlib license? https://spdx.org/licenses/BSD-2-Clause.html or https://
spdx.org/licenses/BSD-2-Clause-FreeBSD.html ?

Thanks,
Dimitar

On понеделник, 26 август 2019 г. 18:12:48 EEST Joel Sherrill wrote:
> Why the 3 paragraph BSD style license with notice required on binary

> distributions?

> 

> Is it possible to just use the 2-paragraph style?

> 

> Thanks.

> 

> --joel

> 

> On Sun, Aug 25, 2019 at 11:15 PM Dimitar Dimitrov <dimitar@dinux.eu> wrote:

> > The TI proprietary toolchain uses nonstandard names for some math

> > library functions. In order to achieve ABI compatibility between

> > GNU and TI toolchains, add support for the TI function names.

> > 

> > Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>

> > ---

> > 

> >  newlib/configure.host                 |  1 +

> >  newlib/libm/machine/configure.in      |  1 +

> >  newlib/libm/machine/pru/Makefile.am   | 19 ++++++++++++

> >  newlib/libm/machine/pru/configure.in  | 11 +++++++

> >  newlib/libm/machine/pru/fpclassify.c  | 43 +++++++++++++++++++++++++++

> >  newlib/libm/machine/pru/fpclassifyf.c | 43 +++++++++++++++++++++++++++

> >  newlib/libm/machine/pru/isfinite.c    | 43 +++++++++++++++++++++++++++

> >  newlib/libm/machine/pru/isfinitef.c   | 43 +++++++++++++++++++++++++++

> >  newlib/libm/machine/pru/isinf.c       | 43 +++++++++++++++++++++++++++

> >  newlib/libm/machine/pru/isinff.c      | 43 +++++++++++++++++++++++++++

> >  newlib/libm/machine/pru/isnan.c       | 43 +++++++++++++++++++++++++++

> >  newlib/libm/machine/pru/isnanf.c      | 43 +++++++++++++++++++++++++++

> >  newlib/libm/machine/pru/isnormal.c    | 43 +++++++++++++++++++++++++++

> >  newlib/libm/machine/pru/isnormalf.c   | 43 +++++++++++++++++++++++++++

> >  14 files changed, 462 insertions(+)

> >  create mode 100644 newlib/libm/machine/pru/Makefile.am

> >  create mode 100644 newlib/libm/machine/pru/configure.in

> >  create mode 100644 newlib/libm/machine/pru/fpclassify.c

> >  create mode 100644 newlib/libm/machine/pru/fpclassifyf.c

> >  create mode 100644 newlib/libm/machine/pru/isfinite.c

> >  create mode 100644 newlib/libm/machine/pru/isfinitef.c

> >  create mode 100644 newlib/libm/machine/pru/isinf.c

> >  create mode 100644 newlib/libm/machine/pru/isinff.c

> >  create mode 100644 newlib/libm/machine/pru/isnan.c

> >  create mode 100644 newlib/libm/machine/pru/isnanf.c

> >  create mode 100644 newlib/libm/machine/pru/isnormal.c

> >  create mode 100644 newlib/libm/machine/pru/isnormalf.c

> > 

> > diff --git a/newlib/configure.host b/newlib/configure.host

> > index 6a6066bb2..6ee32ca3d 100644

> > --- a/newlib/configure.host

> > +++ b/newlib/configure.host

> > @@ -296,6 +296,7 @@ case "${host_cpu}" in

> > 

> >         default_newlib_nano_malloc="yes"

> >         default_newlib_atexit_dynamic_alloc="no"

> >         machine_dir=pru

> > 

> > +       libm_machine_dir=pru

> > 

> >         ;;

> >    

> >    riscv*)

> >    

> >         libm_machine_dir=riscv

> > 

> > diff --git a/newlib/libm/machine/configure.in

> > b/newlib/libm/machine/configure.in index 55e2d35c3..5a58b6bed 100644

> > --- a/newlib/libm/machine/configure.in

> > +++ b/newlib/libm/machine/configure.in

> > @@ -29,6 +29,7 @@ if test -n "${libm_machine_dir}"; then

> > 

> >         arm) AC_CONFIG_SUBDIRS(arm) ;;

> >         i386) AC_CONFIG_SUBDIRS(i386) ;;

> >         nds32) AC_CONFIG_SUBDIRS(nds32) ;;

> > 

> > +       pru) AC_CONFIG_SUBDIRS(pru) ;;

> > 

> >         spu) AC_CONFIG_SUBDIRS(spu) ;;

> >         riscv) AC_CONFIG_SUBDIRS(riscv) ;;

> >    

> >    esac;

> > 

> > diff --git a/newlib/libm/machine/pru/Makefile.am

> > b/newlib/libm/machine/pru/Makefile.am new file mode 100644

> > index 000000000..69facdf34

> > --- /dev/null

> > +++ b/newlib/libm/machine/pru/Makefile.am

> > @@ -0,0 +1,19 @@

> > +## Process this file with automake to generate Makefile.in

> > +

> > +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \

> > +       $(CROSS_CFLAGS) $(TARGET_CFLAGS)

> > +

> > +LIB_SOURCES = \

> > +       fpclassify.c fpclassifyf.c isfinite.c isfinitef.c isinf.c \

> > +       isinff.c isnan.c isnanf.c isnormal.c isnormalf.c

> > +

> > +noinst_LIBRARIES = lib.a

> > +lib_a_SOURCES = $(LIB_SOURCES)

> > +lib_a_CFLAGS = $(AM_CFLAGS)

> > +lib_a_CCASFLAGS = $(AM_CCASFLAGS)

> > +noinst_DATA =

> > +

> > +include $(srcdir)/../../../Makefile.shared
Joel Sherrill Aug. 26, 2019, 8:18 p.m. | #3
There has been a general trend in the BSD world to go to 2 paragraph. But a
lot of existing code hasn't been updated to it. Sometimes the original
author can't be found to ask.

In newlib's case, the target end user is embedded systems and it is just
another odd thing to keep up with for them to be compliant. Hopefully we
can do an audit and remove the paragraph where it has been removed.upstream.

On Mon, Aug 26, 2019, 3:08 PM Dimitar Dimitrov <dimitar@dinux.eu> wrote:

> There is no particular reason. I saw that it is being used by many libm

> sources. I'm willing to change it.

>

>

>

> What is the preferred newlib license?

> https://spdx.org/licenses/BSD-2-Clause.html or

> https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html ?

>

>

>

> Thanks,

>

> Dimitar

>

>

>

> On понеделник, 26 август 2019 г. 18:12:48 EEST Joel Sherrill wrote:

>

> > Why the 3 paragraph BSD style license with notice required on binary

>

> > distributions?

>

> >

>

> > Is it possible to just use the 2-paragraph style?

>

> >

>

> > Thanks.

>

> >

>

> > --joel

>

> >

>

> > On Sun, Aug 25, 2019 at 11:15 PM Dimitar Dimitrov <dimitar@dinux.eu>

> wrote:

>

> > > The TI proprietary toolchain uses nonstandard names for some math

>

> > > library functions. In order to achieve ABI compatibility between

>

> > > GNU and TI toolchains, add support for the TI function names.

>

> > >

>

> > > Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>

>

> > > ---

>

> > >

>

> > > newlib/configure.host | 1 +

>

> > > newlib/libm/machine/configure.in | 1 +

>

> > > newlib/libm/machine/pru/Makefile.am | 19 ++++++++++++

>

> > > newlib/libm/machine/pru/configure.in | 11 +++++++

>

> > > newlib/libm/machine/pru/fpclassify.c | 43 +++++++++++++++++++++++++++

>

> > > newlib/libm/machine/pru/fpclassifyf.c | 43 +++++++++++++++++++++++++++

>

> > > newlib/libm/machine/pru/isfinite.c | 43 +++++++++++++++++++++++++++

>

> > > newlib/libm/machine/pru/isfinitef.c | 43 +++++++++++++++++++++++++++

>

> > > newlib/libm/machine/pru/isinf.c | 43 +++++++++++++++++++++++++++

>

> > > newlib/libm/machine/pru/isinff.c | 43 +++++++++++++++++++++++++++

>

> > > newlib/libm/machine/pru/isnan.c | 43 +++++++++++++++++++++++++++

>

> > > newlib/libm/machine/pru/isnanf.c | 43 +++++++++++++++++++++++++++

>

> > > newlib/libm/machine/pru/isnormal.c | 43 +++++++++++++++++++++++++++

>

> > > newlib/libm/machine/pru/isnormalf.c | 43 +++++++++++++++++++++++++++

>

> > > 14 files changed, 462 insertions(+)

>

> > > create mode 100644 newlib/libm/machine/pru/Makefile.am

>

> > > create mode 100644 newlib/libm/machine/pru/configure.in

>

> > > create mode 100644 newlib/libm/machine/pru/fpclassify.c

>

> > > create mode 100644 newlib/libm/machine/pru/fpclassifyf.c

>

> > > create mode 100644 newlib/libm/machine/pru/isfinite.c

>

> > > create mode 100644 newlib/libm/machine/pru/isfinitef.c

>

> > > create mode 100644 newlib/libm/machine/pru/isinf.c

>

> > > create mode 100644 newlib/libm/machine/pru/isinff.c

>

> > > create mode 100644 newlib/libm/machine/pru/isnan.c

>

> > > create mode 100644 newlib/libm/machine/pru/isnanf.c

>

> > > create mode 100644 newlib/libm/machine/pru/isnormal.c

>

> > > create mode 100644 newlib/libm/machine/pru/isnormalf.c

>

> > >

>

> > > diff --git a/newlib/configure.host b/newlib/configure.host

>

> > > index 6a6066bb2..6ee32ca3d 100644

>

> > > --- a/newlib/configure.host

>

> > > +++ b/newlib/configure.host

>

> > > @@ -296,6 +296,7 @@ case "${host_cpu}" in

>

> > >

>

> > > default_newlib_nano_malloc="yes"

>

> > > default_newlib_atexit_dynamic_alloc="no"

>

> > > machine_dir=pru

>

> > >

>

> > > + libm_machine_dir=pru

>

> > >

>

> > > ;;

>

> > >

>

> > > riscv*)

>

> > >

>

> > > libm_machine_dir=riscv

>

> > >

>

> > > diff --git a/newlib/libm/machine/configure.in

>

> > > b/newlib/libm/machine/configure.in index 55e2d35c3..5a58b6bed 100644

>

> > > --- a/newlib/libm/machine/configure.in

>

> > > +++ b/newlib/libm/machine/configure.in

>

> > > @@ -29,6 +29,7 @@ if test -n "${libm_machine_dir}"; then

>

> > >

>

> > > arm) AC_CONFIG_SUBDIRS(arm) ;;

>

> > > i386) AC_CONFIG_SUBDIRS(i386) ;;

>

> > > nds32) AC_CONFIG_SUBDIRS(nds32) ;;

>

> > >

>

> > > + pru) AC_CONFIG_SUBDIRS(pru) ;;

>

> > >

>

> > > spu) AC_CONFIG_SUBDIRS(spu) ;;

>

> > > riscv) AC_CONFIG_SUBDIRS(riscv) ;;

>

> > >

>

> > > esac;

>

> > >

>

> > > diff --git a/newlib/libm/machine/pru/Makefile.am

>

> > > b/newlib/libm/machine/pru/Makefile.am new file mode 100644

>

> > > index 000000000..69facdf34

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/Makefile.am

>

> > > @@ -0,0 +1,19 @@

>

> > > +## Process this file with automake to generate Makefile.in

>

> > > +

>

> > > +INCLUDES = -I $(newlib_basedir)/../newlib/libm/common

> $(NEWLIB_CFLAGS) \

>

> > > + $(CROSS_CFLAGS) $(TARGET_CFLAGS)

>

> > > +

>

> > > +LIB_SOURCES = \

>

> > > + fpclassify.c fpclassifyf.c isfinite.c isfinitef.c isinf.c \

>

> > > + isinff.c isnan.c isnanf.c isnormal.c isnormalf.c

>

> > > +

>

> > > +noinst_LIBRARIES = lib.a

>

> > > +lib_a_SOURCES = $(LIB_SOURCES)

>

> > > +lib_a_CFLAGS = $(AM_CFLAGS)

>

> > > +lib_a_CCASFLAGS = $(AM_CCASFLAGS)

>

> > > +noinst_DATA =

>

> > > +

>

> > > +include $(srcdir)/../../../Makefile.shared

>

> > > +

>

> > > +ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..

>

> > > +CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host

>

> > > diff --git a/newlib/libm/machine/pru/configure.in

>

> > > b/newlib/libm/machine/pru/configure.in new file mode 100644

>

> > > index 000000000..7a22fa31c

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/configure.in

>

> > > @@ -0,0 +1,11 @@

>

> > > +

>

> > > +AC_PREREQ(2.59)

>

> > > +AC_INIT([newlib],[NEWLIB_VERSION])

>

> > > +AC_CONFIG_SRCDIR([Makefile.am])

>

> > > +

>

> > > +AC_CONFIG_AUX_DIR(../../../..)

>

> > > +

>

> > > +NEWLIB_CONFIGURE(../../..)

>

> > > +

>

> > > +AC_CONFIG_FILES([Makefile])

>

> > > +AC_OUTPUT

>

> > > diff --git a/newlib/libm/machine/pru/fpclassify.c

>

> > > b/newlib/libm/machine/pru/fpclassify.c new file mode 100644

>

> > > index 000000000..35f193974

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/fpclassify.c

>

> > > @@ -0,0 +1,43 @@

>

> > > +/*

>

> > > + (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

>

> > > + All rights reserved.

>

> > > +

>

> > > + Redistribution and use in source and binary forms, with or without

>

> > > + modification, are permitted provided that the following conditions

>

> > > + are met:

>

> > > +

>

> > > + * Redistributions of source code must retain the above copyright

>

> > > + notice, this list of conditions and the following disclaimer.

>

> > > +

>

> > > + * Redistributions in binary form must reproduce the above copyright

>

> > > + notice, this list of conditions and the following disclaimer in the

>

> > > + documentation and/or other materials provided with the distribution.

>

> > > +

>

> > > + * Neither the names of the copyright holders nor the names of their

>

> > > + contributors may be used to endorse or promote products derived from

>

> > > + this software without specific prior written permission.

>

> > > +

>

> > > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

>

> > > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

>

> > > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

>

> > > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

>

> > > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

>

> > > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

>

> > > + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

>

> > > + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

>

> > > + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

>

> > > + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

>

> > > + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

>

> > > + POSSIBILITY OF SUCH DAMAGE.

>

> > > +*/

>

> > > +

>

> > > +#include <math.h>

>

> > > +

>

> > > +/* GCC will not generate code calling this function, since the

>

> > > corresponding + builtin will produce code that uses simple ops only.

>

> > > In order to support + linking against TI CLPRU objects, though, provide

>

> > > the function mandated + by TI ABI. */

>

> > > +int __pruabi_fpclassify(double a)

>

> > > +{

>

> > > + return fpclassify(a);

>

> > > +}

>

> > > diff --git a/newlib/libm/machine/pru/fpclassifyf.c

>

> > > b/newlib/libm/machine/pru/fpclassifyf.c new file mode 100644

>

> > > index 000000000..22beb1d28

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/fpclassifyf.c

>

> > > @@ -0,0 +1,43 @@

>

> > > +/*

>

> > > + (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

>

> > > + All rights reserved.

>

> > > +

>

> > > + Redistribution and use in source and binary forms, with or without

>

> > > + modification, are permitted provided that the following conditions

>

> > > + are met:

>

> > > +

>

> > > + * Redistributions of source code must retain the above copyright

>

> > > + notice, this list of conditions and the following disclaimer.

>

> > > +

>

> > > + * Redistributions in binary form must reproduce the above copyright

>

> > > + notice, this list of conditions and the following disclaimer in the

>

> > > + documentation and/or other materials provided with the distribution.

>

> > > +

>

> > > + * Neither the names of the copyright holders nor the names of their

>

> > > + contributors may be used to endorse or promote products derived from

>

> > > + this software without specific prior written permission.

>

> > > +

>

> > > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

>

> > > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

>

> > > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

>

> > > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

>

> > > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

>

> > > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

>

> > > + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

>

> > > + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

>

> > > + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

>

> > > + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

>

> > > + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

>

> > > + POSSIBILITY OF SUCH DAMAGE.

>

> > > +*/

>

> > > +

>

> > > +#include <math.h>

>

> > > +

>

> > > +/* GCC will not generate code calling this function, since the

>

> > > corresponding + builtin will produce code that uses simple ops only.

>

> > > In order to support + linking against TI CLPRU objects, though, provide

>

> > > the function mandated + by TI ABI. */

>

> > > +int __pruabi_fpclassifyf(float a)

>

> > > +{

>

> > > + return fpclassifyf(a);

>

> > > +}

>

> > > diff --git a/newlib/libm/machine/pru/isfinite.c

>

> > > b/newlib/libm/machine/pru/isfinite.c new file mode 100644

>

> > > index 000000000..6c615c8cc

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/isfinite.c

>

> > > @@ -0,0 +1,43 @@

>

> > > +/*

>

> > > + (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

>

> > > + All rights reserved.

>

> > > +

>

> > > + Redistribution and use in source and binary forms, with or without

>

> > > + modification, are permitted provided that the following conditions

>

> > > + are met:

>

> > > +

>

> > > + * Redistributions of source code must retain the above copyright

>

> > > + notice, this list of conditions and the following disclaimer.

>

> > > +

>

> > > + * Redistributions in binary form must reproduce the above copyright

>

> > > + notice, this list of conditions and the following disclaimer in the

>

> > > + documentation and/or other materials provided with the distribution.

>

> > > +

>

> > > + * Neither the names of the copyright holders nor the names of their

>

> > > + contributors may be used to endorse or promote products derived from

>

> > > + this software without specific prior written permission.

>

> > > +

>

> > > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

>

> > > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

>

> > > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

>

> > > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

>

> > > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

>

> > > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

>

> > > + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

>

> > > + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

>

> > > + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

>

> > > + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

>

> > > + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

>

> > > + POSSIBILITY OF SUCH DAMAGE.

>

> > > +*/

>

> > > +

>

> > > +#include <math.h>

>

> > > +

>

> > > +/* GCC will not generate code calling this function, since the

>

> > > corresponding + builtin will produce code that uses simple ops only.

>

> > > In order to support + linking against TI CLPRU objects, though, provide

>

> > > the function mandated + by TI ABI. */

>

> > > +int __pruabi_isfinite(double a)

>

> > > +{

>

> > > + return isfinite(a);

>

> > > +}

>

> > > diff --git a/newlib/libm/machine/pru/isfinitef.c

>

> > > b/newlib/libm/machine/pru/isfinitef.c new file mode 100644

>

> > > index 000000000..1b0a5cedc

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/isfinitef.c

>

> > > @@ -0,0 +1,43 @@

>

> > > +/*

>

> > > + (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

>

> > > + All rights reserved.

>

> > > +

>

> > > + Redistribution and use in source and binary forms, with or without

>

> > > + modification, are permitted provided that the following conditions

>

> > > + are met:

>

> > > +

>

> > > + * Redistributions of source code must retain the above copyright

>

> > > + notice, this list of conditions and the following disclaimer.

>

> > > +

>

> > > + * Redistributions in binary form must reproduce the above copyright

>

> > > + notice, this list of conditions and the following disclaimer in the

>

> > > + documentation and/or other materials provided with the distribution.

>

> > > +

>

> > > + * Neither the names of the copyright holders nor the names of their

>

> > > + contributors may be used to endorse or promote products derived from

>

> > > + this software without specific prior written permission.

>

> > > +

>

> > > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

>

> > > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

>

> > > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

>

> > > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

>

> > > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

>

> > > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

>

> > > + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

>

> > > + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

>

> > > + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

>

> > > + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

>

> > > + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

>

> > > + POSSIBILITY OF SUCH DAMAGE.

>

> > > +*/

>

> > > +

>

> > > +#include <math.h>

>

> > > +

>

> > > +/* GCC will not generate code calling this function, since the

>

> > > corresponding + builtin will produce code that uses simple ops only.

>

> > > In order to support + linking against TI CLPRU objects, though, provide

>

> > > the function mandated + by TI ABI. */

>

> > > +int __pruabi_isfinitef(float a)

>

> > > +{

>

> > > + return isfinite(a);

>

> > > +}

>

> > > diff --git a/newlib/libm/machine/pru/isinf.c

>

> > > b/newlib/libm/machine/pru/isinf.c new file mode 100644

>

> > > index 000000000..2729e148d

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/isinf.c

>

> > > @@ -0,0 +1,43 @@

>

> > > +/*

>

> > > + (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

>

> > > + All rights reserved.

>

> > > +

>

> > > + Redistribution and use in source and binary forms, with or without

>

> > > + modification, are permitted provided that the following conditions

>

> > > + are met:

>

> > > +

>

> > > + * Redistributions of source code must retain the above copyright

>

> > > + notice, this list of conditions and the following disclaimer.

>

> > > +

>

> > > + * Redistributions in binary form must reproduce the above copyright

>

> > > + notice, this list of conditions and the following disclaimer in the

>

> > > + documentation and/or other materials provided with the distribution.

>

> > > +

>

> > > + * Neither the names of the copyright holders nor the names of their

>

> > > + contributors may be used to endorse or promote products derived from

>

> > > + this software without specific prior written permission.

>

> > > +

>

> > > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

>

> > > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

>

> > > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

>

> > > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

>

> > > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

>

> > > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

>

> > > + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

>

> > > + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

>

> > > + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

>

> > > + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

>

> > > + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

>

> > > + POSSIBILITY OF SUCH DAMAGE.

>

> > > +*/

>

> > > +

>

> > > +#include <math.h>

>

> > > +

>

> > > +/* GCC will not generate code calling this function, since the

>

> > > corresponding + builtin will produce code that uses simple ops only.

>

> > > In order to support + linking against TI CLPRU objects, though, provide

>

> > > the function mandated + by TI ABI. */

>

> > > +int __pruabi_isinf(double a)

>

> > > +{

>

> > > + return isinf(a);

>

> > > +}

>

> > > diff --git a/newlib/libm/machine/pru/isinff.c

>

> > > b/newlib/libm/machine/pru/isinff.c new file mode 100644

>

> > > index 000000000..6d5a3dfcd

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/isinff.c

>

> > > @@ -0,0 +1,43 @@

>

> > > +/*

>

> > > + (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

>

> > > + All rights reserved.

>

> > > +

>

> > > + Redistribution and use in source and binary forms, with or without

>

> > > + modification, are permitted provided that the following conditions

>

> > > + are met:

>

> > > +

>

> > > + * Redistributions of source code must retain the above copyright

>

> > > + notice, this list of conditions and the following disclaimer.

>

> > > +

>

> > > + * Redistributions in binary form must reproduce the above copyright

>

> > > + notice, this list of conditions and the following disclaimer in the

>

> > > + documentation and/or other materials provided with the distribution.

>

> > > +

>

> > > + * Neither the names of the copyright holders nor the names of their

>

> > > + contributors may be used to endorse or promote products derived from

>

> > > + this software without specific prior written permission.

>

> > > +

>

> > > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

>

> > > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

>

> > > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

>

> > > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

>

> > > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

>

> > > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

>

> > > + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

>

> > > + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

>

> > > + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

>

> > > + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

>

> > > + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

>

> > > + POSSIBILITY OF SUCH DAMAGE.

>

> > > +*/

>

> > > +

>

> > > +#include <math.h>

>

> > > +

>

> > > +/* GCC will not generate code calling this function, since the

>

> > > corresponding + builtin will produce code that uses simple ops only.

>

> > > In order to support + linking against TI CLPRU objects, though, provide

>

> > > the function mandated + by TI ABI. */

>

> > > +int __pruabi_isinff(float a)

>

> > > +{

>

> > > + return isinf(a);

>

> > > +}

>

> > > diff --git a/newlib/libm/machine/pru/isnan.c

>

> > > b/newlib/libm/machine/pru/isnan.c new file mode 100644

>

> > > index 000000000..2b27072e4

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/isnan.c

>

> > > @@ -0,0 +1,43 @@

>

> > > +/*

>

> > > + (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

>

> > > + All rights reserved.

>

> > > +

>

> > > + Redistribution and use in source and binary forms, with or without

>

> > > + modification, are permitted provided that the following conditions

>

> > > + are met:

>

> > > +

>

> > > + * Redistributions of source code must retain the above copyright

>

> > > + notice, this list of conditions and the following disclaimer.

>

> > > +

>

> > > + * Redistributions in binary form must reproduce the above copyright

>

> > > + notice, this list of conditions and the following disclaimer in the

>

> > > + documentation and/or other materials provided with the distribution.

>

> > > +

>

> > > + * Neither the names of the copyright holders nor the names of their

>

> > > + contributors may be used to endorse or promote products derived from

>

> > > + this software without specific prior written permission.

>

> > > +

>

> > > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

>

> > > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

>

> > > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

>

> > > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

>

> > > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

>

> > > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

>

> > > + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

>

> > > + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

>

> > > + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

>

> > > + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

>

> > > + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

>

> > > + POSSIBILITY OF SUCH DAMAGE.

>

> > > +*/

>

> > > +

>

> > > +#include <math.h>

>

> > > +

>

> > > +/* GCC will not generate code calling this function, since the

>

> > > corresponding + builtin will produce code that uses simple ops only.

>

> > > In order to support + linking against TI CLPRU objects, though, provide

>

> > > the function mandated + by TI ABI. */

>

> > > +int __pruabi_isnan(double a)

>

> > > +{

>

> > > + return isnan(a);

>

> > > +}

>

> > > diff --git a/newlib/libm/machine/pru/isnanf.c

>

> > > b/newlib/libm/machine/pru/isnanf.c new file mode 100644

>

> > > index 000000000..f9a7f56b4

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/isnanf.c

>

> > > @@ -0,0 +1,43 @@

>

> > > +/*

>

> > > + (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

>

> > > + All rights reserved.

>

> > > +

>

> > > + Redistribution and use in source and binary forms, with or without

>

> > > + modification, are permitted provided that the following conditions

>

> > > + are met:

>

> > > +

>

> > > + * Redistributions of source code must retain the above copyright

>

> > > + notice, this list of conditions and the following disclaimer.

>

> > > +

>

> > > + * Redistributions in binary form must reproduce the above copyright

>

> > > + notice, this list of conditions and the following disclaimer in the

>

> > > + documentation and/or other materials provided with the distribution.

>

> > > +

>

> > > + * Neither the names of the copyright holders nor the names of their

>

> > > + contributors may be used to endorse or promote products derived from

>

> > > + this software without specific prior written permission.

>

> > > +

>

> > > + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS

>

> > > + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

>

> > > + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS

>

> > > + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE

>

> > > + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,

>

> > > + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,

>

> > > + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;

>

> > > + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

>

> > > + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT

>

> > > + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN

>

> > > + ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE

>

> > > + POSSIBILITY OF SUCH DAMAGE.

>

> > > +*/

>

> > > +

>

> > > +#include <math.h>

>

> > > +

>

> > > +/* GCC will not generate code calling this function, since the

>

> > > corresponding + builtin will produce code that uses simple ops only.

>

> > > In order to support + linking against TI CLPRU objects, though, provide

>

> > > the function mandated + by TI ABI. */

>

> > > +int __pruabi_isnanf(float a)

>

> > > +{

>

> > > + return isnan(a);

>

> > > +}

>

> > > diff --git a/newlib/libm/machine/pru/isnormal.c

>

> > > b/newlib/libm/machine/pru/isnormal.c new file mode 100644

>

> > > index 000000000..2c84eb95c

>

> > > --- /dev/null

>

> > > +++ b/newlib/libm/machine/pru/isnormal.c

>

> > > @@ -0,0 +1,43 @@

>

> > > +/*

>

> > > + (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>

>

> > > + All rights reserved.

>

> > > +

>

> > > + Redistribution and use in source and binary forms, with or without

>

> > > + modification, are permitted provided that the following conditions

>

> > > + are met:

>

> > > +

>

> > > + * Redistributions of source code must retain the above copyright

>

> > > + notice, this list of conditi

>

Patch

diff --git a/newlib/configure.host b/newlib/configure.host
index 6a6066bb2..6ee32ca3d 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -296,6 +296,7 @@  case "${host_cpu}" in
 	default_newlib_nano_malloc="yes"
 	default_newlib_atexit_dynamic_alloc="no"
 	machine_dir=pru
+	libm_machine_dir=pru
 	;;
   riscv*)
 	libm_machine_dir=riscv
diff --git a/newlib/libm/machine/configure.in b/newlib/libm/machine/configure.in
index 55e2d35c3..5a58b6bed 100644
--- a/newlib/libm/machine/configure.in
+++ b/newlib/libm/machine/configure.in
@@ -29,6 +29,7 @@  if test -n "${libm_machine_dir}"; then
 	arm) AC_CONFIG_SUBDIRS(arm) ;;
 	i386) AC_CONFIG_SUBDIRS(i386) ;;
 	nds32) AC_CONFIG_SUBDIRS(nds32) ;;
+	pru) AC_CONFIG_SUBDIRS(pru) ;;
 	spu) AC_CONFIG_SUBDIRS(spu) ;;
 	riscv) AC_CONFIG_SUBDIRS(riscv) ;;
   esac;
diff --git a/newlib/libm/machine/pru/Makefile.am b/newlib/libm/machine/pru/Makefile.am
new file mode 100644
index 000000000..69facdf34
--- /dev/null
+++ b/newlib/libm/machine/pru/Makefile.am
@@ -0,0 +1,19 @@ 
+## Process this file with automake to generate Makefile.in
+
+INCLUDES = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
+	$(CROSS_CFLAGS) $(TARGET_CFLAGS)
+
+LIB_SOURCES = \
+	fpclassify.c fpclassifyf.c isfinite.c isfinitef.c isinf.c \
+	isinff.c isnan.c isnanf.c isnormal.c isnormalf.c
+
+noinst_LIBRARIES = lib.a
+lib_a_SOURCES = $(LIB_SOURCES)
+lib_a_CFLAGS = $(AM_CFLAGS)
+lib_a_CCASFLAGS = $(AM_CCASFLAGS)
+noinst_DATA =
+
+include $(srcdir)/../../../Makefile.shared
+
+ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
+CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libm/machine/pru/configure.in b/newlib/libm/machine/pru/configure.in
new file mode 100644
index 000000000..7a22fa31c
--- /dev/null
+++ b/newlib/libm/machine/pru/configure.in
@@ -0,0 +1,11 @@ 
+
+AC_PREREQ(2.59)
+AC_INIT([newlib],[NEWLIB_VERSION])
+AC_CONFIG_SRCDIR([Makefile.am])
+
+AC_CONFIG_AUX_DIR(../../../..)
+
+NEWLIB_CONFIGURE(../../..)
+
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
diff --git a/newlib/libm/machine/pru/fpclassify.c b/newlib/libm/machine/pru/fpclassify.c
new file mode 100644
index 000000000..35f193974
--- /dev/null
+++ b/newlib/libm/machine/pru/fpclassify.c
@@ -0,0 +1,43 @@ 
+/*
+  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of their
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <math.h>
+
+/* GCC will not generate code calling this function, since the corresponding
+   builtin will produce code that uses simple ops only.  In order to support
+   linking against TI CLPRU objects, though, provide the function mandated
+   by TI ABI.  */
+int __pruabi_fpclassify(double a)
+{
+  return fpclassify(a);
+}
diff --git a/newlib/libm/machine/pru/fpclassifyf.c b/newlib/libm/machine/pru/fpclassifyf.c
new file mode 100644
index 000000000..22beb1d28
--- /dev/null
+++ b/newlib/libm/machine/pru/fpclassifyf.c
@@ -0,0 +1,43 @@ 
+/*
+  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of their
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <math.h>
+
+/* GCC will not generate code calling this function, since the corresponding
+   builtin will produce code that uses simple ops only.  In order to support
+   linking against TI CLPRU objects, though, provide the function mandated
+   by TI ABI.  */
+int __pruabi_fpclassifyf(float a)
+{
+  return fpclassifyf(a);
+}
diff --git a/newlib/libm/machine/pru/isfinite.c b/newlib/libm/machine/pru/isfinite.c
new file mode 100644
index 000000000..6c615c8cc
--- /dev/null
+++ b/newlib/libm/machine/pru/isfinite.c
@@ -0,0 +1,43 @@ 
+/*
+  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of their
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <math.h>
+
+/* GCC will not generate code calling this function, since the corresponding
+   builtin will produce code that uses simple ops only.  In order to support
+   linking against TI CLPRU objects, though, provide the function mandated
+   by TI ABI.  */
+int __pruabi_isfinite(double a)
+{
+  return isfinite(a);
+}
diff --git a/newlib/libm/machine/pru/isfinitef.c b/newlib/libm/machine/pru/isfinitef.c
new file mode 100644
index 000000000..1b0a5cedc
--- /dev/null
+++ b/newlib/libm/machine/pru/isfinitef.c
@@ -0,0 +1,43 @@ 
+/*
+  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of their
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <math.h>
+
+/* GCC will not generate code calling this function, since the corresponding
+   builtin will produce code that uses simple ops only.  In order to support
+   linking against TI CLPRU objects, though, provide the function mandated
+   by TI ABI.  */
+int __pruabi_isfinitef(float a)
+{
+  return isfinite(a);
+}
diff --git a/newlib/libm/machine/pru/isinf.c b/newlib/libm/machine/pru/isinf.c
new file mode 100644
index 000000000..2729e148d
--- /dev/null
+++ b/newlib/libm/machine/pru/isinf.c
@@ -0,0 +1,43 @@ 
+/*
+  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of their
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <math.h>
+
+/* GCC will not generate code calling this function, since the corresponding
+   builtin will produce code that uses simple ops only.  In order to support
+   linking against TI CLPRU objects, though, provide the function mandated
+   by TI ABI.  */
+int __pruabi_isinf(double a)
+{
+  return isinf(a);
+}
diff --git a/newlib/libm/machine/pru/isinff.c b/newlib/libm/machine/pru/isinff.c
new file mode 100644
index 000000000..6d5a3dfcd
--- /dev/null
+++ b/newlib/libm/machine/pru/isinff.c
@@ -0,0 +1,43 @@ 
+/*
+  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of their
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <math.h>
+
+/* GCC will not generate code calling this function, since the corresponding
+   builtin will produce code that uses simple ops only.  In order to support
+   linking against TI CLPRU objects, though, provide the function mandated
+   by TI ABI.  */
+int __pruabi_isinff(float a)
+{
+  return isinf(a);
+}
diff --git a/newlib/libm/machine/pru/isnan.c b/newlib/libm/machine/pru/isnan.c
new file mode 100644
index 000000000..2b27072e4
--- /dev/null
+++ b/newlib/libm/machine/pru/isnan.c
@@ -0,0 +1,43 @@ 
+/*
+  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of their
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <math.h>
+
+/* GCC will not generate code calling this function, since the corresponding
+   builtin will produce code that uses simple ops only.  In order to support
+   linking against TI CLPRU objects, though, provide the function mandated
+   by TI ABI.  */
+int __pruabi_isnan(double a)
+{
+  return isnan(a);
+}
diff --git a/newlib/libm/machine/pru/isnanf.c b/newlib/libm/machine/pru/isnanf.c
new file mode 100644
index 000000000..f9a7f56b4
--- /dev/null
+++ b/newlib/libm/machine/pru/isnanf.c
@@ -0,0 +1,43 @@ 
+/*
+  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of their
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <math.h>
+
+/* GCC will not generate code calling this function, since the corresponding
+   builtin will produce code that uses simple ops only.  In order to support
+   linking against TI CLPRU objects, though, provide the function mandated
+   by TI ABI.  */
+int __pruabi_isnanf(float a)
+{
+  return isnan(a);
+}
diff --git a/newlib/libm/machine/pru/isnormal.c b/newlib/libm/machine/pru/isnormal.c
new file mode 100644
index 000000000..2c84eb95c
--- /dev/null
+++ b/newlib/libm/machine/pru/isnormal.c
@@ -0,0 +1,43 @@ 
+/*
+  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of their
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <math.h>
+
+/* GCC will not generate code calling this function, since the corresponding
+   builtin will produce code that uses simple ops only.  In order to support
+   linking against TI CLPRU objects, though, provide the function mandated
+   by TI ABI.  */
+int __pruabi_isnormal(double a)
+{
+  return isnormal(a);
+}
diff --git a/newlib/libm/machine/pru/isnormalf.c b/newlib/libm/machine/pru/isnormalf.c
new file mode 100644
index 000000000..d4f5bff3d
--- /dev/null
+++ b/newlib/libm/machine/pru/isnormalf.c
@@ -0,0 +1,43 @@ 
+/*
+  (c) Copyright 2017-2019 Dimitar Dimitrov <dimitar@dinux.eu>
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+
+  * Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+  * Redistributions in binary form must reproduce the above copyright
+  notice, this list of conditions and the following disclaimer in the
+  documentation and/or other materials provided with the distribution.
+
+  * Neither the names of the copyright holders nor the names of their
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+  POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <math.h>
+
+/* GCC will not generate code calling this function, since the corresponding
+   builtin will produce code that uses simple ops only.  In order to support
+   linking against TI CLPRU objects, though, provide the function mandated
+   by TI ABI.  */
+int __pruabi_isnormalf(float a)
+{
+  return isnormal(a);
+}