John Criswell
2010-Mar-09 16:33 UTC
[LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
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.
John Criswell
2010-Mar-09 17:13 UTC
[LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
Dear Patrick and Antron, I've modified the Makefiles in the poolalloc module so that they do not build shared libraries on MingW or Cygwin. Patrick, if you do an "svn up" you should be able to compile the poolalloc project now. -- John T.
Andrew Lenharth
2010-Mar-09 17:24 UTC
[LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
I suggest you stick to John's release_26 branch of poolalloc for now. 2.7 breaks poolalloc, and dsa is undergoing some changes. Andrew On Tue, Mar 9, 2010 at 11:13 AM, John Criswell <criswell at uiuc.edu> wrote:> Dear Patrick and Antron, > > I've modified the Makefiles in the poolalloc module so that they do not > build shared libraries on MingW or Cygwin. Patrick, if you do an "svn > up" you should be able to compile the poolalloc project now. > > -- John T. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Andrew Lenharth
2010-Mar-09 17:26 UTC
[LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
The patch below adds dsa and some of poolalloc to opt. It should be simple enough to extend to all of poolalloc by adding more classes to LinkDSA.h. Andrew Index: tools/opt/opt.cpp ==================================================================--- tools/opt/opt.cpp (revision 97995) +++ tools/opt/opt.cpp (working copy) @@ -38,6 +38,12 @@ #include "llvm/LinkAllVMCore.h" #include <memory> #include <algorithm> + +#include "dsa/DSGraph.h" +#include "dsa/DataStructure.h" +#include "poolalloc/RunTimeAssociate.h" +#include "LinkDSA.h" + using namespace llvm; // The OptimizationList is automatically populated with registered Passes by the Index: tools/opt/Makefile ==================================================================--- tools/opt/Makefile (revision 97995) +++ tools/opt/Makefile (working copy) @@ -12,3 +12,8 @@ LINK_COMPONENTS := bitreader bitwriter asmparser instrumentation scalaropts ipo include $(LEVEL)/Makefile.common + +CPP.Flags += -I../../projects/poolalloc/include + +ExtraLibs := ../../projects/poolalloc/$(BuildMode)/lib/libpoolalloc.a \ + ../../projects/poolalloc/$(BuildMode)/lib/libLLVMDataStructure.a On Tue, Mar 9, 2010 at 11:13 AM, John Criswell <criswell at uiuc.edu> wrote:> Dear Patrick and Antron, > > I've modified the Makefiles in the poolalloc module so that they do not > build shared libraries on MingW or Cygwin. Patrick, if you do an "svn > up" you should be able to compile the poolalloc project now. > > -- John T. > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Possibly Parallel Threads
- [LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
- [LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
- [LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
- [LLVMdev] Changed: Build errors for poolalloc using MinGW/gcc 4.4.0
- [LLVMdev] .so file creation for new passes