2014-05-07 21:52:52 +00:00
|
|
|
LIBC_PORT_DIR := $(call select_from_ports,libc)
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
#
|
|
|
|
# Add generic libc headers to standard include search paths
|
|
|
|
#
|
2014-05-07 21:52:52 +00:00
|
|
|
INC_DIR += $(LIBC_PORT_DIR)/include/libc
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Genode-specific supplements to standard libc headers
|
|
|
|
#
|
|
|
|
REP_INC_DIR += include/libc-genode
|
|
|
|
|
|
|
|
#
|
|
|
|
# Add platform-specific libc headers to standard include search paths
|
|
|
|
#
|
|
|
|
ifeq ($(filter-out $(SPECS),x86),)
|
|
|
|
ifeq ($(filter-out $(SPECS),32bit),)
|
2014-05-07 21:52:52 +00:00
|
|
|
LIBC_ARCH_INC_DIR := $(LIBC_PORT_DIR)/include/libc-i386
|
2011-12-22 15:19:25 +00:00
|
|
|
endif # 32bit
|
|
|
|
|
|
|
|
ifeq ($(filter-out $(SPECS),64bit),)
|
2014-05-07 21:52:52 +00:00
|
|
|
LIBC_ARCH_INC_DIR := $(LIBC_PORT_DIR)/include/libc-amd64
|
2011-12-22 15:19:25 +00:00
|
|
|
endif # 32bit
|
|
|
|
endif # x86
|
|
|
|
|
|
|
|
ifeq ($(filter-out $(SPECS),arm),)
|
2014-05-07 21:52:52 +00:00
|
|
|
LIBC_ARCH_INC_DIR := $(LIBC_PORT_DIR)/include/libc-arm
|
2011-12-22 15:19:25 +00:00
|
|
|
endif # ARM
|
|
|
|
|
|
|
|
#
|
|
|
|
# If we found no valid include path for the configured target platform,
|
|
|
|
# we have to prevent the build system from building the target. This is
|
|
|
|
# done by adding an artificial requirement.
|
|
|
|
#
|
2014-05-07 21:52:52 +00:00
|
|
|
ifeq ($(LIBC_ARCH_INC_DIR),)
|
2011-12-22 15:19:25 +00:00
|
|
|
REQUIRES += libc_support_for_your_target_platform
|
|
|
|
endif
|
|
|
|
|
2014-05-07 21:52:52 +00:00
|
|
|
INC_DIR += $(LIBC_ARCH_INC_DIR)
|
2011-12-22 15:19:25 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Prevent gcc headers from defining __size_t. This definition is done in
|
|
|
|
# machine/_types.h.
|
|
|
|
#
|
|
|
|
CC_OPT += -D__FreeBSD__=8
|
|
|
|
|
|
|
|
#
|
|
|
|
# Prevent gcc-4.4.5 from generating code for the family of 'sin' and 'cos'
|
|
|
|
# functions because the gcc-generated code would actually call 'sincos'
|
|
|
|
# or 'sincosf', which is a GNU extension, not provided by our libc.
|
|
|
|
#
|
|
|
|
CC_OPT += -fno-builtin-sin -fno-builtin-cos -fno-builtin-sinf -fno-builtin-cosf
|
Merge base libraries into a single library
This patch simplifies the way of how Genode's base libraries are
organized. Originally, the base API was implemented in the form of many
small libraries such as 'thread', 'env', 'server', etc. Most of them
used to consist of only a small number of files. Because those libraries
are incorporated in any build, the checking of their inter-dependencies
made the build process more verbose than desired. Also, the number of
libraries and their roles (core only, non-core only, shared by both core
and non-core) were not easy to capture.
Hereby, the base libraries have been reduced to the following few
libraries:
- startup.mk contains the startup code for normal Genode processes.
On some platform, core is able to use the library as well.
- base-common.mk contains the parts of the base library that are
identical by core and non-core processes.
- base.mk contains the complete base API implementation for non-core
processes
Consequently, the 'LIBS' declaration in 'target.mk' files becomes
simpler as well. In the most simple case, only the 'base' library must
be mentioned.
Fixes #18
2013-02-14 11:39:51 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# Automatically add the base library for targets that use the libc
|
|
|
|
#
|
|
|
|
# We test for an empty 'LIB_MK' variable to determine whether we are currently
|
|
|
|
# processing a library or a target. We only want to add the base library to
|
|
|
|
# targets, not libraries.
|
|
|
|
#
|
|
|
|
ifeq ($(LIB_MK),)
|
|
|
|
LIBS += base
|
|
|
|
endif
|