arch/EXTRA_LIBS: link all staging library
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
parent
1e8d9466d6
commit
931a4f6969
@ -85,6 +85,20 @@ UOBJS = $(UAOBJS) $(UCOBJS)
|
||||
KBIN = libkarch$(LIBEXT)
|
||||
BIN = libarch$(LIBEXT)
|
||||
|
||||
$(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))
|
||||
|
||||
# Override in Make.defs if linker is not 'ld'
|
||||
|
||||
ifeq ($(CONFIG_ARM_TOOLCHAIN_ARMCLANG),)
|
||||
@ -108,7 +122,6 @@ else
|
||||
EXTRA_LIBS += arm_vectors.o
|
||||
endif
|
||||
|
||||
|
||||
ARCHSCRIPT := $(call CONVERT_PATH,$(ARCHSCRIPT))
|
||||
LDFLAGS += $(addprefix $(SCRIPT_OPT),$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
|
||||
LIBPATHS += $(LIBPATH_OPT) $(call CONVERT_PATH,$(TOPDIR)$(DELIM)staging)
|
||||
|
@ -79,6 +79,20 @@ UOBJS = $(UAOBJS) $(UCOBJS)
|
||||
KBIN = libkarch$(LIBEXT)
|
||||
BIN = libarch$(LIBEXT)
|
||||
|
||||
$(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))
|
||||
|
||||
ARCHSCRIPT := $(call CONVERT_PATH,$(ARCHSCRIPT))
|
||||
LDFLAGS += $(addprefix -T,$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
|
||||
|
||||
|
@ -223,6 +223,20 @@ HEADOBJ = $(HEADSRC:.c=$(OBJEXT))
|
||||
SRCS = $(ASRCS) $(CSRCS) $(HOSTSRCS)
|
||||
OBJS = $(AOBJS) $(COBJS) $(HOSTOBJS)
|
||||
|
||||
$(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))
|
||||
|
||||
# Override in Make.defs if linker is not 'ld'
|
||||
|
||||
ifneq ($(CONFIG_HOST_MACOS),y)
|
||||
|
@ -83,6 +83,20 @@ BIN = libarch$(LIBEXT)
|
||||
ARCHSCRIPT := $(call CONVERT_PATH,$(ARCHSCRIPT))
|
||||
LDFLAGS += $(addprefix -T,$(addsuffix .tmp,$(ARCHSCRIPT))) $(EXTRALINKCMDS)
|
||||
|
||||
$(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))
|
||||
|
||||
ifeq ($(LD),$(CC))
|
||||
LDSTARTGROUP ?= -Wl,--start-group
|
||||
LDENDGROUP ?= -Wl,--end-group
|
||||
|
Loading…
Reference in New Issue
Block a user