How to Build with MinGW64 on Windows 7

Sisyphus sisyphus1 at optusnet.com.au
Thu Dec 8 07:53:23 CET 2011


----- Original Message ----- 
From: "Thomas D. Dean"

> If I ./configure CC=gcc CXX=g++ --enable-cxx it works.  However, the
> compiler arguments generated by configure contain -m32 and the resulting
> library is 32 bit.
>
> So the problem is in making a 64 bit library.

Yep.
If any .asm files are listed at the end of the configure step, you know it's 
going to fail (with 64-bit mingw compiler). Thankfully, even if you miss the 
listing of those files, the failure occurs early on in the 'make' step  - so 
you haven't really wasted much time.

I think the earliest indication you get that it's not going to be what you 
want is if you see 'ABI=32', but there maybe other telltale signs, too.

All I know is that the "--host=none-none-none ABI=longlong" seems to work 
for me and for the person (JonY) who suggested it to me - see
http://permalink.gmane.org/gmane.comp.gnu.mingw.w64.general/352 for some 
elaboration.

That's also where I picked up the 
"--build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32" idea.
At that link it's specified as 
"--build=i686-pc-mingw32 --host=x86_64-w64-mingw32", but that didn't seem 
quite right when I tried it earlier today.

(Afaict, the --host=none-none-none means you won't get any assembly, and the 
ABI=longlong ensures you get 64-bit limbs. I've never tested whether both 
are needed. And there might be other ways to get the same result.)


Cheers,
Rob 



More information about the gmp-discuss mailing list