building libgcrypt with --host x86_64-w64-mingw32

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Feb 16 04:27:23 CET 2016


Hi Gcrypt devs--

i'm exploring building gcrypt 1.6.5 using mingw32 on debian, and i find
i can build it OK with i686-w64-mingw32-gcc (./configure --host
i686-w64-mingw32), but not with x86_64-w64-mingw32-gcc (./configure
--host x86_64-w64-mingw32).  In particular:

 * random/rndhw.c fails to build because it selects 32-bit assembler
   because __x86_64__ and __LP64__ are not #define'd

 * linking libgcrypt-20.dll fails because the underlying assembly isn't
   produced, lots of errors like this one:

    mpi/mpi-inline.h:125: undefined reference to `_gcry_mpih_sub_n'

Both of these changes are to do with assembler, i note.


By way of contrast, I'm successfully able to build libgpg-error-0.dll
using both toolchains, producing dlls recognized by /usr/bin/file as
corresponding to these platforms:

 i686-w64-mingw32/bin/libgpg-error-0.dll:   PE32 executable (DLL) (console) Intel 80386, for MS Windows
 x86_64-w64-mingw32/bin/libgpg-error-0.dll: PE32+ executable (DLL) (console) x86-64, for MS Windows

Has anyone built libgcrypt for 64-bit Windows with mingw?  Is this a
targeted platform?  If so, is there something i should try to get
libgcrypt to cross-build cleanly for that target?

          --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 948 bytes
Desc: not available
URL: </pipermail/attachments/20160215/70d0c9c7/attachment.sig>


More information about the Gcrypt-devel mailing list