linking error on illumos

Hello.
I'm trying to compile clang 3.4.1 on OpenIndiana /hipster (illumos distribution). I've applied the same patch as for clang 3.3:
https://github.com/pyhalov/oi-userland/blob/oi/hipster/components/clang/patches/correct_paths.patch to build it.

However, I receive error while linking clang-check:

llvm[5]: Linking Release+Asserts executable diagtool (without symbols)
llvm[5]: ======= Finished Linking Release+Asserts Executable diagtool (without symbols)
make[5]: Leaving directory `/export/home/alp/srcs/oi-userland/components/clang/build/i86/tools/clang/tools/diagtool'
llvm[5]: Compiling CIndexCodeCompletion.cpp for Release+Asserts build (PIC)
llvm[5]: Linking Release+Asserts executable clang-check (without symbols)
Undefined first referenced
  symbol in file
vtable for clang::tooling::FrontendActionFactory* clang::tooling::newFrontendActionFactory<clang_check::ClangCheckActionFactory>(clang_check::ClangCheckActionFactory*, clang::tooling::SourceFileCallbacks*)::FrontendActionFactoryAdapter::ConsumerFactoryAdaptor /export/home/alp/srcs/oi-userland/components/clang/build/i86/tools/clang/tools/clang-check/Release+Asserts/ClangCheck.o
ld: fatal: symbol referencing errors. No output written to /export/home/alp/srcs/oi-userland/components/clang/build/i86/Release+Asserts/bin/clang-check
collect2: error: ld returned 1 exit status
make[5]: *** [/export/home/alp/srcs/oi-userland/components/clang/build/i86/Release+Asserts/bin/clang-check] Error 1
make[5]: Leaving directory `/export/home/alp/srcs/oi-userland/components/clang/build/i86/tools/clang/tools/clang-check'
make[4]: *** [clang-check/.makeall] Error 2

Any ideas what can be wrong?

land/components/clang/build/i86/tools/clang/tools/clang-check/Release+Asserts/ClangCheck.o

ld: fatal: symbol referencing errors. No output written to
/export/home/alp/srcs/oi-userland/components/clang/build/i86/Release+Asserts/bin/clang-check

collect2: error: ld returned 1 exit status
make[5]: ***
[/export/home/alp/srcs/oi-userland/components/clang/build/i86/Release+Asserts/bin/clang-check]
Error 1
make[5]: Leaving directory
`/export/home/alp/srcs/oi-userland/components/clang/build/i86/tools/clang/tools/clang-check'

make[4]: *** [clang-check/.makeall] Error 2

Any ideas what can be wrong?

This seems to be related to GCC version. Can compile and link it with GCC 4.7.3, but not with GCC 4.7.4...