Quantcast
Channel: User Jeremy - Stack Overflow
Viewing all articles
Browse latest Browse all 46

Answer by Jeremy for Cannot find header files when cross compiling with clang and specifying target/sysroot

$
0
0

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.


Viewing all articles
Browse latest Browse all 46

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>