
Originally Posted by
vljn
I'm not familiar with portage so I don't know how to change the ebuild to install llvm 3.2 on your system. I do actually think that installing a development version of llvm system-wide can break things, it's better if you install it somewhere in your HOME. I do this and use a slightly modified version of ~/.bashrc that adds local llvm-config to my PATH.
A detailed how to could be :
git clone git://people.freedesktop.org/~tstellar/llvm
cd llvm
./configure --enable-experimental-targets=AMDGPU --enable-assertions --prefix=/home/user/llvmbin
make && make install
then appebd "PATH=/home/vlj/llvmbin/bin/:$PATH" to your ~/.bashrc file, then restart bash (ie restart your konsole/gnome-terminal/...). You can now reconfigure and rebuild mesa as usual.
Thanks for Your hints. After that I found http://dri.freedesktop.org/wiki/GalliumCompute which even allows one to experiment with opencl while at it
Breaking stuff is likely and happens in Gentoo all the time like few days ago when mysql was updated from version 5.1 to 5.5 in unstable, but for those cases there is this quite nice tool "revdep-rebuild" that preaty much finds all broken libraries and rebuilds broken packages so it is not all that big of an issue as in this case it was like 4 of them for me. Breakage is ussually hardly noticable cause of use of "-Wl,--as-needed" during linking by default which limits number of libs packages it using I would say by half.
However it seems that when I enable AMDGPU using the tree I get linking error specific to the use of as-needed or fvisibility
Code:
...
make[1]: Wejście do katalogu `/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/tools/llvm-shlib'
llvm[1]: Linking Release Shared Library libLLVM-3.2svn.so
x86_64-pc-linux-gnu-g++ -I/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/include -I/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/tools/llvm-shlib -DNDEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fvisibility-inlines-hidden -fno-exceptions -fPIC -Woverloaded-virtual -Wcast-qual -march=btver1 -O2 -pipe --param l1-cache-size=32 --param l1-cache-line-size=64 --param l2-cache-size=512 -ftree-vectorize -Wl,-R -Wl,'$ORIGIN' -L/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/Release/lib -L/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/Release/lib -Wl,-O1 -Wl,--hash-style=both -Wl,--as-needed -Wl,--relax -Wl,--sort-common -Wl,-O1 -Wl,--hash-style=both -Wl,--as-needed -Wl,--relax -Wl,--sort-common -Wl,-O1 -Wl,--hash-style=both -Wl,--as-needed -Wl,--relax -Wl,--sort-common -Wl,-O1 -Wl,--hash-style=both -Wl,--as-needed -Wl,--relax -Wl,--sort-common -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings -shared -o /tmp/portage/sys-devel/llvm-9999/work/llvm-9999/Release/lib/libLLVM-3.2svn.so \
-Wl,--whole-archive -lLLVMMCJIT -lLLVMCppBackendCodeGen -lLLVMX86AsmPrinter -lLLVMScalarOpts -lLLVMJIT -lLLVMMCDisassembler -lLLVMX86AsmParser -lLLVMSelectionDAG -lLLVMAnalysis -lLLVMAMDGPUAsmPrinter -lLLVMX86Info -lLLVMExecutionEngine -lLLVMLinker -lLLVMX86Utils -lLLVMSupport -lLLVMipo -lLLVMMC -lLLVMCore -lLLVMX86Disassembler -lLLVMVectorize -lLLVMMCParser -lLLVMInterpreter -lLLVMipa -lLLVMBitWriter -lLLVMAsmPrinter -lLLVMBitReader -lLLVMAMDGPUDesc -lLLVMTransformUtils -lLLVMX86CodeGen -lLLVMObject -lLLVMRuntimeDyld -lLLVMCodeGen -lLLVMAsmParser -lLLVMInstCombine -lLLVMAMDGPUInfo -lLLVMArchive -lLLVMTarget -lLLVMAMDGPUCodeGen -lLLVMInstrumentation -lLLVMCppBackendInfo -lLLVMDebugInfo -lLLVMX86Desc -Wl,--no-whole-archive -Wl,--soname,libLLVM-3.2svn.so -Wl,--no-undefined -ludis86 -lpthread -lffi -ldl -lm
/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/Release/lib/libLLVMAMDGPUCodeGen.a(AMDGPUAsmPrinter.o): In function `llvm::AMDGPUAsmPrinter::runOnMachineFunction(llvm::MachineFunction&)':
AMDGPUAsmPrinter.cpp:(.text+0x5b4): undefined reference to `llvm::MachineFunction::dump() const'
collect2: ld returned 1 exit status
distcc[20399] ERROR: compile (null) on localhost failed
make[1]: *** [/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/Release/lib/libLLVM-3.2svn.so] Błąd 1
make[1]: Opuszczenie katalogu `/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/tools/llvm-shlib'
make: *** [all] Błąd 1
btw. have You guys seen this? 
http://people.freedesktop.org/~gliss...-pattern.patch