How to Build with MinGW64 on Windows 7

Torbjorn Granlund tg at gmplib.org
Wed Dec 7 19:59:53 CET 2011


"Thomas D. Dean" <tomdean at speakeasy.org> writes:

  On Wed, 2011-12-07 at 18:50 +0100, Torbjorn Granlund wrote:
  
  >   configure:8657: gcc -o conftest.exe -m32 -O2 -pedantic -fomit-frame-pointer -march=pentiumpro   conftest.c
  >   ./configure: /c/MinGW64/bin/gcc: Invalid argument
  >   
  > I am sure you can reproduce this with manual commands.
  > 
  > You say this is a 64-bit system, but this seems to be a 32-bit system.
  > 
  
  echo int main(){return 0;} > conftest.c
  gcc -m64 -march=core2 conftest.c -o conftest
  conftest
  
  works.
  
What happens if you replace '-m64' by '-m32'?
Supposedly, that fails.

So, GMP's config.guess might be bad.  I suppose it didn't properly
support Windoze64 in 5.0.2.

Please try this version:

http://gmplib.org:8000/gmp/file/018161d99ceb/config.guess

(You can download the raw text using the 'raw' button.)

Let this list know the outcome.

  I used configure CC=gcc CFLAGS="-m64 -march=core2" --enable-cxx
  
  and it failed.  I created the failing conftest.c, compiled two ways
  gcc -m64 -march=core2 conftest.c
  /c/MinGW64/bin/gcc -m64 -march=core2 conftest.c
  and executed a.exe.
  I saw no errors.

I don't follow this reasoning, it is too terse.  

-- 
Torbjörn


More information about the gmp-discuss mailing list