Hello CFFI developers,
There is a following fragment in cffi/grovel/grovel.lisp:
(defparameter *cpu-word-size-flags* (ecase (cffi:foreign-type-size :long) (4 (list "-m32")) (8 (list "-m64"))))
It would be better to use :intptr instead of :long, because on 64-bit MS Windows, long is not long enough.
AFAIK, there are no official "multilib" mingw64 builds, so -m32/-m64 are unlikely to be too useful nowadays. However, passing wrong word size to gcc prevents it from building correct binaries anyway: if that word size is unsupported, gcc will refuse to compile anything.
I ran into this problem with my Windows/amd64 port of SBCL.
On Fri, Nov 4, 2011 at 12:46 AM, Anton Kovalenko anton@sw4me.com wrote:
(defparameter *cpu-word-size-flags* (ecase (cffi:foreign-type-size :long) (4 (list "-m32")) (8 (list "-m64"))))
It would be better to use :intptr instead of :long, because on 64-bit MS Windows, long is not long enough.
Thanks for your report!
Stelian, any objection to making this change before the grovel-cxx merge?
On Fri, Nov 4, 2011 at 12:53 AM, Luís Oliveira luismbo@gmail.com wrote:
It would be better to use :intptr instead of :long, because on 64-bit MS Windows, long is not long enough.
Thanks for your report!
Stelian, any objection to making this change before the grovel-cxx merge?
We discussed this over IRC, and I've just commited a fix.
Cheers,