Greetings clangsters,
I've recently been porting llvm/clang 3.0 (release) to powerpc-darwin8 for fink, and have made good progress. I would really like to get this port working, including libc++, and can use some help.
I've taken Jack Howarth's fink package submission and tweaked it for darwin8. Since the original packaging uses the cmake build system, I've also kept that the same (though I prefer and am better-versed in autoconf).
Since g++-4.0.1 isn't supported, I've chosen to bootstrap llvm/clang with gcc-4.6.2.
Package file (builds from source):
Currently at rev. 1.8 at the time of writing this.
my cmake parameters:
-DLLVM_BUILD_32_BITS:BOOL=ON
-DLLVM_TARGETS_TO_BUILD=PowerPC
-DBUILD_SHARED_LIBS:BOOL=ON
-DCMAKE_C_FLAGS=-fno-common -DCMAKE_CXX_FLAGS=-fno-common
I wanted to build with shared libraries b/c an older build of llvm-2.9 produced some massive static executables. During early builds, I found that many (but not all) objects were compiled with -fPIC but missing -fno-common (needed on darwin linker). My cmake-fu is weak, so I just passed -fno-common to the entire build.
The packaging file above contains a bunch of patch-work to get the build to cooperate. Some cmake files were missing dependencies (undefined references) among shared libraries, and I worked around a circular dependence by lumping clangSerialization into clangFrontend [bug 11512]. find-cycles.pl found some other circular deps after everything built [bug 11527], but I just ignored it for now.
The patching is in the form of sed-1-liners, but would anyone be interested in a unidiff-patch? I'm happy to share these, but I don't know whether my patches are "correct" beyond "works for me".
At installation time (InstallScript of .info), I 'fixed' the dylibs and binaries to use references to their installed locations using install_name_tool. (I've never had any luck with getting cmake to do this correctly and automatically, whereas libtool does the right thing.) The resulting installed clang/llvm binaries run properly.
Test results (llvm+clang).
http://paste.lisp.org/display/126363#3
Expected Passes : 6508
Expected Failures : 36
Unsupported Tests : 2955
Unexpected Passes : 1
Unexpected Failures: 77
How can I prepare a summary report of the failing and passing clang/llvm tests (is there a make target)? and where is a good place to report the results for further scrutiny? I've found an llvm-testresults mailing lists but those look like benchmark results.
======= libc++abi, libc++ =======
To make clang++ more use
I haven't found much documentation for these other than:
http://libcxx.llvm.org/
http://libcxxabi.llvm.org/
Are there any official versioned releases of these libraries? I'd like to put proper library version numbers to these, besides the svn revision numbers.
libcxxabi provides no Makefile, so I just improvised my own. Which compiler should I be building this with? It references some c++ stdandard library headers, but without libc++, the only ones available are the system /usr/include/c++/4.0.0 and gcc-4.6's. One of the source files uses the __has_feature() clang feature, so it's not clear to me.
I also plan to install libcxxabi outside of /usr/include, so I'll expect to patch libc++'s "lib/buildit" script.
My first attempts to compile libc++ resulted in some assembly errors, so I'll follow up with those later, maybe after going over clang's test failures.
Fang