diff --git a/Kconfig b/Kconfig index e24ae4f4cd..b58ddeb26b 100644 --- a/Kconfig +++ b/Kconfig @@ -2132,6 +2132,7 @@ endmenu menu "Library Routines" source "libs/libc/Kconfig" +source "libs/libm/Kconfig" source "libs/libxx/Kconfig" source "libs/libdsp/Kconfig" endmenu diff --git a/LICENSE b/LICENSE index a071cbda57..2309023a0c 100644 --- a/LICENSE +++ b/LICENSE @@ -5888,9 +5888,9 @@ 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. -libs/libc/math/scalbnf.c -libs/libc/math/scalbn.c -libs/libc/math/scalbnl.c +libs/libm/libm/scalbnf.c +libs/libm/libm/scalbn.c +libs/libm/libm/scalbnl.c libs/libc/stdlib/lib_strtof.c ====================== @@ -5915,10 +5915,10 @@ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -libs/libc/math/__cos.c -libs/libc/math/__sin.c -libs/libc/math/lib_lgamma.c -libs/libc/math/lib_copysignf.c +libs/libm/libm/__cos.c +libs/libm/libm/__sin.c +libs/libm/libm/lib_lgamma.c +libs/libm/libm/lib_copysignf.c ====================== Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. diff --git a/arch/arm/src/common/Toolchain.defs b/arch/arm/src/common/Toolchain.defs index 099777f56b..34eaf1c34b 100644 --- a/arch/arm/src/common/Toolchain.defs +++ b/arch/arm/src/common/Toolchain.defs @@ -327,7 +327,7 @@ endif EXTRA_LIBS += $(COMPILER_RT_LIB) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/arch/arm64/src/Toolchain.defs b/arch/arm64/src/Toolchain.defs index 3da85b5258..7b2c9cb0d0 100644 --- a/arch/arm64/src/Toolchain.defs +++ b/arch/arm64/src/Toolchain.defs @@ -142,7 +142,7 @@ endif EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/arch/avr/src/avr/Toolchain.defs b/arch/avr/src/avr/Toolchain.defs index 09a80e24fe..80aee36206 100644 --- a/arch/avr/src/avr/Toolchain.defs +++ b/arch/avr/src/avr/Toolchain.defs @@ -156,7 +156,7 @@ OBJDUMP = $(CROSSDEV)objdump EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/arch/avr/src/avr32/Toolchain.defs b/arch/avr/src/avr32/Toolchain.defs index 928074f65e..971d0a214d 100644 --- a/arch/avr/src/avr32/Toolchain.defs +++ b/arch/avr/src/avr32/Toolchain.defs @@ -86,7 +86,7 @@ OBJDUMP = $(CROSSDEV)objdump EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/arch/hc/src/Makefile b/arch/hc/src/Makefile index a96d88ca3f..3d08b1704d 100644 --- a/arch/hc/src/Makefile +++ b/arch/hc/src/Makefile @@ -76,7 +76,7 @@ endif EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name}} -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a}} endif diff --git a/arch/mips/src/mips32/Toolchain.defs b/arch/mips/src/mips32/Toolchain.defs index c63c9067bb..dacc28b527 100644 --- a/arch/mips/src/mips32/Toolchain.defs +++ b/arch/mips/src/mips32/Toolchain.defs @@ -295,7 +295,7 @@ OBJDUMP = $(CROSSDEV)objdump EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/arch/misoc/src/lm32/Toolchain.defs b/arch/misoc/src/lm32/Toolchain.defs index 9269a4fd95..ffd86a4f14 100644 --- a/arch/misoc/src/lm32/Toolchain.defs +++ b/arch/misoc/src/lm32/Toolchain.defs @@ -117,7 +117,7 @@ OBJDUMP = $(CROSSDEV)objdump EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/arch/misoc/src/minerva/Toolchain.defs b/arch/misoc/src/minerva/Toolchain.defs index 7f3c1fb4c1..a863095f20 100644 --- a/arch/misoc/src/minerva/Toolchain.defs +++ b/arch/misoc/src/minerva/Toolchain.defs @@ -65,7 +65,7 @@ OBJDUMP = $(CROSSDEV)objdump EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/arch/or1k/src/mor1kx/Toolchain.defs b/arch/or1k/src/mor1kx/Toolchain.defs index ccf1293250..68ddff4d2c 100644 --- a/arch/or1k/src/mor1kx/Toolchain.defs +++ b/arch/or1k/src/mor1kx/Toolchain.defs @@ -103,7 +103,7 @@ OBJDUMP = $(CROSSDEV)objdump EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/arch/renesas/src/Makefile b/arch/renesas/src/Makefile index fc8ab64081..4f7501986e 100644 --- a/arch/renesas/src/Makefile +++ b/arch/renesas/src/Makefile @@ -69,7 +69,7 @@ endif EXTRA_LIBS += ${shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name} -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a}} endif diff --git a/arch/risc-v/src/common/Toolchain.defs b/arch/risc-v/src/common/Toolchain.defs index c8767b4429..9c7e6a4719 100644 --- a/arch/risc-v/src/common/Toolchain.defs +++ b/arch/risc-v/src/common/Toolchain.defs @@ -221,7 +221,7 @@ endif EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile index e43dbd1e76..cf69123a8b 100644 --- a/arch/sim/src/Makefile +++ b/arch/sim/src/Makefile @@ -108,7 +108,7 @@ else STDLIBS += -lrt endif -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) STDLIBS += -lm endif diff --git a/arch/x86/src/Makefile b/arch/x86/src/Makefile index 6f0e3d4fff..176bf7ceb7 100644 --- a/arch/x86/src/Makefile +++ b/arch/x86/src/Makefile @@ -73,7 +73,7 @@ endif EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name}} -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a}} endif diff --git a/arch/x86_64/src/Makefile b/arch/x86_64/src/Makefile index 7c61aa405c..b37f96f679 100644 --- a/arch/x86_64/src/Makefile +++ b/arch/x86_64/src/Makefile @@ -75,7 +75,7 @@ endif EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name}} -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += ${wildcard ${shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a}} endif diff --git a/arch/xtensa/src/lx6/Toolchain.defs b/arch/xtensa/src/lx6/Toolchain.defs index 4b64d96424..729ff36979 100644 --- a/arch/xtensa/src/lx6/Toolchain.defs +++ b/arch/xtensa/src/lx6/Toolchain.defs @@ -148,7 +148,7 @@ OBJDUMP = $(CROSSDEV)objdump EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/arch/xtensa/src/lx7/Toolchain.defs b/arch/xtensa/src/lx7/Toolchain.defs index 0102a96cff..2b05eafde2 100644 --- a/arch/xtensa/src/lx7/Toolchain.defs +++ b/arch/xtensa/src/lx7/Toolchain.defs @@ -148,7 +148,7 @@ OBJDUMP = $(CROSSDEV)objdump EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-libgcc-file-name)) -ifneq ($(CONFIG_LIBM),y) +ifeq ($(CONFIG_LIBM_TOOLCHAIN),y) EXTRA_LIBS += $(wildcard $(shell $(CC) $(ARCHCPUFLAGS) --print-file-name=libm.a)) endif diff --git a/boards/arm/stm32/stm32f103-minimum/configs/sensors/defconfig b/boards/arm/stm32/stm32f103-minimum/configs/sensors/defconfig index 7da4a13ce1..3892db63b3 100644 --- a/boards/arm/stm32/stm32f103-minimum/configs/sensors/defconfig +++ b/boards/arm/stm32/stm32f103-minimum/configs/sensors/defconfig @@ -35,6 +35,7 @@ CONFIG_I2C_DRIVER=y CONFIG_I2C_RESET=y CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_LIBC_FLOATINGPOINT=y +CONFIG_LIBM_TOOLCHAIN=y CONFIG_LTO_FULL=y CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y diff --git a/boards/risc-v/c906/smartl-c906/configs/elf/defconfig b/boards/risc-v/c906/smartl-c906/configs/elf/defconfig index a75a2cfa7c..bb1f3c3097 100644 --- a/boards/risc-v/c906/smartl-c906/configs/elf/defconfig +++ b/boards/risc-v/c906/smartl-c906/configs/elf/defconfig @@ -36,6 +36,7 @@ CONFIG_INIT_STACKSIZE=3072 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y +CONFIG_LIBM=y CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_DISABLE_IFUPDOWN=y diff --git a/boards/risc-v/esp32c3/esp32c3-devkit/configs/elf/defconfig b/boards/risc-v/esp32c3/esp32c3-devkit/configs/elf/defconfig index 8768478fc5..ebb853b0bd 100644 --- a/boards/risc-v/esp32c3/esp32c3-devkit/configs/elf/defconfig +++ b/boards/risc-v/esp32c3/esp32c3-devkit/configs/elf/defconfig @@ -35,6 +35,7 @@ CONFIG_INIT_STACKSIZE=8192 CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y +CONFIG_LIBM=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig index 4b4315b5d3..08ee722e86 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/smp/defconfig @@ -61,6 +61,7 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y +CONFIG_LIBM_TOOLCHAIN=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y diff --git a/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig b/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig index a912931207..e3f09c1d00 100644 --- a/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig +++ b/boards/risc-v/qemu-rv/rv-virt/configs/smp64/defconfig @@ -62,6 +62,7 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y +CONFIG_LIBM_TOOLCHAIN=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig index f86e13bd12..03e4debb2c 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig +++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/buttons/defconfig @@ -55,6 +55,7 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y +CONFIG_LIBM_TOOLCHAIN=y CONFIG_LPUART0_SERIAL_CONSOLE=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 CONFIG_NSH_ARCHINIT=y diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig index c07639ae6f..77c93ad450 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig +++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh-itcm/defconfig @@ -43,6 +43,7 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y +CONFIG_LIBM_TOOLCHAIN=y CONFIG_LPUART0_SERIAL_CONSOLE=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 CONFIG_NSH_ARCHINIT=y diff --git a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig index 5257b277e0..f8ad443d2f 100644 --- a/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig +++ b/boards/risc-v/rv32m1/rv32m1-vega/configs/nsh/defconfig @@ -43,6 +43,7 @@ CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_FLOATINGPOINT=y CONFIG_LIBC_PERROR_STDOUT=y CONFIG_LIBC_STRERROR=y +CONFIG_LIBM_TOOLCHAIN=y CONFIG_LPUART0_SERIAL_CONSOLE=y CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=6 CONFIG_NSH_ARCHINIT=y diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/coex/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/coex/defconfig index 679db90c1f..48ea1ee9a2 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/coex/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/coex/defconfig @@ -95,6 +95,7 @@ CONFIG_IDLETHREAD_STACKSIZE=3072 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_LIBC_LONG_LONG=y +CONFIG_LIBM_TOOLCHAIN=y CONFIG_MM_REGIONS=3 CONFIG_NAME_MAX=48 CONFIG_NETDB_DNSCLIENT=y diff --git a/libs/libc/Kconfig b/libs/libc/Kconfig index 70f47e2b0a..be6219caee 100644 --- a/libs/libc/Kconfig +++ b/libs/libc/Kconfig @@ -7,7 +7,6 @@ comment "Standard C Library Options" source "libs/libc/stdio/Kconfig" source "libs/libc/audio/Kconfig" -source "libs/libc/math/Kconfig" source "libs/libc/machine/Kconfig" source "libs/libc/stdlib/Kconfig" source "libs/libc/unistd/Kconfig" diff --git a/libs/libc/Makefile b/libs/libc/Makefile index 17d628b469..6f0d14abb3 100644 --- a/libs/libc/Makefile +++ b/libs/libc/Makefile @@ -37,7 +37,6 @@ include libgen/Make.defs include locale/Make.defs include lzf/Make.defs include machine/Make.defs -include math/Make.defs include misc/Make.defs include modlib/Make.defs include net/Make.defs diff --git a/libs/libc/libc.h b/libs/libc/libc.h index 2678ef75d9..97420528ae 100644 --- a/libs/libc/libc.h +++ b/libs/libc/libc.h @@ -130,19 +130,6 @@ bool lib_isbasedigit(int ch, int base, FAR int *value); int lib_checkbase(int base, FAR const char **pptr); -/* Defined in lib_expi.c */ - -#ifdef CONFIG_LIBM -float lib_expif(size_t n); -double lib_expi(size_t n); -#endif - -/* Defined in lib_libsqrtapprox.c */ - -#ifdef CONFIG_LIBM -float lib_sqrtapprox(float x); -#endif - /* Defined in lib_parsehostfile.c */ #ifdef CONFIG_NETDB_HOSTFILE diff --git a/libs/libc/machine/Kconfig b/libs/libc/machine/Kconfig index 4d82e57cda..5b0021836f 100644 --- a/libs/libc/machine/Kconfig +++ b/libs/libc/machine/Kconfig @@ -121,66 +121,6 @@ config LIBC_ARCH_ELF_64BIT default n depends on LIBC_ARCH_ELF -config LIBM_ARCH_CEIL - bool - default n - depends on LIBM - -config LIBM_ARCH_FLOOR - bool - default n - depends on LIBM - -config LIBM_ARCH_NEARBYINT - bool - default n - depends on LIBM - -config LIBM_ARCH_RINT - bool - default n - depends on LIBM - -config LIBM_ARCH_ROUND - bool - default n - depends on LIBM - -config LIBM_ARCH_TRUNC - bool - default n - depends on LIBM - -config LIBM_ARCH_CEILF - bool - default n - depends on LIBM - -config LIBM_ARCH_FLOORF - bool - default n - depends on LIBM - -config LIBM_ARCH_NEARBYINTF - bool - default n - depends on LIBM - -config LIBM_ARCH_RINTF - bool - default n - depends on LIBM - -config LIBM_ARCH_ROUNDF - bool - default n - depends on LIBM - -config LIBM_ARCH_TRUNCF - bool - default n - depends on LIBM - # One or more the of above may be selected by architecture specific logic if ARCH_ARM diff --git a/libs/libc/machine/arm/armv7-m/Kconfig b/libs/libc/machine/arm/armv7-m/Kconfig index 35eb0c5eff..60ac9d4b34 100644 --- a/libs/libc/machine/arm/armv7-m/Kconfig +++ b/libs/libc/machine/arm/armv7-m/Kconfig @@ -53,23 +53,4 @@ config ARMV7M_STRLEN ---help--- Enable optimized ARMv7-M specific strlen() library function -config ARMV7M_LIBM - bool "Architecture specific FPU optimizations" - default n - select LIBM_ARCH_FABSF - select LIBM_ARCH_SQRTF - depends on ARCH_FPU - depends on LIBM - ---help--- - Enable ARMv7E-M specific floating point optimizations - for fabsf() and fsqrtf() - -config LIBM_ARCH_FABSF - bool - default n - -config LIBM_ARCH_SQRTF - bool - default n - endif diff --git a/libs/libc/machine/arm/armv7-m/Make.defs b/libs/libc/machine/arm/armv7-m/Make.defs index d1cccbda41..75c9109cd8 100644 --- a/libs/libc/machine/arm/armv7-m/Make.defs +++ b/libs/libc/machine/arm/armv7-m/Make.defs @@ -46,14 +46,6 @@ ifeq ($(CONFIG_LIBC_ARCH_ELF),y) CSRCS += arch_elf.c endif -ifeq ($(CONFIG_LIBM_ARCH_FABSF),y) -CSRCS += arch_fabsf.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_SQRTF),y) -CSRCS += arch_sqrtf.c -endif - ifeq ($(CONFIG_ARCH_TOOLCHAIN_GNU),y) DEPPATH += --dep-path machine/arm/armv7-m/gnu VPATH += :machine/arm/armv7-m/gnu diff --git a/libs/libc/machine/arm/armv8-m/Kconfig b/libs/libc/machine/arm/armv8-m/Kconfig index 276b987033..2d52a8322a 100644 --- a/libs/libc/machine/arm/armv8-m/Kconfig +++ b/libs/libc/machine/arm/armv8-m/Kconfig @@ -53,23 +53,4 @@ config ARMV8M_STRLEN ---help--- Enable optimized ARMv8-M specific strlen() library function -config ARMV8M_LIBM - bool "Architecture specific optimizations" - default n - select LIBM_ARCH_CEIL if ARCH_DPFPU - select LIBM_ARCH_FLOOR if ARCH_DPFPU - select LIBM_ARCH_NEARBYINT if ARCH_DPFPU - select LIBM_ARCH_RINT if ARCH_DPFPU - select LIBM_ARCH_ROUND if ARCH_DPFPU - select LIBM_ARCH_TRUNC if ARCH_DPFPU - select LIBM_ARCH_CEILF if ARCH_FPU - select LIBM_ARCH_FLOORF if ARCH_FPU - select LIBM_ARCH_NEARBYINTF if ARCH_FPU - select LIBM_ARCH_RINTF if ARCH_FPU - select LIBM_ARCH_ROUNDF if ARCH_FPU - select LIBM_ARCH_TRUNCF if ARCH_FPU - depends on LIBM - ---help--- - Enable ARMv8 specific floating point optimizations. - endif diff --git a/libs/libc/machine/arm/armv8-m/Make.defs b/libs/libc/machine/arm/armv8-m/Make.defs index 934e00c3c2..ab41dc51bb 100644 --- a/libs/libc/machine/arm/armv8-m/Make.defs +++ b/libs/libc/machine/arm/armv8-m/Make.defs @@ -22,58 +22,6 @@ ifeq ($(CONFIG_LIBC_ARCH_ELF),y) CSRCS += arch_elf.c endif -ifeq ($(CONFIG_ARMV8M_LIBM),y) - -ifeq ($(CONFIG_LIBM_ARCH_CEIL),y) -CSRCS += arch_ceil.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_CEILF),y) -CSRCS += arch_ceilf.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_FLOOR),y) -CSRCS += arch_floor.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_FLOORF),y) -CSRCS += arch_floorf.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_NEARBYINT),y) -CSRCS += arch_nearbyint.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_NEARBYINTF),y) -CSRCS += arch_nearbyintf.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_RINTF),y) -CSRCS += arch_rintf.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_ROUNDF),y) -CSRCS += arch_roundf.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_TRUNCF),y) -CSRCS += arch_truncf.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_RINT),y) -CSRCS += arch_rint.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_ROUND),y) -CSRCS += arch_round.c -endif - -ifeq ($(CONFIG_LIBM_ARCH_TRUNC),y) -CSRCS += arch_trunc.c -endif - -endif # CONFIG_ARMV8M_LIBM - ifeq ($(CONFIG_ARMV8M_MEMCHR),y) ASRCS += arch_memchr.S endif diff --git a/libs/libc/math.csv b/libs/libc/math.csv index eccda9ec50..9b0cbb4559 100644 --- a/libs/libc/math.csv +++ b/libs/libc/math.csv @@ -1,77 +1,77 @@ -"acos","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"acosf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"acosl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"asin","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"asinf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"asinl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"atan","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"atan2","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double","double" -"atan2f","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float","float" -"atan2l","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","long double" -"atanf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"atanl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"ceil","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"ceilf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"ceill","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"cos","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"cosf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"cosh","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"coshf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"coshl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"cosl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"exp","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"expf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"expl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"fabs","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"fabsf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"fabsl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"floor","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"floorf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"floorl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"fmod","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double","double" -"fmodf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float","float" -"fmodl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","long double" -"frexp","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double","int *" -"frexpf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float","int *" -"frexpl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","int *" -"gamma","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"ldexp","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double","int" -"ldexpf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float","int" -"ldexpl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","int" -"lgamma","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"log","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"log10","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"log10f","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"log10l","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"log2","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"log2f","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"log2l","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"logf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"logl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"modf","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double","double *" -"modff","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float","float *" -"modfl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","long double *" -"pow","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double","double" -"powf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float","float" -"powl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double","long double" -"rint","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"rintf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"rintl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"round","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"roundf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"roundl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"sin","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"sinf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"sinh","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"sinhf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"sinhl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"sinl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"sqrt","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"sqrtf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"sqrtl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"tan","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"tanf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"tanh","math.h","defined(CONFIG_HAVE_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","double","double" -"tanhf","math.h","defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH)","float","float" -"tanhl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" -"tanl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && (defined(CONFIG_LIBM) || defined(CONFIG_ARCH_MATH))","long double","long double" +"acos","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"acosf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"acosl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"asin","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"asinf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"asinl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"atan","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"atan2","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","double" +"atan2f","math.h","!defined(CONFIG_LIBM_NONE)","float","float","float" +"atan2l","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","long double" +"atanf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"atanl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"ceil","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"ceilf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"ceill","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"cos","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"cosf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"cosh","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"coshf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"coshl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"cosl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"exp","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"expf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"expl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"fabs","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"fabsf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"fabsl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"floor","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"floorf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"floorl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"fmod","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","double" +"fmodf","math.h","!defined(CONFIG_LIBM_NONE)","float","float","float" +"fmodl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","long double" +"frexp","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","int *" +"frexpf","math.h","!defined(CONFIG_LIBM_NONE)","float","float","int *" +"frexpl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","int *" +"gamma","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"ldexp","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","int" +"ldexpf","math.h","!defined(CONFIG_LIBM_NONE)","float","float","int" +"ldexpl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","int" +"lgamma","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"log","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"log10","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"log10f","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"log10l","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"log2","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"log2f","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"log2l","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"logf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"logl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"modf","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","double *" +"modff","math.h","!defined(CONFIG_LIBM_NONE)","float","float","float *" +"modfl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","long double *" +"pow","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double","double" +"powf","math.h","!defined(CONFIG_LIBM_NONE)","float","float","float" +"powl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double","long double" +"rint","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"rintf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"rintl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"round","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"roundf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"roundl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"sin","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"sinf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"sinh","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"sinhf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"sinhl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"sinl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"sqrt","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"sqrtf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"sqrtl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"tan","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"tanf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"tanh","math.h","defined(CONFIG_HAVE_DOUBLE) && !defined(CONFIG_LIBM_NONE)","double","double" +"tanhf","math.h","!defined(CONFIG_LIBM_NONE)","float","float" +"tanhl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" +"tanl","math.h","defined(CONFIG_HAVE_LONG_DOUBLE) && !defined(CONFIG_LIBM_NONE)","long double","long double" diff --git a/libs/libc/stdio/Kconfig b/libs/libc/stdio/Kconfig index e3d43e7e39..8ddd321add 100644 --- a/libs/libc/stdio/Kconfig +++ b/libs/libc/stdio/Kconfig @@ -55,6 +55,7 @@ config NUNGET_CHARS config LIBC_FLOATINGPOINT bool "Enable floating point in printf" default !DEFAULT_SMALL && ARCH_FPU + depends on !LIBM_NONE ---help--- By default, floating point support in printf, sscanf, etc. is disabled. This option will enable floating point support. diff --git a/libs/libc/math/Kconfig b/libs/libm/Kconfig similarity index 79% rename from libs/libc/math/Kconfig rename to libs/libm/Kconfig index 3246d43e6b..54ccedec79 100644 --- a/libs/libc/math/Kconfig +++ b/libs/libm/Kconfig @@ -3,11 +3,13 @@ # see the file kconfig-language.txt in the NuttX tools repository. # -#menu "Math Library Support" +choice + prompt "Select math library" + default LIBM_NONE if DEFAULT_SMALL + default LIBM_TOOLCHAIN if !DEFAULT_SMALL config LIBM - bool "Standard Math library" - default n + bool "Math library from NuttX" depends on !ARCH_MATH_H select ARCH_FLOAT_H ---help--- @@ -31,4 +33,14 @@ config LIBM comes from the Rhombus OS and was written by Nick Johnson. The Rhombus OS math library port was contributed by Darcy Gong. -#endmenu # Math Library Support +config LIBM_TOOLCHAIN + bool "Math library from toolchain" + +config LIBM_NONE + bool "No math library" + +endchoice + +if LIBM +source "libs/libm/libm/Kconfig" +endif diff --git a/libs/libm/Makefile b/libs/libm/Makefile new file mode 100644 index 0000000000..9fd3ebd041 --- /dev/null +++ b/libs/libm/Makefile @@ -0,0 +1,98 @@ +############################################################################ +# libs/libc/Makefile +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +########################################################################### + +include $(TOPDIR)/Make.defs + +ifeq ($(CONFIG_LIBM),y) +include libm/Make.defs +endif + +BINDIR ?= bin + +AOBJS = $(patsubst %.S, $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT), $(ASRCS)) +COBJS = $(patsubst %.c, $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT), $(CSRCS)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +KBIN = libkm$(LIBEXT) +BIN ?= libm$(LIBEXT) + +all: $(BIN) +.PHONY: clean distclean + +$(AOBJS): $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS): $(BINDIR)$(DELIM)$(DELIM)%$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +# math library for the flat build and +# the user phase of the two-pass kernel build + +$(BIN): $(OBJS) + $(call ARCHIVE, $@, $(OBJS)) + +# math library for the kernel phase of the two-pass kernel build + +ifneq ($(BIN),$(KBIN)) +$(KBIN): $(OBJS) + $(Q) $(MAKE) $(KBIN) BIN=$(KBIN) EXTRAFLAGS="$(EXTRAFLAGS)" +endif + +# Dependencies + +makedepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) + $(call CATFILE, bin/Make.dep, $^) + $(call DELFILE, $^) + +makekdepfile: $(CSRCS:.c=.ddc) $(ASRCS:.S=.dds) + $(call CATFILE, kbin/Make.dep, $^) + $(call DELFILE, $^) + +.depend: Makefile $(SRCS) $(TOPDIR)$(DELIM).config + $(Q) $(MAKE) makedepfile OBJPATH="bin" +ifneq ($(CONFIG_BUILD_FLAT),y) + $(Q) $(MAKE) makekdepfile CFLAGS="$(CFLAGS) $(KDEFINE)" OBJPATH="kbin" +endif + $(Q) touch $@ + +depend: .depend + +# Clean most derived files, retaining the configuration + +clean: + $(Q) $(MAKE) -C bin clean + $(Q) $(MAKE) -C kbin clean + $(call DELFILE, $(BIN)) + $(call DELFILE, $(KBIN)) + $(call CLEAN) + +# Deep clean -- removes all traces of the configuration + +distclean: clean + $(Q) $(MAKE) -C bin distclean + $(Q) $(MAKE) -C kbin distclean + $(call DELFILE, bin$(DELIM)Make.dep) + $(call DELFILE, kbin$(DELIM)Make.dep) + $(call DELFILE, .depend) + +-include bin$(DELIM)Make.dep +-include kbin$(DELIM)Make.dep diff --git a/libs/libm/bin/Makefile b/libs/libm/bin/Makefile new file mode 100644 index 0000000000..53b8d74ba7 --- /dev/null +++ b/libs/libm/bin/Makefile @@ -0,0 +1,33 @@ +############################################################################ +# libs/libc/bin/Makefile +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +########################################################################### + +include $(TOPDIR)/Make.defs + +all: +.PHONY: clean distclean + +# Clean Targets: + +clean: + $(call CLEAN) + +# Deep clean -- removes all traces of the configuration + +distclean: clean diff --git a/libs/libm/kbin/Makefile b/libs/libm/kbin/Makefile new file mode 100644 index 0000000000..5933968a81 --- /dev/null +++ b/libs/libm/kbin/Makefile @@ -0,0 +1,33 @@ +############################################################################ +# libs/libc/kbin/Makefile +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +########################################################################### + +include $(TOPDIR)/Make.defs + +all: +.PHONY: clean distclean + +# Clean Targets: + +clean: + $(call CLEAN) + +# Deep clean -- removes all traces of the configuration + +distclean: clean diff --git a/libs/libm/libm/Kconfig b/libs/libm/libm/Kconfig new file mode 100644 index 0000000000..ea03e447b5 --- /dev/null +++ b/libs/libm/libm/Kconfig @@ -0,0 +1,85 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +# These are library functions that may be overridden by architecture- +# specific implementations. Not all architectures support implementations +# for every library function. + +# Default settings for C library functions that may be replaced with +# architecture-specific versions. + +config LIBM_ARCH_CEIL + bool + default n + depends on LIBM + +config LIBM_ARCH_FLOOR + bool + default n + depends on LIBM + +config LIBM_ARCH_NEARBYINT + bool + default n + depends on LIBM + +config LIBM_ARCH_RINT + bool + default n + depends on LIBM + +config LIBM_ARCH_ROUND + bool + default n + depends on LIBM + +config LIBM_ARCH_TRUNC + bool + default n + depends on LIBM + +config LIBM_ARCH_CEILF + bool + default n + depends on LIBM + +config LIBM_ARCH_FLOORF + bool + default n + depends on LIBM + +config LIBM_ARCH_NEARBYINTF + bool + default n + depends on LIBM + +config LIBM_ARCH_RINTF + bool + default n + depends on LIBM + +config LIBM_ARCH_ROUNDF + bool + default n + depends on LIBM + +config LIBM_ARCH_TRUNCF + bool + default n + depends on LIBM + +config LIBM_ARCH_FABSF + bool + default n + +config LIBM_ARCH_SQRTF + bool + default n + +# One or more the of above may be selected by architecture specific logic + +if ARCH_ARM +source "libs/libm/libm/arm/Kconfig" +endif diff --git a/libs/libc/math/Make.defs b/libs/libm/libm/Make.defs similarity index 82% rename from libs/libc/math/Make.defs rename to libs/libm/libm/Make.defs index 84607f2339..95410afa59 100644 --- a/libs/libc/math/Make.defs +++ b/libs/libm/libm/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# libs/libc/math/Make.defs +# libs/libm/libm/Make.defs # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with @@ -18,17 +18,15 @@ # ############################################################################ -ifeq ($(CONFIG_LIBM),y) - # Add the floating point math C files to the build CSRCS += lib_acosf.c lib_asinf.c lib_atan2f.c lib_atanf.c lib_cosf.c -CSRCS += lib_coshf.c lib_expf.c lib_fabsf.c lib_fmodf.c lib_frexpf.c -CSRCS += lib_ldexpf.c lib_logf.c lib_log10f.c lib_log2f.c lib_modff.c -CSRCS += lib_powf.c lib_sinf.c lib_sinhf.c lib_sqrtf.c lib_tanf.c -CSRCS += lib_tanhf.c lib_asinhf.c lib_acoshf.c lib_atanhf.c lib_erff.c -CSRCS += lib_copysignf.c lib_scalbnf.c lib_scalbn.c lib_scalbnl.c -CSRCS += lib_sincos.c lib_sincosf.c lib_sincosl.c +CSRCS += lib_coshf.c lib_expf.c lib_fmodf.c lib_frexpf.c lib_ldexpf.c +CSRCS += lib_logf.c lib_log10f.c lib_log2f.c lib_modff.c lib_powf.c +CSRCS += lib_sinf.c lib_sinhf.c lib_tanf.c lib_tanhf.c lib_asinhf.c +CSRCS += lib_acoshf.c lib_atanhf.c lib_erff.c lib_copysignf.c +CSRCS += lib_scalbnf.c lib_scalbn.c lib_scalbnl.c lib_sincos.c +CSRCS += lib_sincosf.c lib_sincosl.c CSRCS += lib_acos.c lib_asin.c lib_atan.c lib_atan2.c lib_cos.c CSRCS += lib_cosh.c lib_exp.c lib_fabs.c lib_fmod.c lib_frexp.c @@ -101,9 +99,21 @@ ifneq ($(CONFIG_LIBM_ARCH_TRUNCF),y) CSRCS += lib_truncf.c endif +ifneq ($(CONFIG_LIBM_ARCH_FABSF),y) +CSRCS += lib_fabsf.c +endif + +ifneq ($(CONFIG_LIBM_ARCH_SQRTF),y) +CSRCS += lib_sqrtf.c +endif + +ifeq ($(CONFIG_ARCH_ARM),y) +include $(TOPDIR)/libs/libm/libm/arm/Make.defs +endif + # Add the floating point math directory to the build -DEPPATH += --dep-path math -VPATH += :math +DEPPATH += --dep-path libm +VPATH += :libm -endif +context: diff --git a/libs/libc/math/__cos.c b/libs/libm/libm/__cos.c similarity index 99% rename from libs/libc/math/__cos.c rename to libs/libm/libm/__cos.c index 312123817b..9e6e77fce0 100644 --- a/libs/libc/math/__cos.c +++ b/libs/libm/libm/__cos.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/__cos.c + * libs/libm/libm/__cos.c * * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * diff --git a/libs/libc/math/__sin.c b/libs/libm/libm/__sin.c similarity index 99% rename from libs/libc/math/__sin.c rename to libs/libm/libm/__sin.c index 7c5cf69218..4954623419 100644 --- a/libs/libc/math/__sin.c +++ b/libs/libm/libm/__sin.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/__sin.c + * libs/libm/libm/__sin.c * * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * diff --git a/libs/libm/libm/arm/Kconfig b/libs/libm/libm/arm/Kconfig new file mode 100644 index 0000000000..0e0ea144a9 --- /dev/null +++ b/libs/libm/libm/arm/Kconfig @@ -0,0 +1,12 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +if ARCH_ARMV7M +source "libs/libm/libm/arm/armv7-m/Kconfig" +endif + +if ARCH_ARMV8M +source "libs/libm/libm/arm/armv8-m/Kconfig" +endif diff --git a/libs/libm/libm/arm/Make.defs b/libs/libm/libm/arm/Make.defs new file mode 100644 index 0000000000..aaf17eacb4 --- /dev/null +++ b/libs/libm/libm/arm/Make.defs @@ -0,0 +1,28 @@ +############################################################################ +# libs/libm/libm/arm/Make.defs +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +ifeq ($(CONFIG_ARCH_ARMV7M),y) +include $(TOPDIR)/libs/libm/libm/arm/armv7-m/Make.defs +else ifeq ($(CONFIG_ARCH_ARMV8M),y) +include $(TOPDIR)/libs/libm/libm/arm/armv8-m/Make.defs +endif + +DEPPATH += --dep-path libm/arm +VPATH += :libm/arm diff --git a/libs/libm/libm/arm/armv7-m/Kconfig b/libs/libm/libm/arm/armv7-m/Kconfig new file mode 100644 index 0000000000..fb4e76debf --- /dev/null +++ b/libs/libm/libm/arm/armv7-m/Kconfig @@ -0,0 +1,19 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +if ARCH_ARMV7M + +config ARMV7M_LIBM + bool "Architecture specific FPU optimizations" + default n + select LIBM_ARCH_FABSF + select LIBM_ARCH_SQRTF + depends on ARCH_FPU + depends on LIBM + ---help--- + Enable ARMv7E-M specific floating point optimizations + for fabsf() and fsqrtf() + +endif diff --git a/libs/libm/libm/arm/armv7-m/Make.defs b/libs/libm/libm/arm/armv7-m/Make.defs new file mode 100644 index 0000000000..27f429a547 --- /dev/null +++ b/libs/libm/libm/arm/armv7-m/Make.defs @@ -0,0 +1,30 @@ +############################################################################ +# libs/libm/libm/arm/armv7-m/Make.defs +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +ifeq ($(CONFIG_LIBM_ARCH_FABSF),y) +CSRCS += arch_fabsf.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_SQRTF),y) +CSRCS += arch_sqrtf.c +endif + +DEPPATH += --dep-path libm/arm/armv7-m +VPATH += :libm/arm/armv7-m diff --git a/libs/libc/machine/arm/armv7-m/arch_fabsf.c b/libs/libm/libm/arm/armv7-m/arch_fabsf.c similarity index 97% rename from libs/libc/machine/arm/armv7-m/arch_fabsf.c rename to libs/libm/libm/arm/armv7-m/arch_fabsf.c index 5a3c6b859a..24eb7be668 100644 --- a/libs/libc/machine/arm/armv7-m/arch_fabsf.c +++ b/libs/libm/libm/arm/armv7-m/arch_fabsf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv7-m/arch_fabsf.c + * libs/libm/libm/arm/armv7-m/arch_fabsf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/machine/arm/armv7-m/arch_sqrtf.c b/libs/libm/libm/arm/armv7-m/arch_sqrtf.c similarity index 97% rename from libs/libc/machine/arm/armv7-m/arch_sqrtf.c rename to libs/libm/libm/arm/armv7-m/arch_sqrtf.c index 3bf12514b3..2ae41b20db 100644 --- a/libs/libc/machine/arm/armv7-m/arch_sqrtf.c +++ b/libs/libm/libm/arm/armv7-m/arch_sqrtf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv7-m/arch_sqrtf.c + * libs/libm/libm/arm/armv7-m/arch_sqrtf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libm/libm/arm/armv8-m/Kconfig b/libs/libm/libm/arm/armv8-m/Kconfig new file mode 100644 index 0000000000..c6db2651ba --- /dev/null +++ b/libs/libm/libm/arm/armv8-m/Kconfig @@ -0,0 +1,27 @@ +# +# For a description of the syntax of this configuration file, +# see the file kconfig-language.txt in the NuttX tools repository. +# + +if ARCH_ARMV8M + +config ARMV8M_LIBM + bool "Architecture specific optimizations" + default n + select LIBM_ARCH_CEIL if ARCH_DPFPU + select LIBM_ARCH_FLOOR if ARCH_DPFPU + select LIBM_ARCH_NEARBYINT if ARCH_DPFPU + select LIBM_ARCH_RINT if ARCH_DPFPU + select LIBM_ARCH_ROUND if ARCH_DPFPU + select LIBM_ARCH_TRUNC if ARCH_DPFPU + select LIBM_ARCH_CEILF if ARCH_FPU + select LIBM_ARCH_FLOORF if ARCH_FPU + select LIBM_ARCH_NEARBYINTF if ARCH_FPU + select LIBM_ARCH_RINTF if ARCH_FPU + select LIBM_ARCH_ROUNDF if ARCH_FPU + select LIBM_ARCH_TRUNCF if ARCH_FPU + depends on LIBM + ---help--- + Enable ARMv8 specific floating point optimizations. + +endif diff --git a/libs/libm/libm/arm/armv8-m/Make.defs b/libs/libm/libm/arm/armv8-m/Make.defs new file mode 100644 index 0000000000..379b0682f7 --- /dev/null +++ b/libs/libm/libm/arm/armv8-m/Make.defs @@ -0,0 +1,70 @@ +############################################################################ +# libs/libm/libm/arm/armv8-m/Make.defs +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. The +# ASF licenses this file to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +############################################################################ + +ifeq ($(CONFIG_LIBM_ARCH_CEIL),y) +CSRCS += arch_ceil.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_CEILF),y) +CSRCS += arch_ceilf.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_FLOOR),y) +CSRCS += arch_floor.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_FLOORF),y) +CSRCS += arch_floorf.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_NEARBYINT),y) +CSRCS += arch_nearbyint.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_NEARBYINTF),y) +CSRCS += arch_nearbyintf.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_RINTF),y) +CSRCS += arch_rintf.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_ROUNDF),y) +CSRCS += arch_roundf.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_TRUNCF),y) +CSRCS += arch_truncf.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_RINT),y) +CSRCS += arch_rint.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_ROUND),y) +CSRCS += arch_round.c +endif + +ifeq ($(CONFIG_LIBM_ARCH_TRUNC),y) +CSRCS += arch_trunc.c +endif + +DEPPATH += --dep-path libm/arm/armv8-m +VPATH += :libm/arm/armv8-m diff --git a/libs/libc/machine/arm/armv8-m/arch_ceil.c b/libs/libm/libm/arm/armv8-m/arch_ceil.c similarity index 98% rename from libs/libc/machine/arm/armv8-m/arch_ceil.c rename to libs/libm/libm/arm/armv8-m/arch_ceil.c index c7dde0ae24..4256388fb7 100644 --- a/libs/libc/machine/arm/armv8-m/arch_ceil.c +++ b/libs/libm/libm/arm/armv8-m/arch_ceil.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_ceil.c + * libs/libm/libm/arm/armv8-m/arch_ceil.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_ceilf.c b/libs/libm/libm/arm/armv8-m/arch_ceilf.c similarity index 97% rename from libs/libc/machine/arm/armv8-m/arch_ceilf.c rename to libs/libm/libm/arm/armv8-m/arch_ceilf.c index 0c140365cb..83bfc88c70 100644 --- a/libs/libc/machine/arm/armv8-m/arch_ceilf.c +++ b/libs/libm/libm/arm/armv8-m/arch_ceilf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_ceilf.c + * libs/libm/libm/arm/armv8-m/arch_ceilf.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_floor.c b/libs/libm/libm/arm/armv8-m/arch_floor.c similarity index 97% rename from libs/libc/machine/arm/armv8-m/arch_floor.c rename to libs/libm/libm/arm/armv8-m/arch_floor.c index 971d70e1ce..84f9b6d409 100644 --- a/libs/libc/machine/arm/armv8-m/arch_floor.c +++ b/libs/libm/libm/arm/armv8-m/arch_floor.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_floor.c + * libs/libm/libm/arm/armv8-m/arch_floor.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_floorf.c b/libs/libm/libm/arm/armv8-m/arch_floorf.c similarity index 97% rename from libs/libc/machine/arm/armv8-m/arch_floorf.c rename to libs/libm/libm/arm/armv8-m/arch_floorf.c index b2fcdeaf77..50129cf74d 100644 --- a/libs/libc/machine/arm/armv8-m/arch_floorf.c +++ b/libs/libm/libm/arm/armv8-m/arch_floorf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_floorf.c + * libs/libm/libm/arm/armv8-m/arch_floorf.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_nearbyint.c b/libs/libm/libm/arm/armv8-m/arch_nearbyint.c similarity index 97% rename from libs/libc/machine/arm/armv8-m/arch_nearbyint.c rename to libs/libm/libm/arm/armv8-m/arch_nearbyint.c index f2a9aa741b..c5b283f30f 100644 --- a/libs/libc/machine/arm/armv8-m/arch_nearbyint.c +++ b/libs/libm/libm/arm/armv8-m/arch_nearbyint.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_nearbyint.c + * libs/libm/libm/arm/armv8-m/arch_nearbyint.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_nearbyintf.c b/libs/libm/libm/arm/armv8-m/arch_nearbyintf.c similarity index 97% rename from libs/libc/machine/arm/armv8-m/arch_nearbyintf.c rename to libs/libm/libm/arm/armv8-m/arch_nearbyintf.c index dee6fd4f7c..3745c008b2 100644 --- a/libs/libc/machine/arm/armv8-m/arch_nearbyintf.c +++ b/libs/libm/libm/arm/armv8-m/arch_nearbyintf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_nearbyintf.c + * libs/libm/libm/arm/armv8-m/arch_nearbyintf.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_rint.c b/libs/libm/libm/arm/armv8-m/arch_rint.c similarity index 98% rename from libs/libc/machine/arm/armv8-m/arch_rint.c rename to libs/libm/libm/arm/armv8-m/arch_rint.c index d9cdd32171..7ed3552590 100644 --- a/libs/libc/machine/arm/armv8-m/arch_rint.c +++ b/libs/libm/libm/arm/armv8-m/arch_rint.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_rint.c + * libs/libm/libm/arm/armv8-m/arch_rint.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_rintf.c b/libs/libm/libm/arm/armv8-m/arch_rintf.c similarity index 97% rename from libs/libc/machine/arm/armv8-m/arch_rintf.c rename to libs/libm/libm/arm/armv8-m/arch_rintf.c index ff80a76834..0e5bc6a58f 100644 --- a/libs/libc/machine/arm/armv8-m/arch_rintf.c +++ b/libs/libm/libm/arm/armv8-m/arch_rintf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_rintf.c + * libs/libm/libm/arm/armv8-m/arch_rintf.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_round.c b/libs/libm/libm/arm/armv8-m/arch_round.c similarity index 97% rename from libs/libc/machine/arm/armv8-m/arch_round.c rename to libs/libm/libm/arm/armv8-m/arch_round.c index b9cac084d3..411b4da298 100644 --- a/libs/libc/machine/arm/armv8-m/arch_round.c +++ b/libs/libm/libm/arm/armv8-m/arch_round.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_round.c + * libs/libm/libm/arm/armv8-m/arch_round.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_roundf.c b/libs/libm/libm/arm/armv8-m/arch_roundf.c similarity index 97% rename from libs/libc/machine/arm/armv8-m/arch_roundf.c rename to libs/libm/libm/arm/armv8-m/arch_roundf.c index 062386679c..6d863dbab6 100644 --- a/libs/libc/machine/arm/armv8-m/arch_roundf.c +++ b/libs/libm/libm/arm/armv8-m/arch_roundf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_roundf.c + * libs/libm/libm/arm/armv8-m/arch_roundf.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_trunc.c b/libs/libm/libm/arm/armv8-m/arch_trunc.c similarity index 97% rename from libs/libc/machine/arm/armv8-m/arch_trunc.c rename to libs/libm/libm/arm/armv8-m/arch_trunc.c index 39300cba81..12569625a9 100644 --- a/libs/libc/machine/arm/armv8-m/arch_trunc.c +++ b/libs/libm/libm/arm/armv8-m/arch_trunc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_trunc.c + * libs/libm/libm/arm/armv8-m/arch_trunc.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/machine/arm/armv8-m/arch_truncf.c b/libs/libm/libm/arm/armv8-m/arch_truncf.c similarity index 97% rename from libs/libc/machine/arm/armv8-m/arch_truncf.c rename to libs/libm/libm/arm/armv8-m/arch_truncf.c index fd3c5d8be3..ca0143488b 100644 --- a/libs/libc/machine/arm/armv8-m/arch_truncf.c +++ b/libs/libm/libm/arm/armv8-m/arch_truncf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/machine/arm/armv8-m/arch_truncf.c + * libs/libm/libm/arm/armv8-m/arch_truncf.c * * Copyright (c) 2011, 2012 ARM Ltd. All rights reserved. * diff --git a/libs/libc/math/lib_acos.c b/libs/libm/libm/lib_acos.c similarity index 98% rename from libs/libc/math/lib_acos.c rename to libs/libm/libm/lib_acos.c index ad14ab2d3f..3d39198b11 100644 --- a/libs/libc/math/lib_acos.c +++ b/libs/libm/libm/lib_acos.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_acos.c + * libs/libm/libm/lib_acos.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_acosf.c b/libs/libm/libm/lib_acosf.c similarity index 98% rename from libs/libc/math/lib_acosf.c rename to libs/libm/libm/lib_acosf.c index a3ed12ae4b..48de567ba5 100644 --- a/libs/libc/math/lib_acosf.c +++ b/libs/libm/libm/lib_acosf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_acosf.c + * libs/libm/libm/lib_acosf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_acosh.c b/libs/libm/libm/lib_acosh.c similarity index 98% rename from libs/libc/math/lib_acosh.c rename to libs/libm/libm/lib_acosh.c index 0468d6af06..7f2bb9f952 100644 --- a/libs/libc/math/lib_acosh.c +++ b/libs/libm/libm/lib_acosh.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_acosh.c + * libs/libm/libm/lib_acosh.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_acoshf.c b/libs/libm/libm/lib_acoshf.c similarity index 97% rename from libs/libc/math/lib_acoshf.c rename to libs/libm/libm/lib_acoshf.c index 1151640aa7..cf4089b8c3 100644 --- a/libs/libc/math/lib_acoshf.c +++ b/libs/libm/libm/lib_acoshf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_acoshf.c + * libs/libm/libm/lib_acoshf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_acoshl.c b/libs/libm/libm/lib_acoshl.c similarity index 97% rename from libs/libc/math/lib_acoshl.c rename to libs/libm/libm/lib_acoshl.c index a7a5defe61..e40b22c49d 100644 --- a/libs/libc/math/lib_acoshl.c +++ b/libs/libm/libm/lib_acoshl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_acoshl.c + * libs/libm/libm/lib_acoshl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_acosl.c b/libs/libm/libm/lib_acosl.c similarity index 98% rename from libs/libc/math/lib_acosl.c rename to libs/libm/libm/lib_acosl.c index 683bc614f6..f0a273cd29 100644 --- a/libs/libc/math/lib_acosl.c +++ b/libs/libm/libm/lib_acosl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_acosl.c + * libs/libm/libm/lib_acosl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_asin.c b/libs/libm/libm/lib_asin.c similarity index 99% rename from libs/libc/math/lib_asin.c rename to libs/libm/libm/lib_asin.c index b13512fa5b..668ec8af0e 100644 --- a/libs/libc/math/lib_asin.c +++ b/libs/libm/libm/lib_asin.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_asin.c + * libs/libm/libm/lib_asin.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_asinf.c b/libs/libm/libm/lib_asinf.c similarity index 98% rename from libs/libc/math/lib_asinf.c rename to libs/libm/libm/lib_asinf.c index 21aacf0b07..a529db23fb 100644 --- a/libs/libc/math/lib_asinf.c +++ b/libs/libm/libm/lib_asinf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_asinf.c + * libs/libm/libm/lib_asinf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_asinh.c b/libs/libm/libm/lib_asinh.c similarity index 98% rename from libs/libc/math/lib_asinh.c rename to libs/libm/libm/lib_asinh.c index 9244403cdb..ccdeb85a3c 100644 --- a/libs/libc/math/lib_asinh.c +++ b/libs/libm/libm/lib_asinh.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_asinh.c + * libs/libm/libm/lib_asinh.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_asinhf.c b/libs/libm/libm/lib_asinhf.c similarity index 97% rename from libs/libc/math/lib_asinhf.c rename to libs/libm/libm/lib_asinhf.c index f34406defc..0ee95aa3e0 100644 --- a/libs/libc/math/lib_asinhf.c +++ b/libs/libm/libm/lib_asinhf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_asinhf.c + * libs/libm/libm/lib_asinhf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_asinhl.c b/libs/libm/libm/lib_asinhl.c similarity index 97% rename from libs/libc/math/lib_asinhl.c rename to libs/libm/libm/lib_asinhl.c index 61f3fa1146..abfd5c0303 100644 --- a/libs/libc/math/lib_asinhl.c +++ b/libs/libm/libm/lib_asinhl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_asinhl.c + * libs/libm/libm/lib_asinhl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_asinl.c b/libs/libm/libm/lib_asinl.c similarity index 98% rename from libs/libc/math/lib_asinl.c rename to libs/libm/libm/lib_asinl.c index aa2c952eb0..bf91fdec5b 100644 --- a/libs/libc/math/lib_asinl.c +++ b/libs/libm/libm/lib_asinl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_asinl.c + * libs/libm/libm/lib_asinl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_atan.c b/libs/libm/libm/lib_atan.c similarity index 98% rename from libs/libc/math/lib_atan.c rename to libs/libm/libm/lib_atan.c index 5a69600af7..2c02c0f84e 100644 --- a/libs/libc/math/lib_atan.c +++ b/libs/libm/libm/lib_atan.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_atan.c + * libs/libm/libm/lib_atan.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_atan2.c b/libs/libm/libm/lib_atan2.c similarity index 98% rename from libs/libc/math/lib_atan2.c rename to libs/libm/libm/lib_atan2.c index 7b2c84dc1d..93efbfe51a 100644 --- a/libs/libc/math/lib_atan2.c +++ b/libs/libm/libm/lib_atan2.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_atan2.c + * libs/libm/libm/lib_atan2.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_atan2f.c b/libs/libm/libm/lib_atan2f.c similarity index 98% rename from libs/libc/math/lib_atan2f.c rename to libs/libm/libm/lib_atan2f.c index b4128fb25a..b8d46f8c2c 100644 --- a/libs/libc/math/lib_atan2f.c +++ b/libs/libm/libm/lib_atan2f.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_atan2f.c + * libs/libm/libm/lib_atan2f.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_atan2l.c b/libs/libm/libm/lib_atan2l.c similarity index 98% rename from libs/libc/math/lib_atan2l.c rename to libs/libm/libm/lib_atan2l.c index 0445c7b0ab..17a9bff267 100644 --- a/libs/libc/math/lib_atan2l.c +++ b/libs/libm/libm/lib_atan2l.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_atan2l.c + * libs/libm/libm/lib_atan2l.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_atanf.c b/libs/libm/libm/lib_atanf.c similarity index 98% rename from libs/libc/math/lib_atanf.c rename to libs/libm/libm/lib_atanf.c index cac3614530..505063e06b 100644 --- a/libs/libc/math/lib_atanf.c +++ b/libs/libm/libm/lib_atanf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_atanf.c + * libs/libm/libm/lib_atanf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_atanh.c b/libs/libm/libm/lib_atanh.c similarity index 98% rename from libs/libc/math/lib_atanh.c rename to libs/libm/libm/lib_atanh.c index 749bdc17a6..47959da6c5 100644 --- a/libs/libc/math/lib_atanh.c +++ b/libs/libm/libm/lib_atanh.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_atanh.c + * libs/libm/libm/lib_atanh.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_atanhf.c b/libs/libm/libm/lib_atanhf.c similarity index 97% rename from libs/libc/math/lib_atanhf.c rename to libs/libm/libm/lib_atanhf.c index 63aa8e0dbf..b440bf6096 100644 --- a/libs/libc/math/lib_atanhf.c +++ b/libs/libm/libm/lib_atanhf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_atanhf.c + * libs/libm/libm/lib_atanhf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_atanhl.c b/libs/libm/libm/lib_atanhl.c similarity index 97% rename from libs/libc/math/lib_atanhl.c rename to libs/libm/libm/lib_atanhl.c index 039c1c0261..2b2addb103 100644 --- a/libs/libc/math/lib_atanhl.c +++ b/libs/libm/libm/lib_atanhl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_atanhl.c + * libs/libm/libm/lib_atanhl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_atanl.c b/libs/libm/libm/lib_atanl.c similarity index 98% rename from libs/libc/math/lib_atanl.c rename to libs/libm/libm/lib_atanl.c index 1dd492f7cf..73932e5bc6 100644 --- a/libs/libc/math/lib_atanl.c +++ b/libs/libm/libm/lib_atanl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_atanl.c + * libs/libm/libm/lib_atanl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_cbrt.c b/libs/libm/libm/lib_cbrt.c similarity index 98% rename from libs/libc/math/lib_cbrt.c rename to libs/libm/libm/lib_cbrt.c index cf28b94669..6fc820a685 100644 --- a/libs/libc/math/lib_cbrt.c +++ b/libs/libm/libm/lib_cbrt.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_cbrt.c + * libs/libm/libm/lib_cbrt.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_ceil.c b/libs/libm/libm/lib_ceil.c similarity index 98% rename from libs/libc/math/lib_ceil.c rename to libs/libm/libm/lib_ceil.c index 4d050749b4..c719ce28af 100644 --- a/libs/libc/math/lib_ceil.c +++ b/libs/libm/libm/lib_ceil.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_ceil.c + * libs/libm/libm/lib_ceil.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_ceilf.c b/libs/libm/libm/lib_ceilf.c similarity index 98% rename from libs/libc/math/lib_ceilf.c rename to libs/libm/libm/lib_ceilf.c index 006093128e..7acfc278bc 100644 --- a/libs/libc/math/lib_ceilf.c +++ b/libs/libm/libm/lib_ceilf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_ceilf.c + * libs/libm/libm/lib_ceilf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_ceill.c b/libs/libm/libm/lib_ceill.c similarity index 98% rename from libs/libc/math/lib_ceill.c rename to libs/libm/libm/lib_ceill.c index 531b51e070..77e24387af 100644 --- a/libs/libc/math/lib_ceill.c +++ b/libs/libm/libm/lib_ceill.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_ceill.c + * libs/libm/libm/lib_ceill.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_copysign.c b/libs/libm/libm/lib_copysign.c similarity index 97% rename from libs/libc/math/lib_copysign.c rename to libs/libm/libm/lib_copysign.c index c13386c65f..f0b6c8ad3b 100644 --- a/libs/libc/math/lib_copysign.c +++ b/libs/libm/libm/lib_copysign.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_copysign.c + * libs/libm/libm/lib_copysign.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_copysignf.c b/libs/libm/libm/lib_copysignf.c similarity index 99% rename from libs/libc/math/lib_copysignf.c rename to libs/libm/libm/lib_copysignf.c index d5d5dd05c1..b28aab55eb 100644 --- a/libs/libc/math/lib_copysignf.c +++ b/libs/libm/libm/lib_copysignf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_copysignf.c + * libs/libm/libm/lib_copysignf.c * * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * diff --git a/libs/libc/math/lib_copysignl.c b/libs/libm/libm/lib_copysignl.c similarity index 97% rename from libs/libc/math/lib_copysignl.c rename to libs/libm/libm/lib_copysignl.c index 0bdf48bf0a..58d3a32067 100644 --- a/libs/libc/math/lib_copysignl.c +++ b/libs/libm/libm/lib_copysignl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_copysignl.c + * libs/libm/libm/lib_copysignl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_cos.c b/libs/libm/libm/lib_cos.c similarity index 98% rename from libs/libc/math/lib_cos.c rename to libs/libm/libm/lib_cos.c index 904bc603e2..8f5ab0addb 100644 --- a/libs/libc/math/lib_cos.c +++ b/libs/libm/libm/lib_cos.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_cos.c + * libs/libm/libm/lib_cos.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_cosf.c b/libs/libm/libm/lib_cosf.c similarity index 98% rename from libs/libc/math/lib_cosf.c rename to libs/libm/libm/lib_cosf.c index 1a436c3452..b53be8befd 100644 --- a/libs/libc/math/lib_cosf.c +++ b/libs/libm/libm/lib_cosf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_cosf.c + * libs/libm/libm/lib_cosf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_cosh.c b/libs/libm/libm/lib_cosh.c similarity index 98% rename from libs/libc/math/lib_cosh.c rename to libs/libm/libm/lib_cosh.c index 40ce8ae3bb..cd23cea4eb 100644 --- a/libs/libc/math/lib_cosh.c +++ b/libs/libm/libm/lib_cosh.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_cosh.c + * libs/libm/libm/lib_cosh.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_coshf.c b/libs/libm/libm/lib_coshf.c similarity index 98% rename from libs/libc/math/lib_coshf.c rename to libs/libm/libm/lib_coshf.c index 6c48c97506..bbc128323b 100644 --- a/libs/libc/math/lib_coshf.c +++ b/libs/libm/libm/lib_coshf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_coshf.c + * libs/libm/libm/lib_coshf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_coshl.c b/libs/libm/libm/lib_coshl.c similarity index 98% rename from libs/libc/math/lib_coshl.c rename to libs/libm/libm/lib_coshl.c index e0741a91f1..73a597de13 100644 --- a/libs/libc/math/lib_coshl.c +++ b/libs/libm/libm/lib_coshl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_coshl.c + * libs/libm/libm/lib_coshl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_cosl.c b/libs/libm/libm/lib_cosl.c similarity index 98% rename from libs/libc/math/lib_cosl.c rename to libs/libm/libm/lib_cosl.c index 983e78e47d..33249fb011 100644 --- a/libs/libc/math/lib_cosl.c +++ b/libs/libm/libm/lib_cosl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_cosl.c + * libs/libm/libm/lib_cosl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_erf.c b/libs/libm/libm/lib_erf.c similarity index 98% rename from libs/libc/math/lib_erf.c rename to libs/libm/libm/lib_erf.c index af64ec909f..83609c02be 100644 --- a/libs/libc/math/lib_erf.c +++ b/libs/libm/libm/lib_erf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_erf.c + * libs/libm/libm/lib_erf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_erfc.c b/libs/libm/libm/lib_erfc.c similarity index 98% rename from libs/libc/math/lib_erfc.c rename to libs/libm/libm/lib_erfc.c index d646b17bab..337da5a0f0 100644 --- a/libs/libc/math/lib_erfc.c +++ b/libs/libm/libm/lib_erfc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_erfc.c + * libs/libm/libm/lib_erfc.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_erfcf.c b/libs/libm/libm/lib_erfcf.c similarity index 97% rename from libs/libc/math/lib_erfcf.c rename to libs/libm/libm/lib_erfcf.c index 16fb594ced..3a9d2041bf 100644 --- a/libs/libc/math/lib_erfcf.c +++ b/libs/libm/libm/lib_erfcf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_erfcf.c + * libs/libm/libm/lib_erfcf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_erfcl.c b/libs/libm/libm/lib_erfcl.c similarity index 98% rename from libs/libc/math/lib_erfcl.c rename to libs/libm/libm/lib_erfcl.c index cfe8f0d52d..c096d583c9 100644 --- a/libs/libc/math/lib_erfcl.c +++ b/libs/libm/libm/lib_erfcl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_erfcl.c + * libs/libm/libm/lib_erfcl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_erff.c b/libs/libm/libm/lib_erff.c similarity index 98% rename from libs/libc/math/lib_erff.c rename to libs/libm/libm/lib_erff.c index cc728516ed..d0eeb851c6 100644 --- a/libs/libc/math/lib_erff.c +++ b/libs/libm/libm/lib_erff.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_erff.c + * libs/libm/libm/lib_erff.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_erfl.c b/libs/libm/libm/lib_erfl.c similarity index 98% rename from libs/libc/math/lib_erfl.c rename to libs/libm/libm/lib_erfl.c index 0090fa0892..856b094a78 100644 --- a/libs/libc/math/lib_erfl.c +++ b/libs/libm/libm/lib_erfl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_erfl.c + * libs/libm/libm/lib_erfl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_exp.c b/libs/libm/libm/lib_exp.c similarity index 98% rename from libs/libc/math/lib_exp.c rename to libs/libm/libm/lib_exp.c index 23a3ba9ca6..6cee39feed 100644 --- a/libs/libc/math/lib_exp.c +++ b/libs/libm/libm/lib_exp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_exp.c + * libs/libm/libm/lib_exp.c * * This file is a part of NuttX: * @@ -32,10 +32,10 @@ #include #include -#include +#include #include -#include "libc.h" +#include "libm.h" #ifdef CONFIG_HAVE_DOUBLE diff --git a/libs/libc/math/lib_expf.c b/libs/libm/libm/lib_expf.c similarity index 97% rename from libs/libc/math/lib_expf.c rename to libs/libm/libm/lib_expf.c index 92f3b8a52b..8222c397c3 100644 --- a/libs/libc/math/lib_expf.c +++ b/libs/libm/libm/lib_expf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_expf.c + * libs/libm/libm/lib_expf.c * * This file is a part of NuttX: * @@ -29,10 +29,10 @@ * Included Files ****************************************************************************/ -#include +#include #include -#include "libc.h" +#include "libm.h" /**************************************************************************** * Private Data diff --git a/libs/libc/math/lib_expl.c b/libs/libm/libm/lib_expl.c similarity index 98% rename from libs/libc/math/lib_expl.c rename to libs/libm/libm/lib_expl.c index 9001c9d42b..0e244876db 100644 --- a/libs/libc/math/lib_expl.c +++ b/libs/libm/libm/lib_expl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_expl.c + * libs/libm/libm/lib_expl.c * * This file is a part of NuttX: * @@ -32,10 +32,10 @@ #include #include -#include +#include #include -#include "libc.h" +#include "libm.h" #ifdef CONFIG_HAVE_LONG_DOUBLE diff --git a/libs/libc/math/lib_expm1.c b/libs/libm/libm/lib_expm1.c similarity index 98% rename from libs/libc/math/lib_expm1.c rename to libs/libm/libm/lib_expm1.c index e638789420..502cd52f33 100644 --- a/libs/libc/math/lib_expm1.c +++ b/libs/libm/libm/lib_expm1.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_expm1.c + * libs/libm/libm/lib_expm1.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_expm1f.c b/libs/libm/libm/lib_expm1f.c similarity index 97% rename from libs/libc/math/lib_expm1f.c rename to libs/libm/libm/lib_expm1f.c index fec3e76496..80b667538c 100644 --- a/libs/libc/math/lib_expm1f.c +++ b/libs/libm/libm/lib_expm1f.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_expm1f.c + * libs/libm/libm/lib_expm1f.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_expm1l.c b/libs/libm/libm/lib_expm1l.c similarity index 97% rename from libs/libc/math/lib_expm1l.c rename to libs/libm/libm/lib_expm1l.c index 361e1d3c1b..43f6a93e4c 100644 --- a/libs/libc/math/lib_expm1l.c +++ b/libs/libm/libm/lib_expm1l.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_expm1l.c + * libs/libm/libm/lib_expm1l.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_fabs.c b/libs/libm/libm/lib_fabs.c similarity index 98% rename from libs/libc/math/lib_fabs.c rename to libs/libm/libm/lib_fabs.c index 7908abf867..07fd854f44 100644 --- a/libs/libc/math/lib_fabs.c +++ b/libs/libm/libm/lib_fabs.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fabs.c + * libs/libm/libm/lib_fabs.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_fabsf.c b/libs/libm/libm/lib_fabsf.c similarity index 98% rename from libs/libc/math/lib_fabsf.c rename to libs/libm/libm/lib_fabsf.c index d5e7186842..36557fc7eb 100644 --- a/libs/libc/math/lib_fabsf.c +++ b/libs/libm/libm/lib_fabsf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fabsf.c + * libs/libm/libm/lib_fabsf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_fabsl.c b/libs/libm/libm/lib_fabsl.c similarity index 98% rename from libs/libc/math/lib_fabsl.c rename to libs/libm/libm/lib_fabsl.c index bdaab4dd9c..6b81524927 100644 --- a/libs/libc/math/lib_fabsl.c +++ b/libs/libm/libm/lib_fabsl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fabsl.c + * libs/libm/libm/lib_fabsl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_floor.c b/libs/libm/libm/lib_floor.c similarity index 98% rename from libs/libc/math/lib_floor.c rename to libs/libm/libm/lib_floor.c index 71a77b13ea..5d85486358 100644 --- a/libs/libc/math/lib_floor.c +++ b/libs/libm/libm/lib_floor.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_floor.c + * libs/libm/libm/lib_floor.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_floorf.c b/libs/libm/libm/lib_floorf.c similarity index 98% rename from libs/libc/math/lib_floorf.c rename to libs/libm/libm/lib_floorf.c index 6b0fa7b80d..ea289d80fb 100644 --- a/libs/libc/math/lib_floorf.c +++ b/libs/libm/libm/lib_floorf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_floorf.c + * libs/libm/libm/lib_floorf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_floorl.c b/libs/libm/libm/lib_floorl.c similarity index 98% rename from libs/libc/math/lib_floorl.c rename to libs/libm/libm/lib_floorl.c index 82fd9742ea..d6ac747b66 100644 --- a/libs/libc/math/lib_floorl.c +++ b/libs/libm/libm/lib_floorl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_floorl.c + * libs/libm/libm/lib_floorl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_fmax.c b/libs/libm/libm/lib_fmax.c similarity index 98% rename from libs/libc/math/lib_fmax.c rename to libs/libm/libm/lib_fmax.c index 1cb62c06a6..a67750c1e8 100644 --- a/libs/libc/math/lib_fmax.c +++ b/libs/libm/libm/lib_fmax.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fmax.c + * libs/libm/libm/lib_fmax.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_fmaxf.c b/libs/libm/libm/lib_fmaxf.c similarity index 97% rename from libs/libc/math/lib_fmaxf.c rename to libs/libm/libm/lib_fmaxf.c index 1e545aa26b..6aeb757ad6 100644 --- a/libs/libc/math/lib_fmaxf.c +++ b/libs/libm/libm/lib_fmaxf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fmaxf.c + * libs/libm/libm/lib_fmaxf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_fmaxl.c b/libs/libm/libm/lib_fmaxl.c similarity index 98% rename from libs/libc/math/lib_fmaxl.c rename to libs/libm/libm/lib_fmaxl.c index ae7a27886e..76353fd1cd 100644 --- a/libs/libc/math/lib_fmaxl.c +++ b/libs/libm/libm/lib_fmaxl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fmaxl.c + * libs/libm/libm/lib_fmaxl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_fmin.c b/libs/libm/libm/lib_fmin.c similarity index 98% rename from libs/libc/math/lib_fmin.c rename to libs/libm/libm/lib_fmin.c index c494575dbd..98a10574d9 100644 --- a/libs/libc/math/lib_fmin.c +++ b/libs/libm/libm/lib_fmin.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fmin.c + * libs/libm/libm/lib_fmin.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_fminf.c b/libs/libm/libm/lib_fminf.c similarity index 97% rename from libs/libc/math/lib_fminf.c rename to libs/libm/libm/lib_fminf.c index 1ba6edf78e..1660766373 100644 --- a/libs/libc/math/lib_fminf.c +++ b/libs/libm/libm/lib_fminf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fminf.c + * libs/libm/libm/lib_fminf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_fminl.c b/libs/libm/libm/lib_fminl.c similarity index 98% rename from libs/libc/math/lib_fminl.c rename to libs/libm/libm/lib_fminl.c index 22e74cef84..5e3adbd7c1 100644 --- a/libs/libc/math/lib_fminl.c +++ b/libs/libm/libm/lib_fminl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fminl.c + * libs/libm/libm/lib_fminl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_fmod.c b/libs/libm/libm/lib_fmod.c similarity index 98% rename from libs/libc/math/lib_fmod.c rename to libs/libm/libm/lib_fmod.c index e70ce684f3..bf1b0b41a4 100644 --- a/libs/libc/math/lib_fmod.c +++ b/libs/libm/libm/lib_fmod.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fmod.c + * libs/libm/libm/lib_fmod.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_fmodf.c b/libs/libm/libm/lib_fmodf.c similarity index 98% rename from libs/libc/math/lib_fmodf.c rename to libs/libm/libm/lib_fmodf.c index 4a7858654c..109d5e5374 100644 --- a/libs/libc/math/lib_fmodf.c +++ b/libs/libm/libm/lib_fmodf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fmodf.c + * libs/libm/libm/lib_fmodf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_fmodl.c b/libs/libm/libm/lib_fmodl.c similarity index 98% rename from libs/libc/math/lib_fmodl.c rename to libs/libm/libm/lib_fmodl.c index d264c338a1..bce3f16f39 100644 --- a/libs/libc/math/lib_fmodl.c +++ b/libs/libm/libm/lib_fmodl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_fmodl.c + * libs/libm/libm/lib_fmodl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_frexp.c b/libs/libm/libm/lib_frexp.c similarity index 98% rename from libs/libc/math/lib_frexp.c rename to libs/libm/libm/lib_frexp.c index fcfeab69ed..adc864bc5f 100644 --- a/libs/libc/math/lib_frexp.c +++ b/libs/libm/libm/lib_frexp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_frexp.c + * libs/libm/libm/lib_frexp.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_frexpf.c b/libs/libm/libm/lib_frexpf.c similarity index 98% rename from libs/libc/math/lib_frexpf.c rename to libs/libm/libm/lib_frexpf.c index 4e879534a2..36a4eb0231 100644 --- a/libs/libc/math/lib_frexpf.c +++ b/libs/libm/libm/lib_frexpf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_frexpf.c + * libs/libm/libm/lib_frexpf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_frexpl.c b/libs/libm/libm/lib_frexpl.c similarity index 98% rename from libs/libc/math/lib_frexpl.c rename to libs/libm/libm/lib_frexpl.c index 121a5b2a12..305f54c261 100644 --- a/libs/libc/math/lib_frexpl.c +++ b/libs/libm/libm/lib_frexpl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_frexpl.c + * libs/libm/libm/lib_frexpl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_gamma.c b/libs/libm/libm/lib_gamma.c similarity index 99% rename from libs/libc/math/lib_gamma.c rename to libs/libm/libm/lib_gamma.c index a93c4629fb..b943ac8ff7 100644 --- a/libs/libc/math/lib_gamma.c +++ b/libs/libm/libm/lib_gamma.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_gamma.c + * libs/libm/libm/lib_gamma.c * * Ported to NuttX from FreeBSD by Alan Carvalho de Assis: * diff --git a/libs/libc/math/lib_ldexp.c b/libs/libm/libm/lib_ldexp.c similarity index 98% rename from libs/libc/math/lib_ldexp.c rename to libs/libm/libm/lib_ldexp.c index b3a8f2e6ad..a062dc740d 100644 --- a/libs/libc/math/lib_ldexp.c +++ b/libs/libm/libm/lib_ldexp.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_ldexp.c + * libs/libm/libm/lib_ldexp.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_ldexpf.c b/libs/libm/libm/lib_ldexpf.c similarity index 98% rename from libs/libc/math/lib_ldexpf.c rename to libs/libm/libm/lib_ldexpf.c index 2803861399..007ef06ddb 100644 --- a/libs/libc/math/lib_ldexpf.c +++ b/libs/libm/libm/lib_ldexpf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_ldexpf.c + * libs/libm/libm/lib_ldexpf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_ldexpl.c b/libs/libm/libm/lib_ldexpl.c similarity index 98% rename from libs/libc/math/lib_ldexpl.c rename to libs/libm/libm/lib_ldexpl.c index 8df8f08266..860aae2911 100644 --- a/libs/libc/math/lib_ldexpl.c +++ b/libs/libm/libm/lib_ldexpl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_ldexpl.c + * libs/libm/libm/lib_ldexpl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_lgamma.c b/libs/libm/libm/lib_lgamma.c similarity index 89% rename from libs/libc/math/lib_lgamma.c rename to libs/libm/libm/lib_lgamma.c index efd32a9d79..80a431452c 100644 --- a/libs/libc/math/lib_lgamma.c +++ b/libs/libm/libm/lib_lgamma.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_lgamma.c + * libs/libm/libm/lib_lgamma.c * * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. * @@ -97,12 +97,12 @@ * computation of sin(pi*(-x)). * * 5. Special Cases - * lgamma(2+s) ~ s*(1-Euler) for tiny s - * lgamma(1) = lgamma(2) = 0 - * lgamma(x) ~ -log(|x|) for tiny x - * lgamma(0) = lgamma(neg.integer) = inf and raise divide-by-zero - * lgamma(inf) = inf - * lgamma(-inf) = inf (bug for bug compatible with C99!?) + * lgamma(2+s) ~ s*(1-Euler) for tiny s + * lgamma(1) = lgamma(2) = 0 + * lgamma(x) ~ -log(|x|) for tiny x + * lgamma(0) = lgamma(neg.integer) = inf and raise divide-by-zero + * lgamma(inf) = inf + * lgamma(-inf) = inf (bug for bug compatible with C99!?) */ /**************************************************************************** @@ -236,6 +236,7 @@ double lgamma_r(double x, int *signgamp) double f; uint64_t i; } u; + u.f = x; double t; @@ -273,6 +274,7 @@ double lgamma_r(double x, int *signgamp) x = -x; *signgamp = -1; } + return -log(x); } @@ -284,6 +286,7 @@ double lgamma_r(double x, int *signgamp) if (t == 0.0) { /* -integer */ + return 1.0 / (x - x); } @@ -315,14 +318,14 @@ double lgamma_r(double x, int *signgamp) r = -log(x); - if (ix >= 0x3FE76944) + if (ix >= 0x3fe76944) { y = 1.0 - x; i = 0; } else { - if (ix >= 0x3FCDA661) + if (ix >= 0x3fcda661) { y = x - (g_tc - 1.0); i = 1; @@ -338,17 +341,19 @@ double lgamma_r(double x, int *signgamp) { r = 0.0; - if (ix >= 0x3FFBB4C3) + if (ix >= 0x3ffbb4c3) { /* [1.7316,2] */ + y = 2.0 - x; i = 0; } else { - if (ix >= 0x3FF3B4C4) + if (ix >= 0x3ff3b4c4) { /* [1.23,1.73] */ + y = x - g_tc; i = 1; } @@ -363,27 +368,31 @@ double lgamma_r(double x, int *signgamp) switch (i) { case 0: - z = y*y; - p1 = g_a0+z*(g_a2+z*(g_a4+z*(g_a6+z*(g_a8+z*g_a10)))); - p2 = z*(g_a1+z*(g_a3+z*(g_a5+z*(g_a7+z*(g_a9+z*g_a11))))); - p = y*p1+p2; - r += (p-0.5*y); + z = y * y; + p1 = g_a0 + z * (g_a2 + z * (g_a4 + + z * (g_a6 + z * (g_a8 + z * g_a10)))); + p2 = z * (g_a1 + z * (g_a3 + z * (g_a5 + + z * (g_a7 + z * (g_a9 + z * g_a11))))); + p = y * p1 + p2; + r += (p - 0.5 * y); break; case 1: z = y*y; w = z*y; - p1 = g_t0+w*(g_t3+w*(g_t6+w*(g_t9+w*g_t12))); /* parallel comp */ - p2 = g_t1+w*(g_t4+w*(g_t7+w*(g_t10+w*g_t13))); - p3 = g_t2+w*(g_t5+w*(g_t8+w*(g_t11+w*g_t14))); - p = z*p1-(g_tt-w*(p2+y*p3)); + p1 = g_t0 + w * (g_t3 + w *(g_t6 + w * (g_t9 + w * g_t12))); /* parallel comp */ + p2 = g_t1 + w * (g_t4 + w *(g_t7 + w * (g_t10 + w * g_t13))); + p3 = g_t2 + w * (g_t5 + w *(g_t8 + w * (g_t11 + w * g_t14))); + p = z * p1 - (g_tt - w * (p2 + y * p3)); r += g_tf + p; break; case 2: - p1 = y*(g_u0+y*(g_u1+y*(g_u2+y*(g_u3+y*(g_u4+y*g_u5))))); - p2 = 1.0+y*(g_v1+y*(g_v2+y*(g_v3+y*(g_v4+y*g_v5)))); - r += -0.5*y + p1/p2; + p1 = y * (g_u0 + y * (g_u1 + y * (g_u2 + + y * (g_u3 + y * (g_u4 + y * g_u5))))); + p2 = 1.0 + y * (g_v1 + y * (g_v2 + + y * (g_v3 + y * (g_v4 + y * g_v5)))); + r += -0.5 * y + p1 / p2; } } else @@ -394,9 +403,11 @@ double lgamma_r(double x, int *signgamp) i = (int)x; y = x - (double)i; - p = y*(g_s0+y*(g_s1+y*(g_s2+y*(g_s3+y*(g_s4+y*(g_s5+y*g_s6)))))); - q = 1.0+y*(g_r1+y*(g_r2+y*(g_r3+y*(g_r4+y*(g_r5+y*g_r6))))); - r = 0.5*y+p/q; + p = y * (g_s0 + y * (g_s1 + y * (g_s2 + + y * (g_s3 + y * (g_s4 + y * (g_s5 + y * g_s6)))))); + q = 1.0 + y * (g_r1 + y * (g_r2 + + y * (g_r3 + y * (g_r4 + y * (g_r5 + y * g_r6))))); + r = 0.5 * y + p / q; z = 1.0; /* lgamma(1+s) = log(s) + lgamma(s) */ @@ -426,8 +437,9 @@ double lgamma_r(double x, int *signgamp) t = log(x); z = 1.0 / x; y = z * z; - w = g_w0+z*(g_w1+y*(g_w2+y*(g_w3+y*(g_w4+y*(g_w5+y*g_w6))))); - r = (x-0.5)*(t-1.0)+w; + w = g_w0 + z * (g_w1 + y * (g_w2 + + y * (g_w3 + y * (g_w4 + y * (g_w5 + y * g_w6))))); + r = (x - 0.5) * (t - 1.0) + w; } else { diff --git a/libs/libc/math/lib_libexpi.c b/libs/libm/libm/lib_libexpi.c similarity index 98% rename from libs/libc/math/lib_libexpi.c rename to libs/libm/libm/lib_libexpi.c index d5540b5179..8a26924bac 100644 --- a/libs/libc/math/lib_libexpi.c +++ b/libs/libm/libm/lib_libexpi.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_libexpi.c + * libs/libm/libm/lib_libexpi.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_libexpif.c b/libs/libm/libm/lib_libexpif.c similarity index 98% rename from libs/libc/math/lib_libexpif.c rename to libs/libm/libm/lib_libexpif.c index ba5d5ce8f5..5aa901fe62 100644 --- a/libs/libc/math/lib_libexpif.c +++ b/libs/libm/libm/lib_libexpif.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_libexpif.c + * libs/libm/libm/lib_libexpif.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_libsqrtapprox.c b/libs/libm/libm/lib_libsqrtapprox.c similarity index 97% rename from libs/libc/math/lib_libsqrtapprox.c rename to libs/libm/libm/lib_libsqrtapprox.c index 58a0f678cb..0930d31ef7 100644 --- a/libs/libc/math/lib_libsqrtapprox.c +++ b/libs/libm/libm/lib_libsqrtapprox.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_libsqrtapprox.c + * libs/libm/libm/lib_libsqrtapprox.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_llround.c b/libs/libm/libm/lib_llround.c similarity index 97% rename from libs/libc/math/lib_llround.c rename to libs/libm/libm/lib_llround.c index 808d5a609b..6662e87ff2 100644 --- a/libs/libc/math/lib_llround.c +++ b/libs/libm/libm/lib_llround.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_llround.c + * libs/libm/libm/lib_llround.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_llroundf.c b/libs/libm/libm/lib_llroundf.c similarity index 97% rename from libs/libc/math/lib_llroundf.c rename to libs/libm/libm/lib_llroundf.c index ee5e7825e2..19fa81203f 100644 --- a/libs/libc/math/lib_llroundf.c +++ b/libs/libm/libm/lib_llroundf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_llroundf.c + * libs/libm/libm/lib_llroundf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_llroundl.c b/libs/libm/libm/lib_llroundl.c similarity index 97% rename from libs/libc/math/lib_llroundl.c rename to libs/libm/libm/lib_llroundl.c index 39a8ed1fb1..18d321df90 100644 --- a/libs/libc/math/lib_llroundl.c +++ b/libs/libm/libm/lib_llroundl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_llroundl.c + * libs/libm/libm/lib_llroundl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_log.c b/libs/libm/libm/lib_log.c similarity index 99% rename from libs/libc/math/lib_log.c rename to libs/libm/libm/lib_log.c index e69b34c838..9b8e23b97d 100644 --- a/libs/libc/math/lib_log.c +++ b/libs/libm/libm/lib_log.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_log.c + * libs/libm/libm/lib_log.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_log10.c b/libs/libm/libm/lib_log10.c similarity index 98% rename from libs/libc/math/lib_log10.c rename to libs/libm/libm/lib_log10.c index 2d5cea9d45..0110fbf16e 100644 --- a/libs/libc/math/lib_log10.c +++ b/libs/libm/libm/lib_log10.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_log10.c + * libs/libm/libm/lib_log10.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_log10f.c b/libs/libm/libm/lib_log10f.c similarity index 98% rename from libs/libc/math/lib_log10f.c rename to libs/libm/libm/lib_log10f.c index a91fc7d023..1ee8ab7048 100644 --- a/libs/libc/math/lib_log10f.c +++ b/libs/libm/libm/lib_log10f.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_log10f.c + * libs/libm/libm/lib_log10f.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_log10l.c b/libs/libm/libm/lib_log10l.c similarity index 98% rename from libs/libc/math/lib_log10l.c rename to libs/libm/libm/lib_log10l.c index 2cdc0f237c..45312b55be 100644 --- a/libs/libc/math/lib_log10l.c +++ b/libs/libm/libm/lib_log10l.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_log10l.c + * libs/libm/libm/lib_log10l.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_log2.c b/libs/libm/libm/lib_log2.c similarity index 98% rename from libs/libc/math/lib_log2.c rename to libs/libm/libm/lib_log2.c index c94e7c1bd6..291ad59952 100644 --- a/libs/libc/math/lib_log2.c +++ b/libs/libm/libm/lib_log2.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_log2.c + * libs/libm/libm/lib_log2.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_log2f.c b/libs/libm/libm/lib_log2f.c similarity index 98% rename from libs/libc/math/lib_log2f.c rename to libs/libm/libm/lib_log2f.c index a39523aecd..5d2acab3b0 100644 --- a/libs/libc/math/lib_log2f.c +++ b/libs/libm/libm/lib_log2f.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_log2f.c + * libs/libm/libm/lib_log2f.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_log2l.c b/libs/libm/libm/lib_log2l.c similarity index 98% rename from libs/libc/math/lib_log2l.c rename to libs/libm/libm/lib_log2l.c index 46290103c4..e4056fd095 100644 --- a/libs/libc/math/lib_log2l.c +++ b/libs/libm/libm/lib_log2l.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_log2l.c + * libs/libm/libm/lib_log2l.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_logf.c b/libs/libm/libm/lib_logf.c similarity index 99% rename from libs/libc/math/lib_logf.c rename to libs/libm/libm/lib_logf.c index d656c43e79..35672915b4 100644 --- a/libs/libc/math/lib_logf.c +++ b/libs/libm/libm/lib_logf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_logf.c + * libs/libm/libm/lib_logf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_logl.c b/libs/libm/libm/lib_logl.c similarity index 98% rename from libs/libc/math/lib_logl.c rename to libs/libm/libm/lib_logl.c index bdcd09fbad..3b93b95251 100644 --- a/libs/libc/math/lib_logl.c +++ b/libs/libm/libm/lib_logl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_logl.c + * libs/libm/libm/lib_logl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_lround.c b/libs/libm/libm/lib_lround.c similarity index 97% rename from libs/libc/math/lib_lround.c rename to libs/libm/libm/lib_lround.c index 8e8896a7bf..eca9877fe7 100644 --- a/libs/libc/math/lib_lround.c +++ b/libs/libm/libm/lib_lround.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_lround.c + * libs/libm/libm/lib_lround.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_lroundf.c b/libs/libm/libm/lib_lroundf.c similarity index 97% rename from libs/libc/math/lib_lroundf.c rename to libs/libm/libm/lib_lroundf.c index 20f54c9499..bc11c41704 100644 --- a/libs/libc/math/lib_lroundf.c +++ b/libs/libm/libm/lib_lroundf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_lroundf.c + * libs/libm/libm/lib_lroundf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_lroundl.c b/libs/libm/libm/lib_lroundl.c similarity index 97% rename from libs/libc/math/lib_lroundl.c rename to libs/libm/libm/lib_lroundl.c index 3cd20caec2..58df7edb30 100644 --- a/libs/libc/math/lib_lroundl.c +++ b/libs/libm/libm/lib_lroundl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_lroundl.c + * libs/libm/libm/lib_lroundl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_modf.c b/libs/libm/libm/lib_modf.c similarity index 98% rename from libs/libc/math/lib_modf.c rename to libs/libm/libm/lib_modf.c index f46066c499..d48c92f2c5 100644 --- a/libs/libc/math/lib_modf.c +++ b/libs/libm/libm/lib_modf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_modf.c + * libs/libm/libm/lib_modf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_modff.c b/libs/libm/libm/lib_modff.c similarity index 98% rename from libs/libc/math/lib_modff.c rename to libs/libm/libm/lib_modff.c index 2448c0a8aa..2267a53a53 100644 --- a/libs/libc/math/lib_modff.c +++ b/libs/libm/libm/lib_modff.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_modff.c + * libs/libm/libm/lib_modff.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_modfl.c b/libs/libm/libm/lib_modfl.c similarity index 98% rename from libs/libc/math/lib_modfl.c rename to libs/libm/libm/lib_modfl.c index 235c07c05e..5a857dcd69 100644 --- a/libs/libc/math/lib_modfl.c +++ b/libs/libm/libm/lib_modfl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_modfl.c + * libs/libm/libm/lib_modfl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_nan.c b/libs/libm/libm/lib_nan.c similarity index 98% rename from libs/libc/math/lib_nan.c rename to libs/libm/libm/lib_nan.c index da3ea36403..1be0b43ae3 100644 --- a/libs/libc/math/lib_nan.c +++ b/libs/libm/libm/lib_nan.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_nan.c + * libs/libm/libm/lib_nan.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_nanf.c b/libs/libm/libm/lib_nanf.c similarity index 98% rename from libs/libc/math/lib_nanf.c rename to libs/libm/libm/lib_nanf.c index 28e36e32fe..2b648c127d 100644 --- a/libs/libc/math/lib_nanf.c +++ b/libs/libm/libm/lib_nanf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_nanf.c + * libs/libm/libm/lib_nanf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_nanl.c b/libs/libm/libm/lib_nanl.c similarity index 98% rename from libs/libc/math/lib_nanl.c rename to libs/libm/libm/lib_nanl.c index 1bd95634c0..ac86785865 100644 --- a/libs/libc/math/lib_nanl.c +++ b/libs/libm/libm/lib_nanl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_nanl.c + * libs/libm/libm/lib_nanl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_pow.c b/libs/libm/libm/lib_pow.c similarity index 98% rename from libs/libc/math/lib_pow.c rename to libs/libm/libm/lib_pow.c index e82e181eb2..0177d26454 100644 --- a/libs/libc/math/lib_pow.c +++ b/libs/libm/libm/lib_pow.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_pow.c + * libs/libm/libm/lib_pow.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_powf.c b/libs/libm/libm/lib_powf.c similarity index 98% rename from libs/libc/math/lib_powf.c rename to libs/libm/libm/lib_powf.c index 2325d73dbd..27d5f30d49 100644 --- a/libs/libc/math/lib_powf.c +++ b/libs/libm/libm/lib_powf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_powf.c + * libs/libm/libm/lib_powf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_powl.c b/libs/libm/libm/lib_powl.c similarity index 98% rename from libs/libc/math/lib_powl.c rename to libs/libm/libm/lib_powl.c index 94bc0d4f84..f3b97e4fdd 100644 --- a/libs/libc/math/lib_powl.c +++ b/libs/libm/libm/lib_powl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_powl.c + * libs/libm/libm/lib_powl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_rint.c b/libs/libm/libm/lib_rint.c similarity index 99% rename from libs/libc/math/lib_rint.c rename to libs/libm/libm/lib_rint.c index 6d2d4c7545..62a9d47f26 100644 --- a/libs/libc/math/lib_rint.c +++ b/libs/libm/libm/lib_rint.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_rint.c + * libs/libm/libm/lib_rint.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_rintf.c b/libs/libm/libm/lib_rintf.c similarity index 99% rename from libs/libc/math/lib_rintf.c rename to libs/libm/libm/lib_rintf.c index f3d48a8c70..d87c334d6c 100644 --- a/libs/libc/math/lib_rintf.c +++ b/libs/libm/libm/lib_rintf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_rintf.c + * libs/libm/libm/lib_rintf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_rintl.c b/libs/libm/libm/lib_rintl.c similarity index 99% rename from libs/libc/math/lib_rintl.c rename to libs/libm/libm/lib_rintl.c index 0af58edef0..84fecd4b96 100644 --- a/libs/libc/math/lib_rintl.c +++ b/libs/libm/libm/lib_rintl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_rintl.c + * libs/libm/libm/lib_rintl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_round.c b/libs/libm/libm/lib_round.c similarity index 98% rename from libs/libc/math/lib_round.c rename to libs/libm/libm/lib_round.c index 70a4ee8675..41af967582 100644 --- a/libs/libc/math/lib_round.c +++ b/libs/libm/libm/lib_round.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_round.c + * libs/libm/libm/lib_round.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_roundf.c b/libs/libm/libm/lib_roundf.c similarity index 98% rename from libs/libc/math/lib_roundf.c rename to libs/libm/libm/lib_roundf.c index cef80226e7..8d33e1c7f5 100644 --- a/libs/libc/math/lib_roundf.c +++ b/libs/libm/libm/lib_roundf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_roundf.c + * libs/libm/libm/lib_roundf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_roundl.c b/libs/libm/libm/lib_roundl.c similarity index 98% rename from libs/libc/math/lib_roundl.c rename to libs/libm/libm/lib_roundl.c index 8d9120e1db..cbf25ed041 100644 --- a/libs/libc/math/lib_roundl.c +++ b/libs/libm/libm/lib_roundl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_roundl.c + * libs/libm/libm/lib_roundl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_scalbn.c b/libs/libm/libm/lib_scalbn.c similarity index 98% rename from libs/libc/math/lib_scalbn.c rename to libs/libm/libm/lib_scalbn.c index 93e2a060b9..eb5fc0e84e 100644 --- a/libs/libc/math/lib_scalbn.c +++ b/libs/libm/libm/lib_scalbn.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_scalbn.c + * libs/libm/libm/lib_scalbn.c * get a double number of x*2^n * * This file is copy from musl libc diff --git a/libs/libc/math/lib_scalbnf.c b/libs/libm/libm/lib_scalbnf.c similarity index 98% rename from libs/libc/math/lib_scalbnf.c rename to libs/libm/libm/lib_scalbnf.c index 7710a73c34..02385ce552 100644 --- a/libs/libc/math/lib_scalbnf.c +++ b/libs/libm/libm/lib_scalbnf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_scalbnf.c + * libs/libm/libm/lib_scalbnf.c * get a float number of x*2^n * * This file is copy from musl libc diff --git a/libs/libc/math/lib_scalbnl.c b/libs/libm/libm/lib_scalbnl.c similarity index 99% rename from libs/libc/math/lib_scalbnl.c rename to libs/libm/libm/lib_scalbnl.c index 0d93264537..c94b0b613c 100644 --- a/libs/libc/math/lib_scalbnl.c +++ b/libs/libm/libm/lib_scalbnl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_scalbnl.c + * libs/libm/libm/lib_scalbnl.c * get a long double number of x*2^n * * This file is copy from musl libc diff --git a/libs/libc/math/lib_sin.c b/libs/libm/libm/lib_sin.c similarity index 99% rename from libs/libc/math/lib_sin.c rename to libs/libm/libm/lib_sin.c index f144d45c75..ae275b4fe1 100644 --- a/libs/libc/math/lib_sin.c +++ b/libs/libm/libm/lib_sin.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sin.c + * libs/libm/libm/lib_sin.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_sincos.c b/libs/libm/libm/lib_sincos.c similarity index 97% rename from libs/libc/math/lib_sincos.c rename to libs/libm/libm/lib_sincos.c index 8b9bd5232a..fd00547edd 100644 --- a/libs/libc/math/lib_sincos.c +++ b/libs/libm/libm/lib_sincos.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sincos.c + * libs/libm/libm/lib_sincos.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_sincosf.c b/libs/libm/libm/lib_sincosf.c similarity index 97% rename from libs/libc/math/lib_sincosf.c rename to libs/libm/libm/lib_sincosf.c index 1997656ec4..311c36f6fb 100644 --- a/libs/libc/math/lib_sincosf.c +++ b/libs/libm/libm/lib_sincosf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sincosf.c + * libs/libm/libm/lib_sincosf.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_sincosl.c b/libs/libm/libm/lib_sincosl.c similarity index 97% rename from libs/libc/math/lib_sincosl.c rename to libs/libm/libm/lib_sincosl.c index 02fbfeef1f..864e1fd67b 100644 --- a/libs/libc/math/lib_sincosl.c +++ b/libs/libm/libm/lib_sincosl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sincosl.c + * libs/libm/libm/lib_sincosl.c * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with diff --git a/libs/libc/math/lib_sinf.c b/libs/libm/libm/lib_sinf.c similarity index 98% rename from libs/libc/math/lib_sinf.c rename to libs/libm/libm/lib_sinf.c index b9651ad79c..77ff68ad8a 100644 --- a/libs/libc/math/lib_sinf.c +++ b/libs/libm/libm/lib_sinf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sinf.c + * libs/libm/libm/lib_sinf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_sinh.c b/libs/libm/libm/lib_sinh.c similarity index 98% rename from libs/libc/math/lib_sinh.c rename to libs/libm/libm/lib_sinh.c index 622445b18b..b9cb88c42a 100644 --- a/libs/libc/math/lib_sinh.c +++ b/libs/libm/libm/lib_sinh.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sinh.c + * libs/libm/libm/lib_sinh.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_sinhf.c b/libs/libm/libm/lib_sinhf.c similarity index 98% rename from libs/libc/math/lib_sinhf.c rename to libs/libm/libm/lib_sinhf.c index fa7f7da832..44bda15bf8 100644 --- a/libs/libc/math/lib_sinhf.c +++ b/libs/libm/libm/lib_sinhf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sinhf.c + * libs/libm/libm/lib_sinhf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_sinhl.c b/libs/libm/libm/lib_sinhl.c similarity index 98% rename from libs/libc/math/lib_sinhl.c rename to libs/libm/libm/lib_sinhl.c index 603e051ad0..df34cb25ef 100644 --- a/libs/libc/math/lib_sinhl.c +++ b/libs/libm/libm/lib_sinhl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sinhl.c + * libs/libm/libm/lib_sinhl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_sinl.c b/libs/libm/libm/lib_sinl.c similarity index 99% rename from libs/libc/math/lib_sinl.c rename to libs/libm/libm/lib_sinl.c index bead13181f..0adb0fb4be 100644 --- a/libs/libc/math/lib_sinl.c +++ b/libs/libm/libm/lib_sinl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sinl.c + * libs/libm/libm/lib_sinl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_sqrt.c b/libs/libm/libm/lib_sqrt.c similarity index 98% rename from libs/libc/math/lib_sqrt.c rename to libs/libm/libm/lib_sqrt.c index 1114fefe04..18b62f1d70 100644 --- a/libs/libc/math/lib_sqrt.c +++ b/libs/libm/libm/lib_sqrt.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sqrt.c + * libs/libm/libm/lib_sqrt.c * * This file is a part of NuttX: * @@ -35,7 +35,7 @@ #include #include -#include "libc.h" +#include "libm.h" /**************************************************************************** * Public Functions diff --git a/libs/libc/math/lib_sqrtf.c b/libs/libm/libm/lib_sqrtf.c similarity index 97% rename from libs/libc/math/lib_sqrtf.c rename to libs/libm/libm/lib_sqrtf.c index 02a6e783ba..5a1802d14b 100644 --- a/libs/libc/math/lib_sqrtf.c +++ b/libs/libm/libm/lib_sqrtf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sqrtf.c + * libs/libm/libm/lib_sqrtf.c * * This file is a part of NuttX: * @@ -35,7 +35,7 @@ #include #include -#include "libc.h" +#include "libm.h" /**************************************************************************** * Public Functions diff --git a/libs/libc/math/lib_sqrtl.c b/libs/libm/libm/lib_sqrtl.c similarity index 98% rename from libs/libc/math/lib_sqrtl.c rename to libs/libm/libm/lib_sqrtl.c index 1f6df931f4..d095aa1829 100644 --- a/libs/libc/math/lib_sqrtl.c +++ b/libs/libm/libm/lib_sqrtl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_sqrtl.c + * libs/libm/libm/lib_sqrtl.c * * This file is a part of NuttX: * @@ -35,7 +35,7 @@ #include #include -#include "libc.h" +#include "libm.h" /**************************************************************************** * Public Functions diff --git a/libs/libc/math/lib_tan.c b/libs/libm/libm/lib_tan.c similarity index 98% rename from libs/libc/math/lib_tan.c rename to libs/libm/libm/lib_tan.c index be7da77f5a..9d603419ab 100644 --- a/libs/libc/math/lib_tan.c +++ b/libs/libm/libm/lib_tan.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_tan.c + * libs/libm/libm/lib_tan.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_tanf.c b/libs/libm/libm/lib_tanf.c similarity index 98% rename from libs/libc/math/lib_tanf.c rename to libs/libm/libm/lib_tanf.c index d23d4af0bd..656659623f 100644 --- a/libs/libc/math/lib_tanf.c +++ b/libs/libm/libm/lib_tanf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_tanf.c + * libs/libm/libm/lib_tanf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_tanh.c b/libs/libm/libm/lib_tanh.c similarity index 98% rename from libs/libc/math/lib_tanh.c rename to libs/libm/libm/lib_tanh.c index 187f0ca75a..c5743d908c 100644 --- a/libs/libc/math/lib_tanh.c +++ b/libs/libm/libm/lib_tanh.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_tanh.c + * libs/libm/libm/lib_tanh.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_tanhf.c b/libs/libm/libm/lib_tanhf.c similarity index 98% rename from libs/libc/math/lib_tanhf.c rename to libs/libm/libm/lib_tanhf.c index df5da9a152..b76696a9bd 100644 --- a/libs/libc/math/lib_tanhf.c +++ b/libs/libm/libm/lib_tanhf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_tanhf.c + * libs/libm/libm/lib_tanhf.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_tanhl.c b/libs/libm/libm/lib_tanhl.c similarity index 98% rename from libs/libc/math/lib_tanhl.c rename to libs/libm/libm/lib_tanhl.c index 36cf45d4a6..b0ecfc9180 100644 --- a/libs/libc/math/lib_tanhl.c +++ b/libs/libm/libm/lib_tanhl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_tanhl.c + * libs/libm/libm/lib_tanhl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_tanl.c b/libs/libm/libm/lib_tanl.c similarity index 98% rename from libs/libc/math/lib_tanl.c rename to libs/libm/libm/lib_tanl.c index f3285d563b..1d12658e23 100644 --- a/libs/libc/math/lib_tanl.c +++ b/libs/libm/libm/lib_tanl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_tanl.c + * libs/libm/libm/lib_tanl.c * * This file is a part of NuttX: * diff --git a/libs/libc/math/lib_trunc.c b/libs/libm/libm/lib_trunc.c similarity index 98% rename from libs/libc/math/lib_trunc.c rename to libs/libm/libm/lib_trunc.c index 53c733fde6..b776b43215 100644 --- a/libs/libc/math/lib_trunc.c +++ b/libs/libm/libm/lib_trunc.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_trunc.c + * libs/libm/libm/lib_trunc.c * * This implementation is derived from the musl library under the MIT License * diff --git a/libs/libc/math/lib_truncf.c b/libs/libm/libm/lib_truncf.c similarity index 98% rename from libs/libc/math/lib_truncf.c rename to libs/libm/libm/lib_truncf.c index 324e0e5c21..b05a0de6c5 100644 --- a/libs/libc/math/lib_truncf.c +++ b/libs/libm/libm/lib_truncf.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_truncf.c + * libs/libm/libm/lib_truncf.c * * This implementation is derived from the musl library under the MIT License * diff --git a/libs/libc/math/lib_truncl.c b/libs/libm/libm/lib_truncl.c similarity index 98% rename from libs/libc/math/lib_truncl.c rename to libs/libm/libm/lib_truncl.c index 7a329833c9..46874fb22d 100644 --- a/libs/libc/math/lib_truncl.c +++ b/libs/libm/libm/lib_truncl.c @@ -1,5 +1,5 @@ /**************************************************************************** - * libs/libc/math/lib_truncl.c + * libs/libm/libm/lib_truncl.c * * This implementation is derived from the musl library under the MIT License * diff --git a/libs/libm/libm/libm.h b/libs/libm/libm/libm.h new file mode 100644 index 0000000000..52b687be2a --- /dev/null +++ b/libs/libm/libm/libm.h @@ -0,0 +1,70 @@ +/**************************************************************************** + * libs/libm/libm/libm.h + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. + * + ****************************************************************************/ + +#ifndef __LIBS_LIBM_LIBM_LIBM_H +#define __LIBS_LIBM_LIBM_LIBM_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/**************************************************************************** + * Public Data + ****************************************************************************/ + +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +/* Defined in lib_expi.c */ + +float lib_expif(size_t n); +double lib_expi(size_t n); + +/* Defined in lib_libsqrtapprox.c */ + +float lib_sqrtapprox(float x); + +#undef EXTERN +#if defined(__cplusplus) +} +#endif + +#endif /* __LIBS_LIBM_LIBM_LIBM_H */ diff --git a/tools/Directories.mk b/tools/Directories.mk index 94f344f304..0b587f8e8c 100644 --- a/tools/Directories.mk +++ b/tools/Directories.mk @@ -67,6 +67,13 @@ CLEANDIRS += pass1 ifeq ($(CONFIG_BUILD_FLAT),y) KERNDEPDIRS += libs$(DELIM)libc mm + +ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),) +KERNDEPDIRS += libs$(DELIM)libm +else +CLEANDIRS += libs$(DELIM)libm +endif + ifeq ($(CONFIG_HAVE_CXX),y) KERNDEPDIRS += libs$(DELIM)libxx else @@ -76,6 +83,13 @@ endif else USERDEPDIRS += libs$(DELIM)libc mm + +ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),) +USERDEPDIRS += libs$(DELIM)libm +else +CLEANDIRS += libs$(DELIM)libm +endif + ifeq ($(CONFIG_HAVE_CXX),y) USERDEPDIRS += libs$(DELIM)libxx else @@ -97,6 +111,11 @@ endif endif CONTEXTDIRS += libs$(DELIM)libc + +ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),) +CONTEXTDIRS += libs$(DELIM)libm +endif + ifeq ($(CONFIG_HAVE_CXX),y) CONTEXTDIRS += libs$(DELIM)libxx endif diff --git a/tools/FlatLibs.mk b/tools/FlatLibs.mk index a0eaf6bb6e..5ee873f7b8 100644 --- a/tools/FlatLibs.mk +++ b/tools/FlatLibs.mk @@ -44,9 +44,16 @@ NUTTXLIBS += staging$(DELIM)libboards$(LIBEXT) # Add libraries for syscall support. -NUTTXLIBS += staging$(DELIM)libc$(LIBEXT) staging$(DELIM)libmm$(LIBEXT) +NUTTXLIBS += staging$(DELIM)libc$(LIBEXT) +NUTTXLIBS += staging$(DELIM)libmm$(LIBEXT) NUTTXLIBS += staging$(DELIM)libarch$(LIBEXT) +# Add libraries for math support. + +ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),) +NUTTXLIBS += staging$(DELIM)libm$(LIBEXT) +endif + ifeq ($(CONFIG_LIB_SYSCALL),y) NUTTXLIBS += staging$(DELIM)libstubs$(LIBEXT) USERLIBS += staging$(DELIM)libproxies$(LIBEXT) diff --git a/tools/KernelLibs.mk b/tools/KernelLibs.mk index c87e60e099..ef1933f99a 100644 --- a/tools/KernelLibs.mk +++ b/tools/KernelLibs.mk @@ -50,6 +50,13 @@ NUTTXLIBS += staging$(DELIM)libkmm$(LIBEXT) staging$(DELIM)libkarch$(LIBEXT) USERLIBS += staging$(DELIM)libproxies$(LIBEXT) staging$(DELIM)libc$(LIBEXT) USERLIBS += staging$(DELIM)libmm$(LIBEXT) staging$(DELIM)libarch$(LIBEXT) +# Add libraries for math support. + +ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),) +NUTTXLIBS += staging$(DELIM)libkm$(LIBEXT) +USERLIBS += staging$(DELIM)libm$(LIBEXT) +endif + # Add library for system call instrumentation if needed ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y) diff --git a/tools/LibTargets.mk b/tools/LibTargets.mk index 4eaa8e1e70..94d8a49657 100644 --- a/tools/LibTargets.mk +++ b/tools/LibTargets.mk @@ -31,6 +31,12 @@ libs$(DELIM)libc$(DELIM)libkc$(LIBEXT): pass2dep staging$(DELIM)libkc$(LIBEXT): libs$(DELIM)libc$(DELIM)libkc$(LIBEXT) $(Q) $(call INSTALL_LIB,$<,$@) +libs$(DELIM)libm$(DELIM)libkm$(LIBEXT): pass2dep + $(Q) $(MAKE) -C libs$(DELIM)libm libkm$(LIBEXT) BINDIR=kbin EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)" + +staging$(DELIM)libkm$(LIBEXT): libs$(DELIM)libm$(DELIM)libkm$(LIBEXT) + $(Q) $(call INSTALL_LIB,$<,$@) + libs$(DELIM)libnx$(DELIM)libknx$(LIBEXT): pass2dep $(Q) $(MAKE) -C libs$(DELIM)libnx libknx$(LIBEXT) BINDIR=kbin EXTRAFLAGS="$(KDEFINE) $(EXTRAFLAGS)" @@ -176,6 +182,16 @@ endif staging$(DELIM)libc$(LIBEXT): libs$(DELIM)libc$(DELIM)libc$(LIBEXT) $(Q) $(call INSTALL_LIB,$<,$@) +ifeq ($(CONFIG_BUILD_FLAT),y) +libs$(DELIM)libm$(DELIM)libm$(LIBEXT): pass2dep +else +libs$(DELIM)libm$(DELIM)libm$(LIBEXT): pass1dep +endif + $(Q) $(MAKE) -C libs$(DELIM)libm libm$(LIBEXT) EXTRAFLAGS="$(EXTRAFLAGS)" + +staging$(DELIM)libm$(LIBEXT): libs$(DELIM)libm$(DELIM)libm$(LIBEXT) + $(Q) $(call INSTALL_LIB,$<,$@) + ifeq ($(CONFIG_BUILD_FLAT),y) libs$(DELIM)libnx$(DELIM)libnx$(LIBEXT): pass2dep else diff --git a/tools/ProtectedLibs.mk b/tools/ProtectedLibs.mk index e7d8750dfe..f1f7d30b21 100644 --- a/tools/ProtectedLibs.mk +++ b/tools/ProtectedLibs.mk @@ -50,6 +50,13 @@ NUTTXLIBS += staging$(DELIM)libkmm$(LIBEXT) staging$(DELIM)libkarch$(LIBEXT) USERLIBS += staging$(DELIM)libproxies$(LIBEXT) staging$(DELIM)libc$(LIBEXT) USERLIBS += staging$(DELIM)libmm$(LIBEXT) staging$(DELIM)libarch$(LIBEXT) +# Add libraries for math support. + +ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),) +NUTTXLIBS += staging$(DELIM)libkm$(LIBEXT) +USERLIBS += staging$(DELIM)libm$(LIBEXT) +endif + # Add library for system call instrumentation if needed ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y) diff --git a/tools/Unix.mk b/tools/Unix.mk index 03f18d6724..7c0428b0bf 100644 --- a/tools/Unix.mk +++ b/tools/Unix.mk @@ -171,7 +171,7 @@ all: $(BIN) # include/nuttx/lib/math.h will hand the redirection to the architecture- # specific math.h header file. # -# If the CONFIG_LIBM is defined, the Rhombus libm will be built at libc/math. +# If the CONFIG_LIBM is defined, the Rhombus libm will be built at libm/libm. # Definitions and prototypes for the Rhombus libm are also contained in # include/nuttx/lib/math.h and so the file must also be copied in that case. # diff --git a/tools/Win.mk b/tools/Win.mk index c39739c3f0..0893c01a82 100644 --- a/tools/Win.mk +++ b/tools/Win.mk @@ -149,7 +149,7 @@ all: $(BIN) # include\nuttx\math.h will hand the redirection to the architecture- # specific math.h header file. # -# If the CONFIG_LIBM is defined, the Rhombus libm will be built at libc\math. +# If the CONFIG_LIBM is defined, the Rhombus libm will be built at libm\libm. # Definitions and prototypes for the Rhombus libm are also contained in # include\nuttx\math.h and so the file must also be copied in that case. #