Mikael Lepistö
2009-Sep-16 07:40 UTC
[LLVMdev] Fwd: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5 debian packages
Mikael Lepistö wrote:> On 15.9.2009, at 12:11, Duncan Sands wrote: > > >> Hi Pekka, >> >> >>> To put it the another way: is there a reason to disallow >>> compiling llvm-gcc (optionally) against an installed LLVM (e.g. >>> from the Debian package)? It seems to work fine with this patch >>> Mikael posted. >>> >> I think it would be great if llvm-gcc could be built against >> an installed LLVM. However my impression was that Mikael's >> original patch would break building against an not-installed llvm. >> >> > > Hi, sorry for being a bit unclear before. > > The patch would just fix llvm-gcc build system to be able to compile > with both, *llvm build in source directory* and *installed llvm > version*. > > Correct include directory can be get with llvm-config --includedir, > because when llvm-config is excuted from llvm source tree (from > Release or Debug directory) it will return the include directory of > source tree (e.g. llvm-2.6svn/include). If llvm-config is called from > installation path it returns include directory of installed llvm > includes. > > I tried the patch with compiling llvm-gcc with: > - llvm-2.5 source tree build > - installed llvm-2.5 from sources > - apt-get installed debian llvm-2.5 packages. > > I will try if the patch works correctly with llvm trunk as well and > show also the compile commands which were used to configure and > compile the llvm-gcc. >Hi, I tested the trunk and it seems to work as well. Below some information about testing process. I also attached the latest version of the patch. - Mikael elhigu at mr-lenovo:~/stow_sources/llvm-svn$ ./configure --prefix=/home/elhigu/stow_repo/test_install/ elhigu at mr-lenovo:~/stow_sources/llvm-svn$ make elhigu at mr-lenovo:~/stow_sources/llvm-svn$ make install ... elhigu at mr-lenovo:~/test_llvm_gcc_compilation/llvm-gcc-built-source-tree$ llvm-config The program 'llvm-config' is currently not installed. You can install it by typing: sudo apt-get install llvm bash: llvm-config: command not found # the source tree build elhigu at mr-lenovo:~/test_llvm_gcc_compilation/llvm-gcc-built-source-tree$ ../../stow_sources/llvm-gcc-4.2-svn/configure --enable-llvm=/home/elhigu/stow_sources/llvm-svn/ --enable-languages=c ... elhigu at mr-lenovo:~/test_llvm_gcc_compilation/llvm-gcc-built-source-tree$ make ... And include switches in compile command in llvm-gcc/gcc directory are: -I. -I. -I../../../stow_sources/llvm-gcc-4.2-svn/gcc -I../../../stow_sources/llvm-gcc-4.2-svn/gcc/. -I../../../stow_sources/llvm-gcc-4.2-svn/gcc/../include -I../../../stow_sources/llvm-gcc-4.2-svn/gcc/../libcpp/include -I../../../stow_sources/llvm-gcc-4.2-svn/gcc/../libdecnumber -I../libdecnumber -I/home/elhigu/stow_sources/llvm-svn/include -I/home/elhigu/stow_sources/llvm-svn/include -I/home/elhigu/stow_sources/llvm-svn/include ... # and with installed build elhigu at mr-lenovo:~/test_llvm_gcc_compilation/llvm-gcc-with-installed-llvm$ ../../stow_sources/llvm-gcc-4.2-svn/configure --enable-llvm=/home/elhigu/stow_repo/test_install/ --enable-languages=c ... elhigu at mr-lenovo:~/test_llvm_gcc_compilation/llvm-gcc-built-source-tree$ make ... include switches in compile command in llvm-gcc/gcc directory are: -I. -I. -I../../../stow_sources/llvm-gcc-4.2-svn/gcc -I../../../stow_sources/llvm-gcc-4.2-svn/gcc/. -I../../../stow_sources/llvm-gcc-4.2-svn/gcc/../include -I../../../stow_sources/llvm-gcc-4.2-svn/gcc/../libcpp/include -I../../../stow_sources/llvm-gcc-4.2-svn/gcc/../libdecnumber -I../libdecnumber -I/home/elhigu/stow_repo/test_install/include -I/home/elhigu/stow_repo/test_install/include> - Mikael > > >> Ciao, >> >> Duncan. >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- A non-text attachment was scrubbed... Name: Makefile-fix-for-allowing-to-build-with-pre-installed-llvm.patch Type: text/x-diff Size: 1988 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090916/bc115de6/attachment.patch>
Duncan Sands
2009-Sep-16 12:50 UTC
[LLVMdev] Fwd: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5 debian packages
Hi Mikael, I don't like this bit: +# Also remove extra llvm postfix from includedir, because llvm-config +# on debian seems to return /usr/include/llvm instead /usr/include Can this not be fixed in debian? Ciao, Duncan.
Duncan Sands
2009-Sep-16 13:02 UTC
[LLVMdev] Fwd: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5 debian packages
Hi Mikael, with your patch I can't build llvm-gcc: make[2]: *** No rule to make target `/home/duncan/LLVM/llvm-objects/../llvm/include/llvm/Intrinsics.gen', needed by `llvm-convert.o'. Stop. Maybe because I use objdir != srcdir in my LLVM build? Ciao, Duncan.
Mikael Lepistö
2009-Sep-16 13:11 UTC
[LLVMdev] Fwd: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5 debian packages
Hi, thanks for testing. I'll try to duplicate and fix the problem. I also remove that debian (actually it was ubuntu) dependent fix and file a bug report to package maintainer. For now on I will also test compilation with llvm built when objdir != srcdir. Hopefully I get updated patch before end of the week. - Mikael On 16.9.2009, at 16:02, Duncan Sands wrote:> Hi Mikael, with your patch I can't build llvm-gcc: > > make[2]: *** No rule to make target `/home/duncan/LLVM/llvm- > objects/../llvm/include/llvm/Intrinsics.gen', needed by `llvm- > convert.o'. Stop. > > Maybe because I use objdir != srcdir in my LLVM build? > > Ciao, > > Duncan.
Seemingly Similar Threads
- [LLVMdev] Fwd: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5 debian packages
- [LLVMdev] Fwd: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5 debian packages
- [LLVMdev] Fwd: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5 debian packages
- [LLVMdev] Fwd: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5 debian packages
- [LLVMdev] Fwd: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5 debian packages