llvm-config returns temporary paths for obj-root and src-root: > llvm-config --obj-root /var/tmp/portage/sys-devel/llvm-3.4/work/llvm-3.4-amd64 > llvm-config --src-root /var/tmp/portage/sys-devel/llvm-3.4/work/llvm-3.4 It complicates the build process of other packages depending on those entries. The Debian guys recently included a patch to fix this: http://anonscm.debian.org/viewvc/pkg-llvm/llvm-toolchain/branches/3.4/debian/patches/fix-llvm-config-obj-src-root.patch?view=markup&pathrev=1096 Maybe we can fix this too. Reproducible: Always
On the Debian patch: > Index: llvm-toolchain-3.3/tools/llvm-config/llvm-config.cpp > =================================================================== > --- llvm-toolchain-3.3.orig/tools/llvm-config/llvm-config.cpp 2013-11-26 10:49:16.183929247 +0100 > +++ llvm-toolchain-3.3/tools/llvm-config/llvm-config.cpp 2013-11-26 10:49:16.179929247 +0100 > @@ -302,9 +302,9 @@ > } else if (Arg == "--build-mode") { > OS << LLVM_BUILDMODE << '\n'; > } else if (Arg == "--obj-root") { > - OS << LLVM_OBJ_ROOT << '\n'; > + OS << ActivePrefix << "/build/" << '\n'; > } else if (Arg == "--src-root") { > - OS << LLVM_SRC_ROOT << '\n'; > + OS << ActivePrefix << "/build/" << '\n'; > } else { > usage(); > } Doesn't this actually invent some weirdo location like /usr/build? Honestly, I have no idea what to do with this -- and moreover, I have no idea why would anyone sane use this location in a build system...
> Doesn't this actually invent some weirdo location like /usr/build? Should be /usr/share/llvm-.../build in Ubuntu. > Honestly, I have no idea what to do with this -- and moreover, I have no > idea why would anyone sane use this location in a build system... They added some patches to keep Makefile.rules, Makefile.config and the Release-link (back to /usr/share/llvm-...) in build/. Otherwise one can't build some LLVM subprojects and has to use ugly hacks: http://forums.gentoo.org/viewtopic-t-983748.html
As long as autotools are concerned, we usually can't support building subprojects outside of llvm ebuild. Which of the subprojects you need?
For instance KLEE. But my version has many patches and therefore integrating the original branch into the llvm ebuild is not an option.
(In reply to T6n9naYMKJ from comment #4) > For instance KLEE. But my version has many patches and therefore integrating > the original branch into the llvm ebuild is not an option. Well, you can either try to 'replace' the original branch in the ebuild (if we add it) with your own, or you'd have to work on your own llvm ebuild. We can't really support building against Makefiles like this since, well, the build system is so mis-designed it hurts. Also I should note that we're slowly moving away from Makefiles in LLVM in favor of CMake which is a bit less broken in that project.
As a note, in reply to bug #565358 I've added a patch that causes llvm-config to error out when obj-root or src-root is requested. I'm afraid this is not what you really wanted but at least it prevents reverse dependencies from trying to use temporary directories.
As noted above, we went a different way and I don't think we can sanely support what you need. Please let me know if you have any ideas what to do (with llvm-3.8*+).