Sorry, this wasn't mentioned in documentation. llvm-gcc was built with
'--enable-threads' flag, thus it requires win32 pthread port. Keith have
already given a right link for dlls download.
Just to make stuff clear: you'll have to download pthreadGC1.dll, rename it to pthreadGC.dll and
put it somewhere in your PATH. All try to build all future versions of binaries with
pthreads compiled statically.
Finally, I got my hands on Windows machine again today.
I extracted llvm-2.1-x86-mingw32.tar.bz2 and
llvm-gcc4.0-2.1-x86-mingw32.tar.bz2
to C:\llvm (It's a bare Windows Vista installation without MinGW)
Added C:\llvm\bin;C:\llvm\libexec\gcc\i686-pc-mingw32\4.0.1 to PATH
(C:\llvm\libexec\gcc\i686-pc-mingw32\4.0.1 was added for cc1.exe)
Downloaded ftp://sourceware.org/pub/pthreads-win32/prebuilt-dll-1-9-0-release/lib/pthreadGC1.dll
to C:\llvm\bin\pthreadGC.dll
And,
> llvm-gcc hello.c -IC:\llvm\include
-IC:\llvm\lib\gcc\i686-pc-mingw32\4.0.1\include
llvm-gcc: installation problem, cannot exec `as': No such file or directory
So, I renamed C:\llvm\bin\llvm-as.exe as C:\llvm\bin\as.exe
> llvm-gcc hello.c -IC:\llvm\include
-IC:\llvm\lib\gcc\i686-pc-mingw32\4.0.1\include
as: ./cc0Qaaaa.s:3,0: ./cc0Qaaaa.s:3: error: syntax error,
unexpected $undefined
, expecting GLOBAL or CONSTANT while reading token: '.'
Am I supposed to install MinGW (maybe MSYS) and extract prebuilt
packages ( llvm-2.1-x86-mingw32.tar.bz2 and
llvm-gcc4.0-2.1-x86-mingw32.tar.bz2) to C:\MinGW ??
I'll try to install MinGW tomorrow.
Thanks.
Sam
Sam,
Am I supposed to install MinGW (maybe MSYS) and extract prebuilt
packages ( llvm-2.1-x86-mingw32.tar.bz2 and
llvm-gcc4.0-2.1-x86-mingw32.tar.bz2) to C:\MinGW ??
llvm-as != as. You'll need to have binutils installed in order to compile & link.
llvm-as.exe converts LLVM assembly to LLVM bitcode, while as.exe converts
native assembly to native opcodes, so renaming is not going to work. You
should install the binutils of MinGW instead.
Bye,
Maarten
Yay! It works now!
0) Download:
- MinGW Distro - nuwen.net : Nice MinGW distribution with gcc 4.2.1
- http://llvm.org/releases/2.1/llvm-2.1-x86-mingw32.tar.bz2
- http://llvm.org/releases/2.1/llvm-gcc4.0-2.1-x86-mingw32.tar.bz2
- ftp://sourceware.org/pub/pthreads-win32/prebuilt-dll-1-9-0-release/lib/pthreadGC1.dll
1) Extract MinGW to C:\MinGW
2) Move pthreadGC1.dll to C:\MinGW\bin\pthreadGC.dll
3) Extract llvm-2.1-x86-mingw32.tar.bz2 to C:\MinGW
4) Extract llvm-gcc4.0-2.1-x86-mingw32.tar.bz2 to C:\MinGW
5) Add C:\MinGW\bin to PATH environment variable (put it before cygwin)
6) Follow http://llvm.org/docs/GettingStarted.html#tutorial
When I compress C:\MinGW, it's 35MB. This would fit nicely on usb thumb drives.