[LLVMdev] Fwd: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5 debian packages

Mikael Lepistö mikael.lepisto at tut.fi
Mon Sep 14 00:39:05 PDT 2009


Anybody has an opinion would it be good thing  to add support for llvm- 
gcc to be able to be built with existing llvm installation?

Right now building works with llvm installation also, but only if llvm  
libs and includes are installed under the same prefix, even though  
this seems to be unintended functionality.

So after support for building llvm-gcc without llvm sources it would  
be possible to build e.g. llvm-gcc cross compilers with globally  
installed llvm package.

Mikael Lepistö

Begin forwarded message:

> From: Mikael Lepistö <mikael.lepisto at tut.fi>
> Date: 5. syyskuuta 2009 klo 20.16.48
> To: Commit Messages and Patches for LLVM <llvm-commits at cs.uiuc.edu>
> Subject: Re: [llvm-commits] [PATCH] Building llvm-gcc with llvm-2.5  
> debian packages
> I forgot reply to all setting so here is the mail to list also...
>> Hi Mikael,
>>> Patch fixes the problem in a way that it asks with llvm-config -- 
>>> includedir where include files really should be found.
>> I don't get it.  The llvm-gcc build should not be used the installed
>> llvm at all - you shouldn't need to install llvm in order to build
>> llvm-gcc, only build it.
> It's not obligatory to install llvm to be able to compile llvm-gcc.  
> Still it's perfectly possible to compile llvm-gcc towards llvm  
> installation, if you don't want to compile your llvm from sources.  
> I.e. it is possible to compile llvm gcc with installed llvm or with  
> an llvm source tree, where llvm has been built.
> However if it is not even intended behavior that llvm-gcc is may be  
> compiled with llvm installation tree then the patch is obsolete.
>> So asking llvm-config where it was installed
>> is just wrong.
> If llvm-config is ran from llvm-source-tree/Release/bin the -- 
> includedir switch actually returns include directory of the source  
> tree, so basically we are not asking for installed headers, but just  
> any place where includes should be looked for.
> e.g. on my work computer i got following results for running lvm- 
> config in source dirctory
> elhigu at mr-lenovo:~/stow_sources/llvm-svn$ Debug/bin/llvm-config -- 
> includedir
> /home/elhigu/stow_sources/llvm-svn/include
> and from install directory.
> elhigu at mr-lenovo:~/stow_sources/llvm-svn$ ~/stow_installs/bin/llvm- 
> config --includedir
> /home/elhigu/stow_installs/include
>>  It sounds like the real problem is that LLVMOBJDIR and
>> LLVMSRCDIR are pointing to the wrong places.  What did you pass to
>> --enable-llvm when you configured llvm-gcc?
> When I compile llvm-gcc with llvm installation without llvm sources  
> I pass 'llvm-config --prefix' for --enable-llvm when I build llvm- 
> gcc towards llvm source tree I pass 'llvm-config --src-root'.
> -Mikael
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090914/05ee91a4/attachment.html>

More information about the llvm-dev mailing list