I'm using a little shell script: BUILD_ROOT=/home/llvm-1.7/cfrontend PREFIX="$BUILD_ROOT/install" LOCAL_BUILD_DIR="$BUILD_ROOT/build" SOURCE_DIR="$BUILD_ROOT/src" echo $__me: Building $TARGET echo $__me: BUILD_ROOT == $BUILD_ROOT echo $__me: SOURCE_DIR == $SOURCE_DIR echo $__me: LOCAL_BUILD_DIR == $LOCAL_BUILD_DIR echo $__me: PREFIX == $PREFIX confopts="--prefix=$PREFIX" confopts="$confopts --disable-threads" confopts="$confopts --disable-nls" confopts="$confopts --disable-shared" confopts="$confopts --enable-languages=c,c++" confopts="$confopts --disable-c-mbchar" confopts="$confopts --program-prefix=llvm-" echo $__me: confopts == $confopts if [ -e $LOCAL_BUILD_DIR ]; then rm -rf $LOCAL_BUILD_DIR; fi mkdir $LOCAL_BUILD_DIR && cd $LOCAL_BUILD_DIR ../src/configure --srcdir=$SOURCE_DIR --includedir=/C/msys/1.0/mingw/include --libdir=/C/msys/1.0/mingw/lib --target=mingw32 $confopts make CFLAGS=-O LIBCFLAGS+=-g LIBCFLAGS+=-O2 LIBCXXFLAGS+=-g LIBCXXFLAGS+=-O2 LIBCXXFLAGS+=-fno-implicit-templates LDFLAGS=-s all On Sun, 23 Apr 2006, Oscar Fuentes wrote:> Greg Pettyjohn <gregp at ccs.neu.edu> writes: > > > Is the MinGW user's list on the web? > > Look on www.mingw.org -> mailing list > > > Can you give me a link to the thread? > > Sorry, no time for that. Once on the mailing list archives, do a > search for 'configure'. > > > (What's IIRC?) > > If I Remember Correctly. > > By the way, what's your configure command? > > -- > Oscar > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Greg Pettyjohn <gregp at ccs.neu.edu> writes:> I'm using a little shell script:[snip]> confopts="--prefix=$PREFIX" > confopts="$confopts --disable-threads" > confopts="$confopts --disable-nls" > confopts="$confopts --disable-shared" > confopts="$confopts --enable-languages=c,c++" > confopts="$confopts --disable-c-mbchar" > confopts="$confopts --program-prefix=llvm-"Try adding --disable-fixincludes too. [snip]> ../src/configure --srcdir=$SOURCE_DIR > --includedir=/C/msys/1.0/mingw/include --libdir=/C/msys/1.0/mingw/lib > --target=mingw32 $confopts--includedir and --libdir should be Windows directories (c:/msys/...). MinGW does not understand Cygwin/MSYS paths. Is --srcdir really needed?> make CFLAGS=-O LIBCFLAGS+=-g LIBCFLAGS+=-O2 LIBCXXFLAGS+=-g > LIBCXXFLAGS+=-O2 LIBCXXFLAGS+=-fno-implicit-templates LDFLAGS=-s allI don't know about LLVM, but shouldn't this be make ... bootstrap as per the gcc build instructions? -- Oscar
Thanks. I'll try some of this. Further comments in-line: On Sun, 23 Apr 2006, Oscar Fuentes wrote:> Greg Pettyjohn <gregp at ccs.neu.edu> writes: > > > I'm using a little shell script: > [snip] > > confopts="--prefix=$PREFIX" > > confopts="$confopts --disable-threads" > > confopts="$confopts --disable-nls" > > confopts="$confopts --disable-shared" > > confopts="$confopts --enable-languages=c,c++" > > confopts="$confopts --disable-c-mbchar" > > confopts="$confopts --program-prefix=llvm-" > > Try adding --disable-fixincludes too.Say, that sounds plausible.> [snip] > > > ../src/configure --srcdir=$SOURCE_DIR > > --includedir=/C/msys/1.0/mingw/include --libdir=/C/msys/1.0/mingw/lib > > --target=mingw32 $confopts > > --includedir and --libdir should be Windows directories > (c:/msys/...). MinGW does not understand Cygwin/MSYS paths.With forward-slashes? or back-slashes? (I'll try both if I have to :)> Is --srcdir really needed?I don't know. At this poin I'm just trying lots of stuff. :-)> > make CFLAGS=-O LIBCFLAGS+=-g LIBCFLAGS+=-O2 LIBCXXFLAGS+=-g > > LIBCXXFLAGS+=-O2 LIBCXXFLAGS+=-fno-implicit-templates LDFLAGS=-s all > > I don't know about LLVM, but shouldn't this be > make ... bootstrap > as per the gcc build instructions?I don't know either. I believe I tried the bootstrap flag at one point, but still no dice. Last weekend, I actualy did build gcc (*not* llvm-gcc) successfully which proved to me that there wasn't something fundamentally wrong with my MinGW setup. The build went smoothly using a script I snagged off the MinGW WIKI. This is what prompted me to start my own script.> > -- > Oscar > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Hello, Oscar. You wrote Sunday, April 23, 2006, 8:31:14 PM: OF> Forward works ok with MinGW. Back slashes can be interpreted as escape OF> sequences by MSYS/Cygwin tools. I've succeeded in building CFE in Mingw at some 1.3-1.4 release. After, I just don't have enough time to play with LLVM. I've sent my instructions to Henrik Bach <henrik_bach_llvm at hotmail.com>, maybe it's worth to ask him. I'll also try to seek for e-mails i've sent to him (please note, that they should be outdated - i've written them a year ago). Anyway, the problem isn't in mingw itself, but in msys. Some patching will be needed in order to build it successfully. One of the decent solutions is just to use some small piece of cygwin just for shell stuff. -- With best regards, Anton mailto:asl at math.spbu.ru Monday, April 24, 2006 1:36:25 AM Faculty of Mathematics & Mechanics, Saint-Petersburg State University