FANDOM


(Howto install MinGW-w64 toolchain on 64 bit Linux)
 
(Howto install toolchain on 64 bit Linux: Spaces in URL)
Line 2: Line 2:
 
=== Howto install toolchain on 64 bit Linux ===
 
=== Howto install toolchain on 64 bit Linux ===
 
You can download this install steps as complete script file from [http://www.henrynestler.com/colinux/tools/mingw-w64/gcc445-mingw-w64-install/install-MinGW-for-64bit-under-Linux.sh install-MinGW-for-64bit-under-Linux.sh]
 
You can download this install steps as complete script file from [http://www.henrynestler.com/colinux/tools/mingw-w64/gcc445-mingw-w64-install/install-MinGW-for-64bit-under-Linux.sh install-MinGW-for-64bit-under-Linux.sh]
* Lets start a new directory. Set some variables make this doc here more simply
+
* Lets start a new directory. Set some variables make this doc here more readable
 
<pre><nowiki>
 
<pre><nowiki>
 
TOOLBASE="$HOME/MinGW64"
 
TOOLBASE="$HOME/MinGW64"
Line 13: Line 13:
 
<pre><nowiki>
 
<pre><nowiki>
 
MINGW_PACK="mingw-w64-bin_x86_64-linux_20100604_sezero.tar.gz"
 
MINGW_PACK="mingw-w64-bin_x86_64-linux_20100604_sezero.tar.gz"
wget "http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/sezero_20100604/$MINGW_PACK/download"
+
wget "http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win64/Personal Builds/sezero_20100604/$MINGW_PACK/download"
 
</nowiki></pre>
 
</nowiki></pre>
 
* "sezero" does not tar'ed from base of PREFIX. So, unpack this somewhere and set softlink
 
* "sezero" does not tar'ed from base of PREFIX. So, unpack this somewhere and set softlink

Revision as of 16:55, June 6, 2010

Howto install MinGW-w64

Howto install toolchain on 64 bit Linux

You can download this install steps as complete script file from install-MinGW-for-64bit-under-Linux.sh

  • Lets start a new directory. Set some variables make this doc here more readable
TOOLBASE="$HOME/MinGW64"
PREFIX="$TOOLBASE/gcc445"
TARGET="x86_64-w64-mingw32"
mkdir -p $TOOLBASE
cd $TOOLBASE
MINGW_PACK="mingw-w64-bin_x86_64-linux_20100604_sezero.tar.gz"
wget "http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting Win64/Personal Builds/sezero_20100604/$MINGW_PACK/download"
  • "sezero" does not tar'ed from base of PREFIX. So, unpack this somewhere and set softlink
mkdir -p $TOOLBASE/sezero
tar xzf $DOWNLOADS/$MINGW_PACK -C $TOOLBASE/sezero
ln -s sezero/W64_160271 $PREFIX
  • Download DDK from ReactOS via SVN and put it directly into the MinGW headers
svn checkout -r 42435 svn://svn.reactos.org/reactos/trunk/reactos/include/ddk $PREFIX/$TARGET/include/ddk

Howto check toolchain

Check, that DDK headers and Complier can create objects

  • Create very small source
cd /tmp
echo "#include <ntddk.h>" >compiler.c
  • Set some more variables and build the object:
CFLAGS = -I$(PREFIX)/$(TARGET)/include/ddk -Wall -Os -O2
PATH := $(PATH):$(PREFIX)/bin
$(TARGET)-gcc $(CFLAGS) -c -o compiler.o compiler.c
  • You should have no warnings and a file compiler.o now.
  • More tests you can get form gcc445-mingw-w64-ddk-testing-suite.tgz. There are included sources and binaries for loader and simple driver.
Community content is available under CC-BY-SA unless otherwise noted.