Move server API concept to base framework

This commit introduces the new `Component` interface in the form of the
headers base/component.h and base/entrypoint.h. The os/server.h API
has become merely a compatibilty wrapper and will eventually be removed.
The same holds true for os/signal_rpc_dispatcher.h. The mechanism has
moved to base/signal.h and is now called 'Signal_handler'.

Since the patch shuffles headers around, please do a 'make clean' in the
build directory.

Issue #1832
This commit is contained in:
Norman Feske
2015-12-23 15:22:33 +01:00
committed by Christian Helmuth
parent 4ac7127f89
commit 051e84c4b4
74 changed files with 1730 additions and 638 deletions

View File

@ -49,18 +49,6 @@ HOST_SO_SEARCH_DIRS := $(sort $(dir $(shell $(LDCONFIG) -p | sed "s/^.* \//\//"
LINK_ARG_PREFIX := -Wl,
CXX_LINK_OPT += $(addprefix $(LINK_ARG_PREFIX)-rpath-link $(LINK_ARG_PREFIX),$(HOST_SO_SEARCH_DIRS))
#
# The '__libc_csu_init' function is normally provided by the C library. We
# override the libc's version in our 'lx_hybrid' library to have a hook for
# Genode-specific initializations. Unfortunately, this way, we get two symbols
# with the same name. So we have to tell the linker to be forgiving. The order
# of the libraries at the linker command line determines which symbol is used.
# Therefore it is important to have 'lx_hybrid.lib.so' listed before '-lc',
# which is always the case when supplying '-lc' via 'EXT_OBJECTS' (not
# 'CXX_LINK_OPT').
#
CXX_LINK_OPT += -Wl,--allow-multiple-definition
#
# Make exceptions work
#
@ -71,7 +59,7 @@ CXX_LINK_OPT += -Wl,--eh-frame-hdr
# variable to the linker command line
#
ifneq ($(LX_LIBS),)
EXT_OBJECTS = $(shell pkg-config --static --libs $(LX_LIBS))
LX_LIBS_OPT = $(shell pkg-config --static --libs $(LX_LIBS))
endif
#
@ -89,8 +77,8 @@ EXT_OBJECTS += $(shell $(CUSTOM_CC) $(CC_MARCH) -print-file-name=crtbegin.o)
EXT_OBJECTS += $(shell $(CUSTOM_CC) $(CC_MARCH) -print-file-name=crtend.o)
endif
EXT_OBJECTS += $(shell cc $(CC_MARCH) -print-file-name=crtn.o)
EXT_OBJECTS += -lgcc -lgcc_s -lsupc++ -lc
EXT_OBJECTS += -lpthread
LX_LIBS_OPT += -lgcc -lgcc_s -lsupc++ -lc -lpthread
USE_HOST_LD_SCRIPT = yes
@ -104,8 +92,11 @@ CXX_LINK_OPT += -Wl,--dynamic-linker=/lib/ld-linux.so.2
endif
endif
# because we use the host compiler's libgcc, omit the Genode toolchain's version
LD_LIBGCC =
#
# Because we use the host compiler's libgcc, omit the Genode toolchain's
# version and put all libraries here we depend on.
#
LD_LIBGCC = $(LX_LIBS_OPT)
# use the host c++ for linking to find shared libraries in DT_RPATH library paths
LD_CMD = c++

View File

@ -23,6 +23,8 @@ SRC_CC += thread/trace.cc thread/thread_env.cc thread/stack_allocator.cc
SRC_CC += irq/platform.cc
SRC_CC += sleep.cc
SRC_CC += rm_session_client.cc
SRC_CC += entrypoint/entrypoint.cc
SRC_CC += component/component.cc
INC_DIR += $(REP_DIR)/src/include $(BASE_DIR)/src/include