以下是我在用AOSP源编译mesa3d时遇到的错误。
ninja: Entering directory `.'
[ 0% 8/16111] host C: mesa_builtin_compiler <= external/mesa3d/src/glsl/./strtod.c
FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/bin/x86_64-linux-gcc -std=c99 -I external/mesa3d/src/mapi -I external/mesa3d/src/mesa -I out/host/linux-x86/gen/EXECUTABLES/mesa_builtin_compiler_intermediates -I out/host/linux-x86/gen/EXECUTABLES/mesa_builtin_compiler_intermediates/glcpp -I external/mesa3d/src/glsl/glcpp -I external/mesa3d/include -I external/mesa3d/src/glsl -I out/host/linux-x86/obj/EXECUTABLES/mesa_builtin_compiler_intermediates -I out/host/linux-x86/gen/EXECUTABLES/mesa_builtin_compiler_intermediates -I libnativehelper/include/nativehelper \$(cat out/host/linux-x86/obj/EXECUTABLES/mesa_builtin_compiler_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem hardware/ril/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem tools/include -isystem out/host/linux-x86/obj/include -c -fno-exceptions -Wno-multichar -m64 -Wa,--noexecstack -fPIC -no-canonical-prefixes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector -D__STDC_FORMAT_MACROS -D__STDC_CONSTANT_MACROS -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -O2 -g -fno-strict-aliasing -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 -fstack-protector-strong --gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8 --sysroot prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/sysroot -Bprebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin -target x86_64-linux-gnu -std=gnu99 -DANDROID_VERSION=0x0701 -DHAVE_PTHREAD=1 -fvisibility=hidden -Wno-sign-compare -fpie -D_USING_LIBCXX -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF out/host/linux-x86/obj/EXECUTABLES/mesa_builtin_compiler_intermediates/./strtod.d -o out/host/linux-x86/obj/EXECUTABLES/mesa_builtin_compiler_intermediates/./strtod.o external/mesa3d/src/glsl/./strtod.c ) && (cp out/host/linux-x86/obj/EXECUTABLES/mesa_builtin_compiler_intermediates/./strtod.d out/host/linux-x86/obj/EXECUTABLES/mesa_builtin_compiler_intermediates/./strtod.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < out/host/linux-x86/obj/EXECUTABLES/mesa_builtin_compiler_intermediates/./strtod.d >> out/host/linux-x86/obj/EXECUTABLES/mesa_builtin_compiler_intermediates/./strtod.P; rm -f out/host/linux-x86/obj/EXECUTABLES/mesa_builtin_compiler_intermediates/./strtod.d )"
x86_64-linux-gcc: error: x86_64-linux-gnu: No such file or directory
x86_64-linux-gcc: error: unrecognized command line option '-fcolor-diagnostics'
x86_64-linux-gcc: error: unrecognized command line option '--gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8'
x86_64-linux-gcc: error: unrecognized command line option '-fstack-protector-strong'
x86_64-linux-gcc: error: unrecognized command line option '--gcc-toolchain=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8'
x86_64-linux-gcc: error: unrecognized command line option '-target'
预建中使用的gcc似乎不支持该选项(-target,-fcolor-diagnostics等)
建议有一些要点。