I've solved the problem myself.
The problem is caused by the wrong -isystem
directories. I should include ${TOOLCHAIN_LLVM_DIR}/lib/clang/${LLVM_VERSION_MAJOR}/include
instead of /usr/include/linux
. In the stddef.h
located in the former directory, several basic types such as ptrdiff_t
is defined, and both the two directories contains stdc headers stddef.h
.