MinGW GCC 4.8 with GDC
Daniel Green
venix1 at gmail.com
Sat Mar 30 16:18:26 PDT 2013
I got GDC working with GCC 4.8 on MinGW. You can find it at
https://bitbucket.org/goshawk/gdc/downloads/GCC-4.8-MinGW-GDC-.7z
A couple of notable things. It's ALPHA quality. If it works, you're
lucky. You'll find regressions. The patches required to fix some of
the past bugs haven't been transferred yet.
It also fails the following DMD testsuite tests.
a20 argufilem bitops bug9010 constfold cov2 ctorpowtests eh
hello-profile nested sdtor sieve template9 test23 test34
test36 test4 test42 testdstress testmodule testsafe
testsocket testthread variadic xtest46
ddoc12 inlineheader inlinexheader line
Currently, there is no build script. You'll need to recompile all
dependencies manually.
It's standalone. It is no longer required to have TDM or any other
variant of MinGW installed prior. This increases the size of the
package. Also, there's no optimization flags being used. So everything
is bigger as well.
It's only 32-bit. 64-bit forthcoming.
README / Build instructions
---------------------------
For Phobos licensing see phobolicense.txt.
For GDC licensing see gpl.txt.
Installation:
This is a self contained MinGW release. Extract GDC folder to directory
of choice.
Building:
** Deviating from the versions specified may cause intended
consequences. ie: Build failures, random crashes **
Ensure fstab as the following entry. Substitute C: for drive of
choice(Should work)
C:/crossdev /crossdev
Download the following packages:
binutils-2.23.1.tar.gz
cloog-0.18.0.tar.gz
gcc-4.8-20130303.tar.bz2
gmp-4.3.2.tar.bz2
isl-0.11.1.tar.bz2
mingwrt-3.20-mingw32-src.tar.gz
mpc-1.0.1.tar.gz
mpfr-3.1.1.tar.bz2
w32api-3.17-2-mingw32-src.tar.lzma
Clone GDC. The checkout version is what I have the patches will
properly compile.
git clone https://github.com/D-Programming-GDC/GDC.git
git checkout 166e02c2e99c3f6926513bb617593f24b7f4456f
Extract the download files to a directory called src.
Build in this order. All commands are assumed ran from a directory called
build within the respective source directory
GMP
---
../configure --prefix=/crossdev/gdc/deps/gmp --disable-shared
make && make install
MPFR
----
../configure --prefix=/crossdev/gdc/deps/mpfr
--with-gmp=/crossdev/gdc/deps/gmp --disable-shared
make && make install
MPC
---
../configure --prefix=/crossdev/gdc/deps/mpc
--with-gmp=/crossdev/gdc/deps/gmp --with-mpfr=/crossdev/gdc/deps/mpfr/
--disable-shared
make && make install
ISL
---
../configure --prefix=/crossdev/gdc/deps/isl --disable-shared
--with-gmp-prefix=/crossdev/gdc/deps/gmp
make && make install
CLOOG
-----
../configure --prefix=/crossdev/gdc/deps/cloog --with-bits=gmp
--disable-shared --with-gmp=build --with-gmp-prefix=/crossdev/gdc/deps/gmp
make && make install
Binutils
--------
Apply patch mingw-tls-binutils-2.23.1.patch
../configure --prefix=/crossdev/gdc/release
make && make install
MinGWRT
-------
Apply patch mingwrt_gdc.patch.
- Fixes %lf conversion issues.(Causes problems with 2^^4 expressions)
- Fixes TLS offset by 1 problems
../configure --prefix=/crossdev/gdc/release
make && make install
Win32 API
---------
../configure --prefix=/crossdev/gdc/release
make && make install
GCC
---
Apply patch mingw-tls-gcc-4.8.patch.
- Fixes SJLJ exception issue
- Adds TLS support
export GCC_PREFIX="/crossdev/gdc/install"
# Required for updated assembler and linker.
export PATH="$GCC_PREFIX/bin:$PATH"
../configure --prefix=$GCC_PREFIX --with-gmp=/crossdev/gdc/deps/gmp
--with-mpfr=/crossdev/gdc/deps/mpfr \
--with-mpc=/crossdev/gdc/deps/mpc --with-cloog=/crossdev/gdc/deps/cloog/
--with-isl=/crossdev/gdc/deps/isl \
--disable-bootstrap --enable-languages=c,c++,d,lto --enable-sjlj-exceptions
More information about the D.gnu
mailing list