[Bug 59886] New: Build failed for SymCrypt with clang-msvc on x86/i386 and x86_64
http://bugs.winehq.org/show_bug.cgi?id=59886 Bug ID: 59886 Summary: Build failed for SymCrypt with clang-msvc on x86/i386 and x86_64 Product: Wine Version: 11.11 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: rsaenh Assignee: wine-bugs@list.winehq.org Reporter: iviv@etersoft.ru Distribution: --- Created attachment 81209 --> http://bugs.winehq.org/attachment.cgi?id=81209 clang-msvc-fixes.patch Typical errors i get when compiling with clang-11: error: call to undeclared function '_mm_shuffle_epi8' error: use of undeclared identifier '__m256i' error: call to undeclared function '_mm_sha256rnds2_epu32' error: call to undeclared function '_rdrand32_step' error: call to undeclared function '_rdseed32_step' This became visible after: commit fc6d6ebbfe975059055062cfef312fc368bdff69 Author: Alexandre Julliard <julliard@winehq.org> Date: Mon Jun 1 14:38:48 2026 +0200 rsaenh: Use SymCrypt for hash algorithms. According to my testing, these errors are present for all clang versions before 19 (tested clang11-20) 1. For SSSE3/AES/PCLMUL/AVX2/SHA/RDRAND/RDSEED intrinsics, per-source compiler flags are needed for clang <= 18. 2. Separate case for VAES/VPCLMUL in aes-ymm.c: -mvaes/-mvpclmulqdq cannot be used because clang 11/12 expose broken AVX-512 declarations from vaesintrin.h. 3. There is also a separate clang-msvc issue in SymCrypt byte-swap macros. SymCrypt detects clang-msvc as MSVC, so it selects the MSVC byte-swap helpers: _byteswap_ushort, _byteswap_ulong, byteswap_uint64 this later lead to linking errors: lld-link: error: undefined symbol: __declspec(dllimport) _byteswap_uint64 lld-link: error: undefined symbol: __declspec(dllimport) _byteswap_ulong Suggested fixes are in attached patches: 1. tools/makedep: Support per-source extra compiler flags. Adds support for per-source EXTRACFLAGS/EXTRACXXFLAGS 2. libs/symcrypt: Fix clang-msvc x86 build. Fixes errors by selecting needed flags for symcrypt source files. Also using __builtin for biteswap. 3. libs/symcrypt: Add clang wrappers for YMM VAES intrinsics. This is a workaround since -mvaes/-mvpclmulqdq breaks compilation for clang-11/12. So define deeded wrappers locally. These changes fix clang symcrypt build for me. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59886 Austin English <austinenglish@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch, | |regression, source CC| |julliard@winehq.org Regression SHA1| |fc6d6ebbfe975059055062cfef3 | |12fc368bdff69 -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=59886 Dmitry Timoshkov <dmitry@baikal.ru> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |805f01c178a69e2d254f518440e | |a664e1c9942c6 --- Comment #1 from Dmitry Timoshkov <dmitry@baikal.ru> --- This is fixed by 805f01c178a69e2d254f518440ea664e1c9942c6. Thanks Alexandre. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
WineHQ Bugzilla