Thread overview
Win64/MinGW
Nov 14, 2010
dsimcha
Nov 14, 2010
Daniel Gibson
Nov 14, 2010
dsimcha
Nov 15, 2010
Johannes Pfau
Nov 16, 2010
Iain Buclaw
November 14, 2010
I'm thinking of working on getting GDC MinGW binaries up somewhere.  I understand the MinGW build process is highly non-trivial, and I'm trying to decide if it's worth the effort.  What is the status of MinGW for 64-bit Windows?  Is there any theoretical reason why 64-bit GDC for MinGW shouldn't work?  If not, then I'll try to make it work.
November 14, 2010
dsimcha schrieb:
> I'm thinking of working on getting GDC MinGW binaries up somewhere.  I
> understand the MinGW build process is highly non-trivial, and I'm trying to
> decide if it's worth the effort.  What is the status of MinGW for 64-bit
> Windows?  Is there any theoretical reason why 64-bit GDC for MinGW shouldn't
> work?  If not, then I'll try to make it work.

It may be a good start to build 32bit Windows binaries for GDC (and maybe provide an installer or something) and, with that experience, try to get 64bit Windows binaries.
I don't know if there's any reason why 64bit Windows binaries shouldn't work.
November 14, 2010
== Quote from Daniel Gibson (metalcaedes@gmail.com)'s article
> dsimcha schrieb:
> > I'm thinking of working on getting GDC MinGW binaries up somewhere.  I understand the MinGW build process is highly non-trivial, and I'm trying to decide if it's worth the effort.  What is the status of MinGW for 64-bit Windows?  Is there any theoretical reason why 64-bit GDC for MinGW shouldn't work?  If not, then I'll try to make it work.
> It may be a good start to build 32bit Windows binaries for GDC (and maybe
> provide an installer or something) and, with that experience, try to get 64bit
> Windows binaries.
> I don't know if there's any reason why 64bit Windows binaries shouldn't work.

To clarify:  I'm not willing to put much work into getting Win32 working b/c DMD already works well for Win32, whereas DMD for Win64 isn't happening for a while even after DMD for Linux64 is out because of linker issues.
November 15, 2010
Am 14.11.2010, 20:30 Uhr, schrieb dsimcha <dsimcha@yahoo.com>:

> == Quote from Daniel Gibson (metalcaedes@gmail.com)'s article
>> dsimcha schrieb:
>> > I'm thinking of working on getting GDC MinGW binaries up somewhere.  I
>> > understand the MinGW build process is highly non-trivial, and I'm  
>> trying to
>> > decide if it's worth the effort.  What is the status of MinGW for  
>> 64-bit
>> > Windows?  Is there any theoretical reason why 64-bit GDC for MinGW  
>> shouldn't
>> > work?  If not, then I'll try to make it work.
>> It may be a good start to build 32bit Windows binaries for GDC (and maybe
>> provide an installer or something) and, with that experience, try to get 64bit
>> Windows binaries.
>> I don't know if there's any reason why 64bit Windows binaries shouldn't work.
>
> To clarify:  I'm not willing to put much work into getting Win32 working b/c DMD
> already works well for Win32, whereas DMD for Win64 isn't happening for a while
> even after DMD for Linux64 is out because of linker issues.

Building an 32bit windows GDC isn't that complicated, I built several versions of gdc according to this http://bitbucket.org/goshawk/gdc/wiki/MinGWCompile howto and it worked well. 64bit could be more complicated: You need mingw-w64 and there are no gdc build instructions for that yet (I guess most of the 32bit instructions applies to 64bit as well though). I also don't know how complete the 64bit mingw port is. And the website states "However, when compiling for 64-bit we recommend using at least gcc-4.5.1 to take advantage of the many improvements and bug-fixes" but gdc only supports gcc up to 4.4.x.

-- 
Johannes Pfau
November 16, 2010
>> I'm thinking of working on getting GDC MinGW binaries up somewhere. I
>> understand the MinGW build process is highly non-trivial, and I'm
>> trying to
>> decide if it's worth the effort. What is the status of MinGW for 64-bit
>> Windows? Is there any theoretical reason why 64-bit GDC for MinGW
>> shouldn't
>> work? If not, then I'll try to make it work.
>
> It may be a good start to build 32bit Windows binaries for GDC (and
> maybe provide an installer or something) and, with that experience, try
> to get 64bit Windows binaries.
> I don't know if there's any reason why 64bit Windows binaries shouldn't
> work.

Building GDC MinGW binaries wasn't _that_ complicated before,
the only trick* was making relocatable (away from C:\MinGW)...

Mostly ./configure && make, after all the patching was done ?
Like this: http://gdcwin.sourceforge.net/gcc-3.4.5-build.sh

--anders

* http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D.gnu&artnum=2252
November 16, 2010
== Quote from Anders F Björklund (afb@algonet.se)'s article
> >> I'm thinking of working on getting GDC MinGW binaries up somewhere. I
> >> understand the MinGW build process is highly non-trivial, and I'm
> >> trying to
> >> decide if it's worth the effort. What is the status of MinGW for 64-bit
> >> Windows? Is there any theoretical reason why 64-bit GDC for MinGW
> >> shouldn't
> >> work? If not, then I'll try to make it work.
> >
> > It may be a good start to build 32bit Windows binaries for GDC (and
> > maybe provide an installer or something) and, with that experience, try
> > to get 64bit Windows binaries.
> > I don't know if there's any reason why 64bit Windows binaries shouldn't
> > work.
> Building GDC MinGW binaries wasn't _that_ complicated before,
> the only trick* was making relocatable (away from C:\MinGW)...
> Mostly ./configure && make, after all the patching was done ?
> Like this: http://gdcwin.sourceforge.net/gcc-3.4.5-build.sh
> --anders
> *
>
http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=D.gnu&artnum=2252

As far as I'm aware, for GCC4 on MinGW, you need to build MPFR and GMP first to link against the compiler, else it just won't run. I'd be interested to know if someone has tried building the above way though.

Regards
Iain
November 16, 2010
Iain Buclaw wrote:
>> Mostly ./configure && make, after all the patching was done ?
>> Like this: http://gdcwin.sourceforge.net/gcc-3.4.5-build.sh
>
> As far as I'm aware, for GCC4 on MinGW, you need to build MPFR and GMP first to
> link against the compiler, else it just won't run. I'd be interested to know if
> someone has tried building the above way though.

I think an updated build script (for gcc-4.2.1-sjlj-2) is at:
http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version4/Previous%20Testing_%20gcc-4.2.1-sjlj%20-2/gcc-4.2.1-build-sjlj-2.sh

All I changed the previous time was to remove Fortran/Ada/etc:
http://downloads.sourceforge.net/project/mingw/MinGW/BaseSystem/GCC/Version3/Previous%20Release_%20gcc-3.4.5-20060117-1/gcc-3.4.5-build.sh

From:
	--host=mingw32
	--prefix=/mingw
	--enable-languages=c,c++,f77,ada,objc,java
To:
	--host=i386-mingw32
	--prefix=/gdc
	--enable-languages=c,c++,d

And wrapped gdmd with pl2bat, to avoid having to use the .pl extension.
Then the installer was made with NSIS. (http://nsis.sourceforge.net/)

--anders
November 16, 2010
Iain Buclaw wrote:
> As far as I'm aware, for GCC4 on MinGW, you need to build MPFR and GMP first to
> link against the compiler, else it just won't run.

Seems like it was changed in GCC 4.3.0. For GCC 4.2.1, you only needed
to include MPFR and GMP if you were building the Fortran frontend...

Easiest way to do it seems to be to symlink "mpfr" and "gmp" into the source tree, much like GDC is being symlinked into "gcc/d" already ?

From looking at http://bitbucket.org/goshawk/gdc/wiki/MinGWCompile and
http://sourceforge.net/apps/trac/mingw-w64/wiki/Cross%20Win32%20and%20Win64%20compiler

--anders