【OpenWRT】1209 AA 版本,先前未安装gperf,后来发现需要gperf, 安装之,出现下面异常
i686-linux-gnu-gcc -c  -DIN_GCC_FRONTEND  -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -I. -I. -I/home/dragonfly/src/mt7620a/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gcc-linaro-4.6-2012.02/gcc -I/home/dragonfly/src/mt7620a/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gcc-linaro-4.6-2012.02/gcc/. -I/home/dragonfly/src/mt7620a/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gcc-linaro-4.6-2012.02/gcc/../include -I/home/dragonfly/gwifi//src/mt7620a/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gcc-linaro-4.6-2012.02/gcc/../libcpp/include -I/home/dragonfly/src/mt7620a/staging_dir/host/include -I/home/dragonfly/src/mt7620a/staging_dir/host/include -I/home/dragonfly/src/mt7620a/staging_dir/host/include  -I/home/dragonfly/src/mt7620a/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gcc-linaro-4.6-2012.02/gcc/../libdecnumber -I/home/dragonfly/src/mt7620a/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gcc-linaro-4.6-2012.02/gcc/../libdecnumber/dpd -I../libdecnumber    cc1plus-checksum.c -o cc1plus-checksum.o
i686-linux-gnu-gcc    -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H  -o cc1plus \
              cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-gimplify.o tree-mudflap.o attribs.o incpath.o prefix.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o  cc1plus-checksum.o main.o  libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a ../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lstdc++   -L/home/dragonfly/src/mt7620a/staging_dir/host/lib -L/home/dragonfly/src/mt7620a/staging_dir/host/lib -L/home/dragonfly/src/mt7620a/staging_dir/host/lib -lmpc -lmpfr -lgmp -rdynamic -ldl -lstdc++ -L../zlib -lz
cp/except.o: In function `nothrow_libfn_p':
except.c:(.text+0x16c5): undefined reference to `libc_name_p'
collect2: ld returned 1 exit status
make[7]: *** [cc1plus] Error 1
make[7]: Leaving directory `/home/dragonfly/src/mt7620a/build_dir/toolchain-mipsel_r2_gcc-4.6-linaro_uClibc-0.9.33.2/gcc-linaro-4.6-2012.02-final/gcc'

【Solution】
googel & baidu
https://stackoverflow.com/questions/3040801/error-compiling-gcc-undefined-reference-to-libc-name-p

When compiling GCC it is possible to get very far in the build process only to hiccup on an error complaining about the lack of gperf installed. After installing gperf and running, I hit an "undefined reference to libc_name_p." I've looked at the solutions here and here but they weren't helpful.


========================

When gperf wasn't installed, the compilation script ran the command anyway but generated a blank ./gcc/cp/cfns.h. Since this file was newer than the source (./gcc/cp/cfns.gperf) the makefile left it alone and never regenerated the 'real' file when you actually had gperf. To continue, run rm ./gcc/cp/cfns.h and try again.





01-04 02:06