How to Build with MinGW64 on Windows 7

Sisyphus sisyphus1 at
Thu Dec 8 04:08:32 CET 2011

Hi Tom,

Trying on my Vista64 Athlon dual core (as per the second config.log you 

./configure CC=gcc CXX=g++ CFLAGS=-m64 -march=core2 
CXXFLAGS=-m64 -march=core2 --enable-cxx

I immediately get at the console:

configure: error: unrecognized option: `-march=core2'
Try `./configure --help' for more information.

So, I'll drop that option (which I've never used anyway) and try again.

Configure then actually succeeds, but thinks that the ABI == 32, and 
therefore uses some .asm source files which cause the compilation to fail to 
very early on.
(I think it is still the case that there's no asm code for an x64 Windows 
build of gmp.)

Also, I don't think you need the -m64 flags.

I've got some notes here that suggest the following workaround is 

./configure --enable-cxx --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32

Another (better ? ... or equivalent ?) solution that I *think* I've used in 
the past (apart from the --enable-cxx) is:

./configure --enable-cxx host=non-none-none ABI=longlong

I just tried both of those, and they seemed ok - however I didn't let 'make' 
run to completion for the first of those 2 configures

For the second configure command, 'make' ran fine ... and 'make check' is 
churning away as I write. (I'll let you know if it gives me any trouble.)

Other than that, I'd probably also remove C:/MinGW/bin from the path, and 
I'd want to know that there's nothing in C:/WinAVR-20100110/bin and 
C:/Windows/System32/WindowsPowerShell/v1.0/ that's going to interfere with 
the build.

It would probably also be a good idea to get the latest version of msys - 
version 1.0.8 is rather old.

Hope there's something there that helps.


More information about the gmp-discuss mailing list