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

Mikael Lepistö mikael.lepisto at tut.fi
Thu Sep 17 05:28:17 PDT 2009


> 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.
>>     
Hi,

Indeed the problem was building llvm objdir != srcdir. In this case 
include files are not generated to srcdir/include, but to objdir/include.

I added fix here, which finds those generated include files (e.g. 
Intrinsics.gen) from objdir/include if we are building llvm-gcc with non 
installed llvm and from llvm-config --includedir for installed.

For checking if we are building with installed or non-installed llvm 
looks like that the BUILDMODE variable can be used from 
llvm-gcc/gcc/configure.ac. The file sets BUILDMODE to be empty if llvm 
installation directory is passed to --enable-llvm switch.

-Mikael

ps. I also added ifneq (LLVMOBJDIR,) check back to not interfere with 
normal gcc build without --enable-llvm switch and tried that it still works.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile-fix-for-allowing-to-build-with-pre-installed-llvm-rc2.patch
Type: text/x-diff
Size: 2001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090917/062bc56a/attachment.patch>


More information about the llvm-commits mailing list