mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 09:49:21 +08:00
arch/EXTRA_LIBS: link all staging library.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
648c52fc4b
commit
7b43a9413a
2 changed files with 28 additions and 0 deletions
|
@ -53,6 +53,20 @@ OBJS = $(AOBJS) $(COBJS)
|
|||
|
||||
# Override in Make.defs if linker is not 'ld'
|
||||
|
||||
$(foreach lib,$(notdir $(wildcard $(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT))), \
|
||||
$(foreach elib,$(EXTRA_LIBS), \
|
||||
$(if $(filter $(notdir $(elib)),$(lib)), \
|
||||
$(eval NAMEFULL_LIBS+=$(elib)), \
|
||||
$(if $(filter $(notdir $(elib)),$(patsubst lib%$(LIBEXT),-l%,$(lib))), \
|
||||
$(eval NAMESPEC_LIBS+=$(elib)) \
|
||||
) \
|
||||
) \
|
||||
) \
|
||||
)
|
||||
|
||||
EXTRA_LIBS := $(filter-out $(NAMEFULL_LIBS) $(NAMESPEC_LIBS),$(EXTRA_LIBS))
|
||||
EXTRA_LIBS += $(wildcard $(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT))
|
||||
|
||||
LDSTARTGROUP ?= --start-group
|
||||
LDENDGROUP ?= --end-group
|
||||
LDFLAGS += $(addprefix -T,$(call CONVERT_PATH,$(ARCHSCRIPT))) -static
|
||||
|
|
|
@ -53,6 +53,20 @@ BIN = libarch$(LIBEXT)
|
|||
|
||||
# Override in Make.defs if linker is not 'ld'
|
||||
|
||||
$(foreach lib,$(notdir $(wildcard $(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT))), \
|
||||
$(foreach elib,$(EXTRA_LIBS), \
|
||||
$(if $(filter $(notdir $(elib)),$(lib)), \
|
||||
$(eval NAMEFULL_LIBS+=$(elib)), \
|
||||
$(if $(filter $(notdir $(elib)),$(patsubst lib%$(LIBEXT),-l%,$(lib))), \
|
||||
$(eval NAMESPEC_LIBS+=$(elib)) \
|
||||
) \
|
||||
) \
|
||||
) \
|
||||
)
|
||||
|
||||
EXTRA_LIBS := $(filter-out $(NAMEFULL_LIBS) $(NAMESPEC_LIBS),$(EXTRA_LIBS))
|
||||
EXTRA_LIBS += $(wildcard $(APPDIR)$(DELIM)staging$(DELIM)*$(LIBEXT))
|
||||
|
||||
LDSTARTGROUP ?= --start-group
|
||||
LDENDGROUP ?= --end-group
|
||||
|
||||
|
|
Loading…
Reference in a new issue