[PATCH] support for mingw-w64

Torbjorn Granlund tg at gmplib.org
Sun Sep 13 15:13:30 CEST 2009


Ozkan Sezer <sezeroz at gmail.com> writes:

  >  There are 5 warnings from the test build procedure:
  >  memory.c: In function 'tests_reallocate':
  >  memory.c:113: warning: cast from pointer to integer of different size
  >  memory.c:121: warning: cast from pointer to integer of different size
  >  memory.c: In function 'tests_free_find':
  >  memory.c:168: warning: cast from pointer to integer of different size
  >  t-get_str.c: In function 'check_one':
  >  t-get_str.c:68: warning: cast from pointer to integer of different size
  >  t-get_str.c:69: warning: cast from pointer to integer of different size
  >  My humble suggestion would be replacing those 0x%lX simply
  >  with %p (attached: tests.patch).
  >
  > Is %p part of ISO C90?  I suppose these are error messages, to poor
  
  IIRC, it is.  Gcc doesn't warn at all if I compile %p with -std=c89.
  
OK, so then that's a good change.  (I've fixed it locally.)

  >  As for my patching configure.in at the correct location:  Well,
  >  I thought that I already did it at the correct place, where you
  >  do your stuff for athlon64 | x86_64 cpus.  Well, I just saw that
  >  I missed the atom cpu case, I think..  What is your suggestion
  >  about the correct place in configure.in?
  >
  > Look for a case statement indexed by "operating system" within the x86
  > stuff.  Add a new tag there, put your code after that tag.
  
  The best place I could fit myself was your existing mingw
  mingw case.  Is the following acceptable for configure.in
  patching?

I prefer to put it in the X86 part, where we already have a case stmt on
operating system.  (This misses the none-pc-mingw64 case, but we're
obsoleting the "none" cpu trick for disabling asm.  The case stmt you
used will move up too.)

I've made that change too, locally.

My current diff is attached.  Please try it.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff2
Type: application/octet-stream
Size: 7563 bytes
Desc: not available
URL: <http://gmplib.org/list-archives/gmp-devel/attachments/20090913/82412548/attachment.obj>
-------------- next part --------------

We should port the assmebly code, but not by naively copy-and-modify the
existing code.  We should of course use the same source file, and either
generate Windoze files on a Unix machine, or generate Windoze files as
part of the Windoze build process.

(Generating Windoze files on a Unix system might be a good idea if we
ever want to support M$'s IDE, we then need to generate xml "project"
files from the Makefiles.  I don't think Windoze has the tools to handle
this.)

-- 
Torbjörn


More information about the gmp-devel mailing list