echo 'main(){}'|arm-xilinx-linux-gnueabi-gcc -E -v -
看到如下输出内容
Using built-in specs.
COLLECT_GCC=arm-xilinx-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../libexec/gcc/arm-xilinx-linux-gnueabi/4.6.1/lto-wrapper
Target: arm-xilinx-linux-gnueabi
Configured with: /scratch/janisjo/2011.09-xilinx-linux/src/gcc-4.6-2011.09/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-xilinx-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-arch=armv5te --with-cpu=cortex-a9 --with-float=softfp --with-fpu=neon-fp16 --disable-multilib --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} %{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} -D__CS_SOURCERYGXX_MAJ__=2011 -D__CS_SOURCERYGXX_MIN__=9 -D__CS_SOURCERYGXX_REV__=50 %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery CodeBench Lite 2011.09-50' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-xilinx-linux-gnueabi/libc --with-build-sysroot=/scratch/janisjo/2011.09-xilinx-linux/install/arm-xilinx-linux-gnueabi/libc --with-gmp=/scratch/janisjo/2011.09-xilinx-linux/obj/host-libs-2011.09-50-arm-xilinx-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/janisjo/2011.09-xilinx-linux/obj/host-libs-2011.09-50-arm-xilinx-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpc=/scratch/janisjo/2011.09-xilinx-linux/obj/host-libs-2011.09-50-arm-xilinx-linux-gnueabi-i686-pc-linux-gnu/usr --with-ppl=/scratch/janisjo/2011.09-xilinx-linux/obj/host-libs-2011.09-50-arm-xilinx-linux-gnueabi-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/janisjo/2011.09-xilinx-linux/obj/host-libs-2011.09-50-arm-xilinx-linux-gnueabi-i686-pc-linux-gnu/usr --with-libelf=/scratch/janisjo/2011.09-xilinx-linux/obj/host-libs-2011.09-50-arm-xilinx-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/janisjo/2011.09-xilinx-linux/install/arm-xilinx-linux-gnueabi/bin --with-build-time-tools=/scratch/janisjo/2011.09-xilinx-linux/install/arm-xilinx-linux-gnueabi/bin
Thread model: posix
gcc version 4.6.1 (Sourcery CodeBench Lite 2011.09-50)
COLLECT_GCC_OPTIONS='-E' '-v' '-march=armv5te' '-mfloat-abi=softfp' '-mfpu=neon-fp16' '-mtls-dialect=gnu' '-funwind-tables' '-D' '__CS_SOURCERYGXX_MAJ__=2011' '-D' '__CS_SOURCERYGXX_MIN__=9' '-D' '__CS_SOURCERYGXX_REV__=50'
/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../libexec/gcc/arm-xilinx-linux-gnueabi/4.6.1/cc1 -E -quiet -v -iprefix /home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/ -isysroot /home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../arm-xilinx-linux-gnueabi/libc -D __CS_SOURCERYGXX_MAJ__=2011 -D __CS_SOURCERYGXX_MIN__=9 -D __CS_SOURCERYGXX_REV__=50 - -march=armv5te -mfloat-abi=softfp -mfpu=neon-fp16 -mtls-dialect=gnu -funwind-tables
ignoring duplicate directory "/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/../../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/include"
ignoring nonexistent directory "/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../arm-xilinx-linux-gnueabi/libc/usr/local/include"
ignoring duplicate directory "/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/../../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/include-fixed"
ignoring duplicate directory "/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/../../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/../../../../arm-xilinx-linux-gnueabi/include"
#include "..." search starts here:
#include <...> search starts here:
/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/include
/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/include-fixed
/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/../../../../arm-xilinx-linux-gnueabi/include
/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../arm-xilinx-linux-gnueabi/libc/usr/include
End of search list.
# 1 "
# 1 "
# 1 "
# 1 "
main(){}
COMPILER_PATH=/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../libexec/gcc/arm-xilinx-linux-gnueabi/4.6.1/:/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../libexec/gcc/:/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/../../../../arm-xilinx-linux-gnueabi/bin/
LIBRARY_PATH=/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/:/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/:/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/../../../../arm-xilinx-linux-gnueabi/lib/:/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../arm-xilinx-linux-gnueabi/libc/lib/:/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../arm-xilinx-linux-gnueabi/libc/usr/lib/
COLLECT_GCC_OPTIONS='-E' '-v' '-march=armv5te' '-mfloat-abi=softfp' '-mfpu=neon-fp16' '-mtls-dialect=gnu' '-funwind-tables' '-D' '__CS_SOURCERYGXX_MAJ__=2011' '-D' '__CS_SOURCERYGXX_MIN__=9' '-D' '__CS_SOURCERYGXX_REV__=50'
这就是内定的include文件搜索路径
#include "..." search starts here:
#include <...> search starts here:
/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/include
/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/include-fixed
/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../lib/gcc/arm-xilinx-linux-gnueabi/4.6.1/../../../../arm-xilinx-linux-gnueabi/include
/home/ding/xilinx/CodeSourcery/Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux/bin/../arm-xilinx-linux-gnueabi/libc/usr/include
End of search list.
注意:如果在相应的目录下缺少了某些文件比如(include目录),可以直接拷贝include到默认目录即可。