Version
5.9.1
Description
I am trying to cross-compile wolfSSL/wolfCrypt with wolfSM enabled for Windows x64 using MinGW-w64 from Linux.
Configure command:
./configure \
--enable-sm2 \
--enable-sm3 \
--enable-sm4-ecb --enable-sm4-cbc --enable-sm4-ctr --enable-sm4-gcm --enable-sm4-ccm \
--enable-sp --enable-sp-asm \
--enable-cryptonly \
--enable-static --disable-shared \
--host=x86_64-w64-mingw32
With --enable-sp-asm, the generated configuration contains:
$ grep -R "WOLFSSL_SP_X86_64_ASM" -n wolfssl/options.h
227:#undef WOLFSSL_SP_X86_64_ASM
228:#define WOLFSSL_SP_X86_64_ASM
$ grep -R "src_libwolfssl_la-sp_x86_64_asm.lo:" -n Makefile
6718:wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo: \
8348:wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo: wolfcrypt/src/sp_x86_64_asm.S
The build then fails while assembling that file:
wolfcrypt/src/sp_x86_64_asm.S: Assembler messages:
wolfcrypt/src/sp_x86_64_asm.S:64: Warning: .type pseudo-op used outside of .def/.endef: ignored.
wolfcrypt/src/sp_x86_64_asm.S:64: Error: junk at end of line, first unrecognized character is `s'
If I remove --enable-sp-asm, the same MinGW-w64 cross build succeeds.
It looks like the autotools build is selecting the Unix/ELF-style sp_x86_64_asm.S for the x86_64-w64-mingw32 host. Could you clarify whether x86_64 SP assembly is expected to be supported for MinGW-w64 autotools cross builds?
Specifically:
- Is
--enable-sp-asm supported for --host=x86_64-w64-mingw32?
- If yes, is there an additional configure option needed to select a Windows-compatible x86_64 SP assembly backend?
- If not, should configure reject or disable
--enable-sp-asm for this host instead of generating a Makefile that later fails in the assembler?
I have attached wolfssl/options.h, config.log, and Makefile generated by this configure command.
options.h.txt
config.log
Makefile.txt
Version
5.9.1
Description
I am trying to cross-compile wolfSSL/wolfCrypt with wolfSM enabled for Windows x64 using MinGW-w64 from Linux.
Configure command:
With
--enable-sp-asm, the generated configuration contains:$ grep -R "src_libwolfssl_la-sp_x86_64_asm.lo:" -n Makefile 6718:wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo: \ 8348:wolfcrypt/src/src_libwolfssl_la-sp_x86_64_asm.lo: wolfcrypt/src/sp_x86_64_asm.SThe build then fails while assembling that file:
If I remove
--enable-sp-asm, the same MinGW-w64 cross build succeeds.It looks like the autotools build is selecting the Unix/ELF-style
sp_x86_64_asm.Sfor thex86_64-w64-mingw32host. Could you clarify whether x86_64 SP assembly is expected to be supported for MinGW-w64 autotools cross builds?Specifically:
--enable-sp-asmsupported for--host=x86_64-w64-mingw32?--enable-sp-asmfor this host instead of generating a Makefile that later fails in the assembler?I have attached
wolfssl/options.h,config.log, andMakefilegenerated by this configure command.options.h.txt
config.log
Makefile.txt