[LLVMdev] Building LLVM under Mingw. Part I: tools-only

Greg Pettyjohn gregp at ccs.neu.edu
Sun Apr 30 16:40:42 PDT 2006


So I've been continuing to work on building LLVM under Mingw.
I've made progress on the CFE build and will perhaps post my results later
today.

Anyway, I just did the tools-only part and had a few questions/comments

First of all, with regards to my setup. I have the following in my notes:

   These are the files I downloaded:
      MinGW-3.1.0-1.exe
      MSYS-1.0.11-2004.04.30-1.exe
      msysDTK-1.0.1.exe (for CVS)
      gcc-core-3.4.2-20040916-1.tar.gz
      gcc-g++-3.4.2-20040916-1.tar.gz
      binutils-2.16.91-20060119-1.tar.gz

      WARNING: llvm-tools wouldn't link with this version of gcc:
            gcc-core-3.4.5-20060117-1.tar.gz
	    gcc-g++-3.4.5-200600117-1.tar.gz

It seems like I had problems with gcc version 3.4.5. But I guess others
didn't see these problems? (I'll have to try it again).

Previously, I was patching X86JITInfo.cpp like this:

   NOTE: I couldn't get llc to link until I made the following change (CVS
diff):
	 Greg Pettyjohn at GREGLAPTOP ~/llvm/lib/Target/X86
	 $ cvs diff X86JITInfo.cppIndex: X86JITInfo.cpp

===================================================================
	 RCS file: /var/cvs/llvm/llvm/lib/Target/X86/X86JITInfo.cpp,v
	 retrieving revision 1.15
	 diff -r1.15 X86JITInfo.cpp
	 51c51
	 < #if defined(__CYGWIN__) || defined(__APPLE__)
	 ---
	 > #if defined(__CYGWIN__) || defined(__MINGW32__) ||
defined(__APPLE__)
	 62c62
	 < #if defined(__CYGWIN__) || defined(__APPLE__)
	 ---
	 > #if defined(__CYGWIN__) || defined(__MINGW32__) ||
defined(__APPLE__)

I noticed that this is no longer necessary in the CVS version, but I had
to do it on the 1.7 tarball version.


I've also been seeing the assertion while linking lc. I've seen it in both
Mingw and similar behavior in cygwin. But I didn't see it in my most
recent build.

After running the tools-only build, I do a make install.
It chugs along just fine until it gets to the docs and then errors out on
the command guide:

make[2]: *** [install-local] Error 1
make[2]: Leaving directory `/home/llvm_home/llvm-build/docs/CommandGuide'
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/llvm_home/llvm-build/docs'
make: *** [install] Error 1

I've been assuming that since it has already installed the tools into my
PREFIX directory, that this is OK. Am I OK to ignore this?

So far this list has been very helpful. I'm thankful to see that some
others have decided to do a Mingw build.

Thanks.




More information about the llvm-dev mailing list