failed to compile clange on FreeBSD7.1

hi,everyone,as the ‘getting started ’ page
says ,I check out llvm ,and compile it succssfully.
then I checked out clang source files.
I run commands:
touch empty.c; gcc -v empty.c -fsyntax-only
its output is :
Using built-in specs.
Target: i386-undermydesk-freebsd
Configured with: FreeBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719 [FreeBSD]
/usr/libexec/cc1 -quiet -v -D_LONGLONG empty.c -quiet -dumpbase empty.c -auxbase empty -version -fsyntax-only -o /dev/null
ignoring duplicate directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
End of search list.
GNU C version 4.2.1 20070719 [FreeBSD] (i386-undermydesk-freebsd)
compiled by GNU C version 4.2.1 20070719 [FreeBSD].
GGC heuristics: --param ggc-min-expand=46 --param ggc-min-heapsize=31156
Compiler executable checksum: 5208351120a90a18f603e3b485bf8c2b

I append this statement:
AddPath(”/usr/include", System, true, false, false);
to function
void InitHeaderSearch::AddDefaultSystemIncludePaths(const LangOptions &Lang)
in file clang/lib/Driver/InitHeaderSearch.cpp
then gmake clang,it failed.Its output is
"llvm[2]: Compiling CGExprConstant.cpp for Debug build
CGExprConstant.cpp: In member function 'llvm::Constant*<unnamed>::ConstExprEmitter::EmitUnionInitialization(clang::InitListExpr*)':
CGExprConstant.cpp:241: error: 'const class llvm::TargetData' has no member named 'getTypePaddedSize'
gmake[2]: *** [/usr/home/lujd/projects/llvm/tools/clang/lib/CodeGen/Debug/CGExprConstant.o] Error 1
gmake[2]: Leaving directory /usr/home/lujd/projects/llvm/tools/clang/lib/CodeGen’<br>gmake[1]: *** [CodeGen/.makeall] Error 2<br>gmake[1]: Leaving directory /usr/home/lujd/projects/llvm/tools/clang/lib'
gmake: *** [all] Error 1"

Please help me.Thanks.


You need to update to the latest LLVM in Subversion.

  • Doug