How to Build with MinGW64 on Windows 7

Thomas D. Dean tomdean at speakeasy.org
Thu Dec 8 06:31:23 CET 2011


On Thu, 2011-12-08 at 14:08 +1100, Sisyphus wrote:
I installed msys.  Then, set the path to
PATH=C:\MinGW64\bin;C\msys\1.0\bin

> sh
# ./configure CC=gcc CFLAGS="-m64 -march=core2" \
  CXX=gc++CXXFLAGS="-m64 -march=core2" --enable-cxx

configure completed, seemingly without error.

# make
failed in mpn on tmp-add_n.s

7 assembler errors
line   error
 84    Error: operand type mismatch for push  ==>  push %ebx
 85    Error: operand type mismatch for push  ==>  push %esi
 86    Error: operand type mismatch for push  ==>  push %edi
107    Error: operand type mismatch for jmp   ==>  jmp *%eax
114    Error: operand type mismatch for pop   ==>  pop %edi
115    Error: operand type mismatch for pop   ==>  pop %esi
115    Error: operand type mismatch for pop   ==>  pop %ebx


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.

compiling with -m32 results in 4 byte int and 4 byte ptr
compiling with -m64 results in 4 byte int and 8 byte ptr

tomdean



More information about the gmp-discuss mailing list