[LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0

John Criswell criswell at uiuc.edu
Tue Mar 9 08:33:29 PST 2010


Anton Korobeynikov wrote:
>> Thanks Bob and John for the response. I am having problems building
>> poolalloc with my MinGW and gcc 4.4.0 setup. Running make in the poolalloc
>> directory results in a bunch of "undefined reference to ..." link errors
>> building Release/lib/LLVMDataStructure.dll. I looked at the command line for
>>     
> Hrm... John, is poolalloc a loadable module?
>   
Yes.  I believe both static and dynamic libraries are built.
> If yes, then it won't work on cygwin/mingw - no dynamic linking there,
> one needs to link the stuff into opt manualy.
>
>   

That's good to know.
:)

Patrick, I assume you want to write some sort of LLVM pass that uses 
DSA.  To get this to work on Cygwin/MingW, what you want to do is to 
write a tool that statically links in DSA and your pass(es).  You can 
take the source code to the pa tool (poolalloc/tools/Pa) and modify it 
accordingly.

I think this method is preferable over Anton's suggestion of linking DSA 
directly into opt because it prevents you from having a modified version 
of the LLVM tools to maintain.

-- John T.




More information about the llvm-dev mailing list