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.