From 1c65fbf15a47dc06f19c179963f17503ffcf572f Mon Sep 17 00:00:00 2001 From: liwenxiang1 Date: Tue, 16 Jul 2024 19:43:57 +0800 Subject: [PATCH] libc/newlib:Declaration of adding depth Resolve the issue of inability to compile when opening newlib Signed-off-by: liwenxiang1 --- libs/libm/newlib/Make.defs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libs/libm/newlib/Make.defs b/libs/libm/newlib/Make.defs index 7675718a16..3ee1fe84e8 100644 --- a/libs/libm/newlib/Make.defs +++ b/libs/libm/newlib/Make.defs @@ -63,6 +63,8 @@ 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 @@ -84,10 +86,14 @@ endif 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) + ifeq ($(CONFIG_ARCH_X86_64),y) CSRCS += $(wildcard newlib/newlib/newlib/libm/fenv/*.c) VPATH += :newlib/newlib/newlib/libm/fenv +DEPPATH += --dep-path newlib/newlib/newlib/libm/fenv + CFLAGS += ${INCDIR_PREFIX}newlib/newlib/newlib/libc/machine/shared_x86/sys endif @@ -98,10 +104,13 @@ endif CSRCS += newlib/sincosl.c VPATH += :newlib +DEPPATH += --dep-path newlib + ifeq ($(CONFIG_LIBM_NEWLIB_HW_FP),y) CSRCS += $(wildcard newlib/newlib/newlib/libm/mathfp/*.c) VPATH += :newlib/newlib/newlib/libm/mathfp + DEPPATH += --dep-path newlib/newlib/newlib/libm/mathfp CFLAGS += -Wno-dangling-else CFLAGS += -Wno-endif-labels CFLAGS += -Wno-implicit-function-declaration @@ -112,6 +121,7 @@ ifeq ($(CONFIG_LIBM_NEWLIB_HW_FP),y) else CSRCS += $(wildcard newlib/newlib/newlib/libm/math/*.c) VPATH += :newlib/newlib/newlib/libm/math + DEPPATH += --dep-path newlib/newlib/newlib/libm/math endif CSRCS := $(shell echo $(notdir $(CSRCS) | tr " " "\n" | sort | uniq))