diff --git a/libs/libm/newlib/CMakeLists.txt b/libs/libm/newlib/CMakeLists.txt index 2ca2571942..f1707ee10f 100644 --- a/libs/libm/newlib/CMakeLists.txt +++ b/libs/libm/newlib/CMakeLists.txt @@ -87,11 +87,12 @@ if(CONFIG_LIBM_NEWLIB) set(ARCH_DIR ${CONFIG_ARCH}) endif() - file(GLOB_RECURSE COMMON_CSRCS ${NEWLIB_DIR}/newlib/libm/common/*.c) - file(GLOB_RECURSE COMPLEX_CSRCS ${NEWLIB_DIR}/newlib/libm/complex/*.c) file(GLOB_RECURSE ARCH_CSRCS ${NEWLIB_DIR}/newlib/libm/machine/${ARCH_DIR}/*.c) + file(GLOB_RECURSE COMMON_CSRCS ${NEWLIB_DIR}/newlib/libm/common/*.c) + file(GLOB_RECURSE COMPLEX_CSRCS ${NEWLIB_DIR}/newlib/libm/complex/*.c) + if(CONFIG_ARCH_X86_64) file(GLOB_RECURSE ARCH_CSRCS ${NEWLIB_DIR}/newlib/libm/fenv/*.c) endif() diff --git a/libs/libm/newlib/Make.defs b/libs/libm/newlib/Make.defs index 3ee1fe84e8..f025b05b31 100644 --- a/libs/libm/newlib/Make.defs +++ b/libs/libm/newlib/Make.defs @@ -58,14 +58,6 @@ $(TOPDIR)/include/newlib: newlib/newlib context:: $(TOPDIR)/include/newlib -CSRCS += $(wildcard newlib/newlib/newlib/libm/common/*.c) -CSRCS += $(wildcard newlib/newlib/newlib/libm/complex/*.c) - -VPATH += :newlib/newlib/newlib/libm/common -VPATH += :newlib/newlib/newlib/libm/complex -DEPPATH += --dep-path newlib/newlib/newlib/libm/common -DEPPATH += --dep-path newlib/newlib/newlib/libm/complex - ifeq ($(CONFIG_ARCH_ARM),y) ARCH = arm else ifeq ($(CONFIG_ARCH_ARM64),y) @@ -88,6 +80,13 @@ CSRCS += $(wildcard newlib/newlib/newlib/libm/machine/$(ARCH)/*.c) VPATH += :newlib/newlib/newlib/libm/machine/$(ARCH) DEPPATH += --dep-path newlib/newlib/newlib/libm/machine/$(ARCH) +CSRCS += $(wildcard newlib/newlib/newlib/libm/common/*.c) +CSRCS += $(wildcard newlib/newlib/newlib/libm/complex/*.c) + +VPATH += :newlib/newlib/newlib/libm/common +VPATH += :newlib/newlib/newlib/libm/complex +DEPPATH += --dep-path newlib/newlib/newlib/libm/common +DEPPATH += --dep-path newlib/newlib/newlib/libm/complex ifeq ($(CONFIG_ARCH_X86_64),y) CSRCS += $(wildcard newlib/newlib/newlib/libm/fenv/*.c)