I've found that -sysroot
doesn't solve the problem on my system and so - as suggested by the relevant Clang documentation - I've explicitly specified include paths using -isystem
:
ifeq ($(toolchain),clang) INCLUDE += -isystem "$(GCC_TOOLCHAIN_DIR)/arm-none-eabi/include/c++/$(GCC_TOOLCHAIN_VERSION)/arm-none-eabi" INCLUDE += -isystem "$(GCC_TOOLCHAIN_DIR)/arm-none-eabi/include/c++/$(GCC_TOOLCHAIN_VERSION)" INCLUDE += -isystem "$(GCC_TOOLCHAIN_DIR)/arm-none-eabi/include"endif
Since the GCC header files use #include_next
directives, the order of these is crucial.
For the time being I'm using gcc/g++ to link, so I'm yet to have to deal with any linking issues.