2011-12-22 15:19:25 +00:00
|
|
|
#
|
|
|
|
# Add platform-specific libc headers to standard include search paths
|
|
|
|
#
|
|
|
|
ifeq ($(filter-out $(SPECS),x86),)
|
|
|
|
ifeq ($(filter-out $(SPECS),32bit),)
|
2016-05-13 23:32:10 +00:00
|
|
|
LIBC_ARCH_INC_DIR := include/libc-i386
|
2011-12-22 15:19:25 +00:00
|
|
|
endif # 32bit
|
|
|
|
|
|
|
|
ifeq ($(filter-out $(SPECS),64bit),)
|
2016-05-13 23:32:10 +00:00
|
|
|
LIBC_ARCH_INC_DIR := include/libc-amd64
|
2015-09-07 16:41:08 +00:00
|
|
|
endif # 64bit
|
2011-12-22 15:19:25 +00:00
|
|
|
endif # x86
|
|
|
|
|
|
|
|
ifeq ($(filter-out $(SPECS),arm),)
|
2016-05-13 23:32:10 +00:00
|
|
|
LIBC_ARCH_INC_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
|
|
|
|
|
2016-05-13 23:32:10 +00:00
|
|
|
ifeq ($(CONTRIB_DIR),)
|
|
|
|
REP_INC_DIR += include/libc
|
|
|
|
REP_INC_DIR += $(LIBC_ARCH_INC_DIR)
|
|
|
|
else
|
|
|
|
LIBC_PORT_DIR := $(call select_from_ports,libc)
|
|
|
|
INC_DIR += $(LIBC_PORT_DIR)/include/libc
|
|
|
|
INC_DIR += $(LIBC_PORT_DIR)/$(LIBC_ARCH_INC_DIR)
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
|
|
|
# Genode-specific supplements to standard libc headers
|
|
|
|
#
|
|
|
|
REP_INC_DIR += include/libc-genode
|
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
|
|
|
|
|
2015-05-04 13:44:09 +00:00
|
|
|
#
|
|
|
|
# Provide C99 API functions (needed for C++11 in stdcxx at least)
|
|
|
|
#
|
|
|
|
CC_OPT += -D__ISO_C_VISIBLE=1999
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
#
|
|
|
|
# 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
|