2011-12-22 15:19:25 +00:00
|
|
|
#
|
|
|
|
# Support for using standard C++ headers for Genode programs
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Add the location of the compiler's C++ headers to search path
|
|
|
|
#
|
|
|
|
# We add all header locations that have "c++" or "include-fixed" to the search
|
|
|
|
# path. The 'c++' subdirectory contains the actual standard C++ headers.
|
|
|
|
# However, for using them together with Boost, we need to access 'limits.h' as
|
|
|
|
# provided within the 'include-fixed' location.
|
|
|
|
#
|
|
|
|
INC_DIR += $(shell echo "int main() {return 0;}" |\
|
|
|
|
LANG=C $(CXX) -x c++ -v -E - 2>&1 |\
|
|
|
|
sed '/^\#include <\.\.\.> search starts here:/,/^End of search list/!d' |\
|
|
|
|
grep "c++")
|
|
|
|
|
2012-07-10 21:03:48 +00:00
|
|
|
# avoid multiple definition of type _mbstate_t
|
|
|
|
CC_CXX_OPT += -D_GLIBCXX_HAVE_MBSTATE_T
|
|
|
|
|
2011-12-22 15:19:25 +00:00
|
|
|
#
|
|
|
|
# Link libstdc++ that comes with the tool chain
|
|
|
|
#
|
2012-06-19 09:05:16 +00:00
|
|
|
ifneq ($(filter hardening_tool_chain, $(SPECS)),)
|
|
|
|
EXT_OBJECTS += $(shell $(CUSTOM_CXX_LIB) $(CC_MARCH) -print-file-name=libstdc++.so)
|
|
|
|
else
|
2011-12-22 15:19:25 +00:00
|
|
|
EXT_OBJECTS += $(shell $(CUSTOM_CXX_LIB) $(CC_MARCH) -print-file-name=libstdc++.a)
|
2012-06-19 09:05:16 +00:00
|
|
|
endif
|