base: add startup lib to the base libs

Startup lib can now be filtered according to the same rules like
the other base libraries.

Issue #1042
This commit is contained in:
Martin Stein 2014-02-11 18:15:34 +01:00 committed by Norman Feske
parent 929a2387d1
commit f74c70ec05
3 changed files with 9 additions and 11 deletions

View File

@ -4,7 +4,7 @@
# These static libraries are filtered out when linking dynamically linked
# binaries.
#
BASE_LIBS = base-common base cxx timed_semaphore alarm config syscall
BASE_LIBS = base-common base startup cxx timed_semaphore alarm config syscall
#
# Name of Genode's dynamic linker

View File

@ -127,12 +127,11 @@ $(LIB_A): $(OBJECTS)
$(VERBOSE)$(AR) -rc $@ $(OBJECTS)
#
# Prevent linkage of startup code and base libs against shared libraries except
# for ld.lib.so
# Don't link base libraries against shared libraries except for ld.lib.so
#
ifdef SHARED_LIB
ifneq ($(LIB),ld)
override DEPS := $(filter-out $(BASE_LIBS:=.lib) startup.lib,$(DEPS))
override DEPS := $(filter-out $(BASE_LIBS:=.lib),$(DEPS))
endif
endif

View File

@ -128,7 +128,7 @@ LD_CMD += -Wl,--dynamic-linker=$(DYNAMIC_LINKER).lib.so \
#
# Filter out the base libraries since they will be provided by the LDSO library
#
FILTER_DEPS := $(filter-out $(BASE_LIBS) startup,$(DEPS:.lib=))
FILTER_DEPS := $(filter-out $(BASE_LIBS),$(DEPS:.lib=))
SHARED_LIBS += $(LIB_CACHE_DIR)/$(DYNAMIC_LINKER)/$(DYNAMIC_LINKER).lib.so
#
@ -157,14 +157,13 @@ STATIC_LIBS := $(foreach l,$(FILTER_DEPS),$(LIB_CACHE_DIR)/$l/$l.lib.a)
STATIC_LIBS := $(sort $(wildcard $(STATIC_LIBS)))
#
# For hybrid Linux/Genode programs, prevent the linkage Genode's cxx, base,
# and startup libraries because these functionalities are covered by the glibc
# or by 'src/platform/lx_hybrid.cc'.
# For hybrid Linux/Genode programs, prevent the linkage Genode's cxx and base
# library because these functionalities are covered by the glibc or by
# 'src/platform/lx_hybrid.cc'.
#
ifeq ($(USE_HOST_LD_SCRIPT),yes)
STATIC_LIBS := $(filter-out $(LIB_CACHE_DIR)/startup/startup.lib.a, $(STATIC_LIBS))
STATIC_LIBS := $(filter-out $(LIB_CACHE_DIR)/base/base.lib.a, $(STATIC_LIBS))
STATIC_LIBS := $(filter-out $(LIB_CACHE_DIR)/cxx/cxx.lib.a, $(STATIC_LIBS))
STATIC_LIBS := $(filter-out $(LIB_CACHE_DIR)/base/base.lib.a, $(STATIC_LIBS))
STATIC_LIBS := $(filter-out $(LIB_CACHE_DIR)/cxx/cxx.lib.a, $(STATIC_LIBS))
endif
#